diff --git a/INSTALL.org b/INSTALL.org index 7535ac4..b73c1ce 100644 --- a/INSTALL.org +++ b/INSTALL.org @@ -17,8 +17,7 @@ instead: see [[Installing without configure or make]] below. You can specify the Emacs executable to use for byte-compiling - by using the ~EMACS~ environment variable: for example - ~./configure EMACS=xemacs~ to use XEmacs. On Mac OS X, if your + by using the ~EMACS~ environment variable. On Mac OS X, if your Emacs application is located at ~/Applications/Emacs.app~, you should do ~./configure EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs~ diff --git a/README.org b/README.org index afa249d..bb122ab 100644 --- a/README.org +++ b/README.org @@ -73,9 +73,8 @@ A basic gnuplot configuration can be found below. version 4.4 and up. It will also mostly work fine with older versions. If it doesn't work with newer versions, report a bug. - This version has mostly been tested under GNU Emacs 23 and 24. - It should also work on GNU Emacs 22 and XEmacs 21. It may work - with earlier versions, but it has not been tested. + This version has mostly been tested under GNU Emacs 25. + It should also work on GNU Emacs 24.3 and above. *** New syntax for gnuplot version 4 This version of gnuplot-mode supports the new curly-brace-block diff --git a/gnuplot-context.el b/gnuplot-context.el index 7b067b7..6205534 100644 --- a/gnuplot-context.el +++ b/gnuplot-context.el @@ -2061,9 +2061,7 @@ there." ;; Completions (defun gnuplot-completions () (gnuplot-parse-at-point t) - (if (featurep 'xemacs) ; Need an alist - (mapcar (lambda (s) (cons s nil)) gnuplot-completions) - gnuplot-completions)) + gnuplot-completions) (defun gnuplot-context-completion-at-point () "Return completions of keyword preceding point, using context." diff --git a/gnuplot-gui.el b/gnuplot-gui.el index a3eb4e0..f13decd 100644 --- a/gnuplot-gui.el +++ b/gnuplot-gui.el @@ -33,12 +33,8 @@ ;; backward compatible to 3.5, it will work well for that version ;; also. ;; -;; gnuplot-gui.el was developed using Emacs 19.34 and is known to work -;; on Emacs 20.x and XEmacs 20.x. I do not know what is the earliest -;; version for which it will work, but I make no guarantees for -;; versions before 19.34. Note that this makes heavy use of the -;; widget package, so this will not work on Emacs 19.34 unless you -;; install the widget package separately. +;; gnuplot-gui.el was developed using GNU Emacs 25 and should be +;; compatible with GNU Emacs 24.3 and above. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -74,7 +70,6 @@ (error nil))) (require 'cl) (eval-when-compile ; suppress some compiler warnings - (defvar gnuplot-xemacs-p nil) (defvar gnuplot-quote-character nil) (defvar gnuplot-info-display nil) (defvar gnuplot-mode-map nil)) @@ -115,17 +110,7 @@ This would be done after menu insertion of Gnuplot commands." (defvar gnuplot-gui-frame nil "Frame used to hold the buffer for setting options.") -(defcustom gnuplot-gui-frame-plist - '(height 18 width 65 border-width 0 - user-position t top 150 left 150 - internal-border-width 0 unsplittable t - default-toolbar-visible-p nil has-modeline-p nil - menubar-visible-p nil) - "Frame plist for the input run-time display frame in XEmacs." - :type '(repeat (group :inline t - (symbol :tag "Property") - (sexp :tag "Value"))) - :group 'gnuplot-gui) + (defcustom gnuplot-gui-frame-parameters '((height . 18) (width . 65) @@ -885,13 +870,10 @@ currently supported." (gnuplot-gui-set-options-and-insert)))) (defun gnuplot-gui-get-frame-param (param) - (if gnuplot-xemacs-p - (plist-get gnuplot-gui-frame-plist param) - (cdr (assoc param gnuplot-gui-frame-parameters)))) + (cdr (assoc param gnuplot-gui-frame-parameters))) + (defun gnuplot-gui-set-frame-param (param value) - (if gnuplot-xemacs-p - (plist-put gnuplot-gui-frame-plist param value) - (setcdr (assoc param gnuplot-gui-frame-parameters) value))) + (setcdr (assoc param gnuplot-gui-frame-parameters) value)) (defun gnuplot-gui-set-options-and-insert () "Insert arguments using a GUI interface. @@ -984,9 +966,7 @@ Note that \"cntrparam\" is not currently supported." (defun gnuplot-gui-y-n (foo)) -(if gnuplot-xemacs-p - (defalias 'gnuplot-gui-y-n 'y-or-n-p-maybe-dialog-box) - (defalias 'gnuplot-gui-y-n 'y-or-n-p)) +(defalias 'gnuplot-gui-y-n 'y-or-n-p) (defun gnuplot-gui-correct-command (word set term begin) "Check syntax of set command and terminal specifications. @@ -1281,25 +1261,15 @@ SAVE-FRAME is non-nil when the widgets are being reset." gnuplot-current-buffer (current-buffer) gnuplot-current-buffer-point (point-marker)) (unless (and gnuplot-gui-frame (frame-live-p gnuplot-gui-frame)) - (setq gnuplot-gui-frame (if gnuplot-xemacs-p - (make-frame gnuplot-gui-frame-plist) - (make-frame gnuplot-gui-frame-parameters)))) + (setq gnuplot-gui-frame (make-frame gnuplot-gui-frame-parameters))) (select-frame gnuplot-gui-frame) ;;(set-frame-position gnuplot-gui-frame 150 150) ;; so herky-jerky - (if gnuplot-xemacs-p - (set-mouse-position (selected-window) 0 0) - (set-mouse-position gnuplot-gui-frame 0 0))) + (set-mouse-position gnuplot-gui-frame 0 0)) (kill-buffer (get-buffer-create "*Gnuplot GUI*")) (switch-to-buffer (get-buffer-create "*Gnuplot GUI*")) (kill-all-local-variables) - (if gnuplot-xemacs-p - (progn - (set (make-local-variable 'frame-title-format) - "Set Gnuplot Options") - (set (make-local-variable 'frame-icon-title-format) - "Set Gnuplot Options")) - (modify-frame-parameters (selected-frame) - '((title . "Set Gnuplot Options"))) ) + (modify-frame-parameters (selected-frame) + '((title . "Set Gnuplot Options"))) (widget-insert "\nSet options for \"" item "\" ") (let (tag help val) (cond ((string-match "^[xyz]2?tics" item) @@ -1466,8 +1436,7 @@ SAVE-FRAME is non-nil when the widgets are being reset." (:bold t :foreground "tan")) (t (:italic t))) - "Face used for push-buttons. -Only used in Emacs. XEmacs displays push-buttons with a pixmap." + "Face used for push-buttons." :group 'gnuplot-faces) (defface gnuplot-gui-labels-face '((((class color) (background light)) (:bold t :foreground "darkslateblue")) diff --git a/gnuplot.el b/gnuplot.el index f0a5556..1c639a0 100644 --- a/gnuplot.el +++ b/gnuplot.el @@ -7,10 +7,10 @@ ;; Phil Type ;; Maintainer: Bruce Ravel ;; Created: June 28 1998 -;; Version: 0.7.0 +;; Version: 0.8.0 ;; Keywords: data gnuplot plotting ;; URL: https://github.com/emacsorphanage/gnuplot -;; Package-Requires: ((emacs "24.1")) +;; Package-Requires: ((emacs "24.3")) ;; This file is not part of GNU Emacs. @@ -34,9 +34,9 @@ ;; Gnuplot versions (4.4 and up), but should also work fine with older ;; versions. ;; -;; This version of gnuplot-mode has been tested mostly on GNU Emacs 23 -;; and 24, but should also work with older GNU Emacs versions back to -;; Emacs 21, and XEmacs 21. +;; This version of gnuplot-mode has been tested mostly on GNU Emacs +;; 25. +;; ;; ;; This mode offers several tools to help you compose your scripts, ;; including font-lock syntax colorization, a syntax table appropriate @@ -149,11 +149,11 @@ ;; (expand-file-name "/path/to/file"))) ;; where "/path/to/file" is the location of gnuplot.info ;; -;; This mode has been tested extensively with GNU Emacs 23 and 24, and -;; in a limited manner with GNU Emacs 22 and XEmacs 21. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; TODO Move history and installation instructions in their designated files. + ;;; History: ;; @@ -291,6 +291,7 @@ ;; 0.6.1 Sep 13 2011
Moved to github, updated contact info ;; 0.7.0 Oct 20 2012 Contextual completion & help, inline plots, ;; some other stuff +;; 0.8.0 Dec 07 2020 Remove XEmacs support, including the toolbar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Acknowledgements: @@ -312,7 +313,8 @@ ;; Michael M. Tung (prompted me to add pm3d support) ;; Holger Wenzel (suggested using `gnuplot-keywords-when') ;; Wolfgang Zocher (pointed out problem with gnuplot-mode + speedbar) -;; Jon Oddie (indentation, inline images, context mode) +;; Jon Oddie (indentation, inline images, context mode) +;; Maxime F. Treca (package update, XEmacs deprecation) ;; ;; and especially to Lars Hecking for including gnuplot-mode ;; with the gnuplot 3.7-beta distribution and for providing me with @@ -337,6 +339,7 @@ (require 'comint) (require 'easymenu) +;; TODO Fix deprecation (eval-when-compile (require 'cl)) (declare-function 'eldoc-add-command "eldoc") @@ -355,55 +358,17 @@ (require 'info-look) (error nil))) -;; Workaround missing `completion-at-point' in (X)Emacs < 22 -(if (not (fboundp 'completion-at-point)) - (defun gnuplot-xemacs-completion-at-point () - "Perform completion on keyword preceding point. - -This binds `comint-dynamic-complete-functions' to -`gnuplot-comint-complete' and uses `comint-dynamic-complete' to do the -real work." - (interactive) - (let ((comint-dynamic-complete-functions - '(gnuplot-comint-complete))) - (completion-at-point)))) - -;; Work around missing `window-full-height-p' -(if (fboundp 'window-full-height-p) - (defalias 'gnuplot-window-full-height-p 'window-full-height-p) - ;; The below is taken from window.el in GNU Emacs - (defun gnuplot-window-full-height-p (&optional window) - (unless window - (setq window (selected-window))) - (= (window-height window) - (window-height (frame-root-window (window-frame window)))))) - -;; Workaround obsolete `process-kill-without-query' -(if (fboundp 'set-process-query-on-exit-flag) - (defalias 'gnuplot-set-process-query-on-exit-flag 'set-process-query-on-exit-flag) - (defalias 'gnuplot-set-process-query-on-exit-flag 'process-kill-without-query)) - -;; Workaround for missing syntax-ppss in XEmacs -(if (fboundp 'syntax-ppss) - (defalias 'gnuplot-syntax-ppss 'syntax-ppss) - (defun gnuplot-syntax-ppss (&optional pos) - (save-excursion - (unless pos (setq pos (point))) - (let ((begin - (save-excursion - (goto-char pos) - (gnuplot-point-at-beginning-of-continuation)))) - (parse-partial-sexp begin pos))))) - ;;;; -(defconst gnuplot-xemacs-p (string-match "XEmacs" (emacs-version))) + (defconst gnuplot-ntemacs-p (string-match "msvc" (emacs-version))) (defvar gnuplot-three-eight-p "") (defconst gnuplot-maintainer "Jon Oddie") + (defconst gnuplot-maintainer-url "https://github.com/emacsorphanage/gnuplot/") + (defconst gnuplot-version "0.7-beta") (defgroup gnuplot nil @@ -742,11 +707,7 @@ non-nil." ;;; --- key bindings and menus (defvar gnuplot-mode-map - (let ((map (make-sparse-keymap)) - (completion-function - (if (fboundp 'completion-at-point) - 'completion-at-point - 'gnuplot-xemacs-completion-at-point))) + (let ((map (make-sparse-keymap))) (define-key map "\C-c\C-b" 'gnuplot-send-buffer-to-gnuplot) (define-key map "\C-c\C-c" 'comment-region) ; (define-key map "\C-c\C-o" 'gnuplot-gui-set-options-and-insert) @@ -768,17 +729,15 @@ non-nil." (define-key map "\C-m" 'newline-and-indent) (define-key map "\C-c\M-i" 'gnuplot-inline-image-mode) (define-key map (kbd "}") 'gnuplot-electric-insert) - (define-key map "\M-\r" completion-function) - (define-key map "\M-\t" completion-function) - - (if gnuplot-xemacs-p - (define-key map '(shift button2) 'gnuplot-gui-mouse-set) - (define-key map [S-mouse-2] 'gnuplot-gui-mouse-set)) + (define-key map "\M-\r" 'completion-at-point) + (define-key map "\M-\t" 'completion-at-point) + (define-key map [S-mouse-2] 'gnuplot-gui-mouse-set) map)) (defvar gnuplot-mode-menu nil) +;; TODO Fix deprecation (defvar gnuplot-display-options-menu (flet ((make-image-setter (type) `[,(concat (upcase type) " images") @@ -1229,11 +1188,8 @@ opening an argument-setting popup.") "Initial setup of gnuplot and insertions menus." (if gnuplot-insertions-menu-flag ; set up insertions menu (progn - (if gnuplot-xemacs-p - (setq gnuplot-insertions-top - '("insert set expression" "--:doubleLine")) - (setq gnuplot-insertions-top - '("insert set expression" "---"))) + (setq gnuplot-insertions-top + '("insert set expression" "---")) (setq gnuplot-insertions-menu (append (list "Insertions") gnuplot-insertions-top @@ -1262,391 +1218,14 @@ opening an argument-setting popup.") ;; only replicates mark-active, but it only returns true if the region ;; is of non-zero width. ;; Error checking suggested by + +;; TODO Unneeded in GNU Emacs (defun gnuplot-mark-active () "Return non-nil if the mark is active and it is not equal to point." (condition-case nil (and (mark) (/= (mark) (point))) (error nil))) - -;;; --- XEmacs toolbar - -(defgroup gnuplot-toolbar nil - "Toolbar used by XEmacs." - :prefix "gnuplot-toolbar-" - :group 'gnuplot) - -(defcustom gnuplot-toolbar-display-flag gnuplot-xemacs-p - "Non-nil means to display display a toolbar in XEmacs." - :group 'gnuplot-toolbar - :type 'boolean) - -(defcustom gnuplot-toolbar-use-toolbar (if (featurep 'toolbar) 'left-toolbar nil) - "If nil, do not use a toolbar. -If it is non-nil, it must be a toolbar. The five legal values are -`default-toolbar', `top-toolbar', `bottom-toolbar', `right-toolbar', -and `left-toolbar', although choosing `default-toolbar' or -`top-toolbar' may be a bad idea since either will make the GNUPLOT -toolbar replace the standard toolbar. Changing this will not change -the toolbar in a currently existing buffer, but it will take effect -the next time you use `gnuplot-mode' and Emacs. - -This is only used if a toolbar can be displayed, thus this is used in -XEmacs and ignored in FSF Emacs." - :type '(choice (const default-toolbar) - (const top-toolbar) - (const bottom-toolbar) - (const left-toolbar) - (const right-toolbar) - (const :tag "No toolbar" nil)) - :group 'gnuplot-toolbar) - -(defvar gnuplot-toolbar-location "") - -(defun gnuplot-toolbar-setup-toolbar (toolbar) - "Setup function for the `gnuplot-mode' toolbar. -TOOLBAR contains the toolbar specification. -This is basically swiped from VM." - (let ((width 46) (height 46) - (buffer (current-buffer)) - (frame (selected-frame)) - (tag-set '(win))) - (cond - ((eq (symbol-value gnuplot-toolbar-use-toolbar) right-toolbar) - (setq gnuplot-toolbar-location "right") - (set-specifier right-toolbar toolbar buffer) - (set-specifier right-toolbar-width width frame tag-set)) - ((eq (symbol-value gnuplot-toolbar-use-toolbar) left-toolbar) - (setq gnuplot-toolbar-location "left") - (set-specifier left-toolbar toolbar buffer) - (set-specifier left-toolbar-width width frame tag-set)) - ((eq (symbol-value gnuplot-toolbar-use-toolbar) bottom-toolbar) - (setq gnuplot-toolbar-location "bottom") - (set-specifier bottom-toolbar toolbar buffer) - (set-specifier bottom-toolbar-height height frame tag-set)) - ((eq (symbol-value gnuplot-toolbar-use-toolbar) top-toolbar) - (setq gnuplot-toolbar-location "top") - (set-specifier top-toolbar toolbar buffer) - (set-specifier top-toolbar-height height frame tag-set))))) - -(defvar gnuplot-line-xpm - (if (and (featurep 'xpm) (fboundp 'toolbar-make-button-list)) - (toolbar-make-button-list - "/* XPM */ -static char *line[] = { -/* width height num_colors chars_per_pixel */ -\" 40 40 5 1\", -/* colors */ -\". c #000000\", -\"a c #bebebe s backgroundToolBarColor\", -\"b c #2f4f4f\", -\"c c #ff6347\", -\"d c #0000ff\", -/* pixels */ -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaa..a..aaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaa..a..a....aaa...aaaaaaaaaaaa\", -\"aaaaaaaaaaaa..a..a..a..a..a..aaaaaaaaaaa\", -\"aaaaaaaaaaaa..a..a.aa..a.....aaaaaaaaaaa\", -\"aaaaaaaaaaa..a..a..a..a..aaaaaaaaaaaaaaa\", -\"aaaaaaaaaaa..a..a..a..a..a..aaaaaaaaaaaa\", -\"aaaaaaaaaaa..a..a..a..aa...aaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", -\"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", -\"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", -\"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", -\"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", -\"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaa............................aaaaaa\", -\"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") - "XPM format image used for the \"plot line\" button")) - -(defvar gnuplot-region-xpm - (if (and (featurep 'xpm) (fboundp 'toolbar-make-button-list)) - (toolbar-make-button-list - "/* XPM */ -static char *region[] = { -/* width height num_colors chars_per_pixel */ -\" 40 40 5 1\", -/* colors */ -\". c #000000\", -\"a c #bebebe s backgroundToolBarColor\", -\"b c #2f4f4f\", -\"c c #ff6347\", -\"d c #0000ff\", -/* pixels */ -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaa..aaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaa.a..a...aaa....a..aa...aa....aaaaa\", -\"aaaaaa...a..a..a..a..a..a..a..a..a..aaaa\", -\"aaaaaa..aa.....a.aa..a....aa..a.aa..aaaa\", -\"aaaaa..a...aaaa..aa.a..a..aa....a..aaaaa\", -\"aaaaa..a...a..a..a..a..a..a..a..a..aaaaa\", -\"aaaa..aaaa...aaa....a..aa...aa..a..aaaaa\", -\"aaaaaaaaaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", -\"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", -\"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", -\"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", -\"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", -\"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaa............................aaaaaa\", -\"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") - "XPM format image used for the \"plot region\" button")) - -(defvar gnuplot-buffer-xpm - (if (and (featurep 'xpm) (fboundp 'toolbar-make-button-list)) - (toolbar-make-button-list - "/* XPM */ -static char *buffer[] = { -/* width height num_colors chars_per_pixel */ -\" 40 40 5 1\", -/* colors */ -\". c #000000\", -\"a c #bebebe s backgroundToolBarColor\", -\"b c #2f4f4f\", -\"c c #ff6347\", -\"d c #0000ff\", -/* pixels */ -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa..aaaaaaaaaa......aaaaaaaaaaaaaa\", -\"aaaaaaaa..aaaaaaaaa..a..aaaaaaaaaaaaaaaa\", -\"aaaaaaa....aa..a.........a...aa.a.aaaaaa\", -\"aaaaaaa..a..a..a..a..a..a..a..a...aaaaaa\", -\"aaaaaaa.aa....aa..a..a..a.....a..aaaaaaa\", -\"aaaaaa...a.a..a..a..a..a..aaaa..aaaaaaaa\", -\"aaaaaa.....a..a..a..a..a..a..a..aaaaaaaa\", -\"aaaaaa....aaa..a.a..a..aa...aa..aaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaadaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaadaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaadaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaadaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaacaaaadaadaaaaaaaaaaaa\", -\"aaaaaaaa.caaadaaaccaccadaddaaaaaccaaaaaa\", -\"aaaaaaa..accdaddcaaaaaccaaaaaaccaaaaaaaa\", -\"aaaaaaaa.aadcaccdaaaadaaccaaccaaaaaaaaaa\", -\"aaaaaaaa.adaacaaaddadaaaaaccaaaaaaaaaaaa\", -\"aaaaaaaa.daaaaaaaaadaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaa............................aaaaaa\", -\"aaaaaaaa.aaaa.aaaa.aaaa.aaaa.aaaaaaaaaaa\", -\"aaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") - "XPM format image used for the \"plot buffer\" button")) - -(defvar gnuplot-doc-xpm - (if (and (featurep 'xpm) (fboundp 'toolbar-make-button-list)) - (toolbar-make-button-list - "/* XPM */ -static char *book_index[] = { -/* width height num_colors chars_per_pixel */ -\" 40 40 6 1\", -/* colors */ -\". c #000000\", -\"a c #bebebe s backgroundToolBarColor\", -\"b c #2f4f4f\", -\"c c #ff0000\", -\"d c #ffffff\", -\"e c #708090\", -/* pixels */ -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaa.........bbeaaaebb..........aaaaaa\", -\"aaaaaa.ddddddddaaebebeaaddddddddd.aaaaaa\", -\"aaaa...dab.bddeebadbdaeebedeeeeed...aaaa\", -\"aaaa.c.dbaddddebeedbdeebeedebebed.c.aaaa\", -\"aaaa.c.d.de.edeebeabdbbeeddebbbed.c.aaaa\", -\"aaaa.c.dbad.ddebeadbdeeebeddeeeed.c.aaaa\", -\"aaaa.c.dab..ddeeeedbdebeeedebebed.c.aaaa\", -\"aaaa.c.dddddddeebeabdebebedeebedd.c.aaaa\", -\"aaaa.c.debebedebeedbdbebeedbeeeeb.c.aaaa\", -\"aaaa.c.debeeedeeeaabdaaddddebedbb.c.aaaa\", -\"aaaa.c.deebeddbebedbdbaa.adeeedeb.c.aaaa\", -\"aaaa.c.ddeebedeeebaba.dd.dddeeedd.c.aaaa\", -\"aaaa.c.debeebdbeeedbd....ddeebeed.c.aaaa\", -\"aaaa.c.deebeedeebadbd.dd.ddeeeedd.c.aaaa\", -\"aaaa.c.dbbebddeeeeabd.aa.adebebbd.c.aaaa\", -\"aaaa.c.deeeeedeebeabaedddddeeeedd.c.aaaa\", -\"aaaa.c.dbebbbdebeadbdaeeeedebeeed.c.aaaa\", -\"aaaa.c.deeebddeeebdbdeebeedeebeed.c.aaaa\", -\"aaaa.c.debeeedebeeabdebebedebeebd.c.aaaa\", -\"aaaa.c.deebbedeeeedbdeeeeddeeeeed.c.aaaa\", -\"aaaa.c.dddddddddaadbdaddddddddddd.c.aaaa\", -\"aaaa.c..........beabaeb...........c.aaaa\", -\"aaaa.c.bbbbbbbbbb.bbbbbbbbbbbbbbb.c.aaaa\", -\"aaaa.c.bbbbbbbbbb..e.bbbbbbbbbbbb.c.aaaa\", -\"aaaa.c.bbbbbbbbbb.b.bbbbbbbbbbbbb.c.aaaa\", -\"aaaa.c............e.e.............c.aaaa\", -\"aaaa.cccccccccccc.a.a.ccccccccccccc.aaaa\", -\"aaaa................................aaaa\", -\"aaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") - "XPM format image used for the \"document\" button")) - -(defvar gnuplot-help-xpm - (if (and (featurep 'xpm) (fboundp 'toolbar-make-button-list)) - (toolbar-make-button-list - "/* XPM */ -static char *help_btn[] = { -/* width height num_colors chars_per_pixel */ -\" 40 40 3 1\", -/* colors */ -\"a c #bebebe s backgroundToolBarColor\", -\"b c #000000\", -\"c c #ff0000\", -/* pixels */ -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabbbbbbbbaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaabbbccccccccbbbaaaaaaaaaaaaa\", -\"aaaaaaaaaaabbccccccccccccccbbaaaaaaaaaaa\", -\"aaaaaaaaaabccccccccccccccccccbaaaaaaaaaa\", -\"aaaaaaaaabccccccccccccccccccccbaaaaaaaaa\", -\"aaaaaaaabcccccccbbbbbbbbcccccccbaaaaaaaa\", -\"aaaaaaaabccccbbbaaaaaaaabbbccccbaaaaaaaa\", -\"aaaaaaabccccbaaaaaaaaaaaaaabccccbaaaaaaa\", -\"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", -\"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", -\"aaaaaaabcccbaaaaaaaaaaaaaaaabcccbaaaaaaa\", -\"aaaaaaabbbbbaaaaaaaaaaaaaaabccccbaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaabbbccccbaaaaaaaa\", -\"aaaaaaaaaaaaaaaabbbbbbbbcccccccbaaaaaaaa\", -\"aaaaaaaaaaaaaaaabcccccccccccccbaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccccccccccbaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccccccccbbaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbbbbbbaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabccccbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaabbbbbbaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", -\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"};") - "XPM format image used for the \"help\" button")) - -(defvar gnuplot-toolbar - '([gnuplot-line-xpm - gnuplot-line-fn t "Plot the line under point"] - [gnuplot-region-xpm - gnuplot-region-fn t "Plot the selected region"] - [gnuplot-buffer-xpm - gnuplot-buffer-fn t "Plot the entire buffer"] - [:style 3d :size 8] - [gnuplot-help-xpm - gnuplot-help-fn t "Look at the gnuplot process buffer"] - [gnuplot-doc-xpm - gnuplot-doc-fn t "Look at the gnuplot document"]) - "The gnuplot toolbar.") - -(fset 'gnuplot-line-fn 'gnuplot-send-line-and-forward) -(fset 'gnuplot-region-fn 'gnuplot-send-region-to-gnuplot) -(fset 'gnuplot-buffer-fn 'gnuplot-send-buffer-to-gnuplot) -(fset 'gnuplot-help-fn 'gnuplot-show-gnuplot-buffer) -(fset 'gnuplot-doc-fn 'gnuplot-info-lookup-symbol) - -(defvar gnuplot-all-buttons-defined - (and (listp gnuplot-line-xpm) (listp gnuplot-region-xpm) - (listp gnuplot-buffer-xpm) (listp gnuplot-doc-xpm) - (listp gnuplot-help-xpm))) - - -(defun gnuplot-make-toolbar-function () - "Make toolbar." - (if (and gnuplot-xemacs-p gnuplot-all-buttons-defined) - (progn - ;;(remove-specifier gnuplot-toolbar-use-toolbar (current-buffer)) - (gnuplot-toolbar-setup-toolbar gnuplot-toolbar) - (add-spec-to-specifier (symbol-value gnuplot-toolbar-use-toolbar) - gnuplot-toolbar - (current-buffer))))) - -;;(defalias 'gnuplot-make-toolbar 'gnuplot-make-toolbar-function) - - ;;; --- syntax colorization, syntax table @@ -1765,7 +1344,6 @@ These are highlighted using `font-lock-constant-face'.") (gnuplot-make-regexp gnuplot-keywords-negatable-options)) ;; Set up colorization for gnuplot. -;; This handles font-lock for emacs and xemacs. (defvar gnuplot-font-lock-keywords nil) (defvar gnuplot-font-lock-syntactic-keywords nil) (defvar gnuplot-font-lock-defaults nil) @@ -1807,13 +1385,7 @@ These are highlighted using `font-lock-constant-face'.") nil ; No extra syntax ;; calls `gnuplot-beginning-of-continuation' ;; to find a safe place to begin syntactic highlighting - beginning-of-defun)) - - ;; Set up font-lock for Xemacs - ;; For GNU Emacs, this is done in `gnuplot-mode' - (if gnuplot-xemacs-p - (put 'gnuplot-mode 'font-lock-defaults - gnuplot-font-lock-defaults))) + beginning-of-defun))) ;; Some corner cases in Gnuplot's comment and string syntax are ;; difficult to handle accurately using Emacs's built-in syntax tables @@ -1893,7 +1465,7 @@ in gnuplot-mode buffers." If WHERE is omitted, defaults to text at point. This is a simple wrapper for `syntax-ppss'." (save-excursion - (let ((parse-state (gnuplot-syntax-ppss where))) + (let ((parse-state (syntax-ppss where))) (nth 3 parse-state)))) (defun gnuplot-in-comment (&optional where) @@ -1902,7 +1474,7 @@ This is a simple wrapper for `syntax-ppss'." If WHERE is omitted, defaults to text at point. This is a simple wrapper for `syntax-ppss'." (save-excursion - (let ((parse-state (gnuplot-syntax-ppss where))) + (let ((parse-state (syntax-ppss where))) (nth 4 parse-state)))) (defun gnuplot-in-string-or-comment (&optional where) @@ -1912,16 +1484,10 @@ If WHERE is omitted, defaults to text at point. This is a simple wrapper for `syntax-ppss'." (save-excursion - (let ((parse-state (gnuplot-syntax-ppss where))) + (let ((parse-state (syntax-ppss where))) (or (nth 3 parse-state) (nth 4 parse-state))))) -;; these two lines get rid of an annoying compile time error -;; message. that function gets non-trivially defalias-ed in -;; gnuplot-toolbar.el -;; (defun gnuplot-make-toolbar-dummy ()) -;; (defalias 'gnuplot-make-toolbar 'gnuplot-make-toolbar-dummy) - ;;; --- functions for sending commands to gnuplot @@ -2201,18 +1767,12 @@ buffer." (set-syntax-table gnuplot-mode-syntax-table) - (if gnuplot-xemacs-p ; deal with font-lock - (if (fboundp 'turn-on-font-lock) (turn-on-font-lock)) - (progn - (setq font-lock-defaults gnuplot-font-lock-defaults) - (set (make-local-variable 'parse-sexp-lookup-properties) t) - (set (make-local-variable 'syntax-propertize-function) - #'gnuplot-syntax-propertize))) - - ;; XEmacs needs the call to make-local-hook - (when (and (featurep 'xemacs) - (fboundp 'make-local-hook)) - (make-local-hook 'kill-buffer-hook)) + (progn + (setq font-lock-defaults gnuplot-font-lock-defaults) + (set (make-local-variable 'parse-sexp-lookup-properties) t) + (set (make-local-variable 'syntax-propertize-function) + #'gnuplot-syntax-propertize)) + (add-hook 'kill-buffer-hook 'gnuplot-close-down nil t) (add-hook 'comint-output-filter-functions @@ -2222,12 +1782,9 @@ buffer." 'gnuplot-protect-prompt-fn nil t) - ;; Set up completion, using completion-at-point in recent Emacs, - ;; comint-dynamic-complete in older Emacs - (if (and (>= emacs-major-version 24) - (>= emacs-minor-version 1)) - (add-hook 'completion-at-point-functions #'gnuplot-completion-at-point nil t) - (add-hook 'comint-dynamic-complete-functions 'gnuplot-comint-complete nil t)) + ;; Set up completion, using completion-at-point + (add-hook 'completion-at-point-functions #'gnuplot-completion-at-point nil t) + ;; Set up menu (see below) (easy-menu-define @@ -2239,13 +1796,8 @@ buffer." (define-key gnuplot-comint-mode-map "\M-\C-p" 'gnuplot-plot-from-comint) (define-key gnuplot-comint-mode-map "\M-\C-f" 'gnuplot-save-and-plot-from-comint) (define-key gnuplot-comint-mode-map "\C-d" 'gnuplot-delchar-or-maybe-eof) -(let ((completion-function - (if (and (>= emacs-major-version 24) - (>= emacs-minor-version 1)) - 'completion-at-point - 'comint-dynamic-complete))) - (define-key gnuplot-comint-mode-map "\M-\r" completion-function) - (define-key gnuplot-comint-mode-map "\M-\t" completion-function)) +(define-key gnuplot-comint-mode-map "\M-\r" 'completion-at-point) +(define-key gnuplot-comint-mode-map "\M-\t" 'completion-at-point) (define-key gnuplot-comint-mode-map "\C-c\C-d" 'gnuplot-info-lookup-symbol) (define-key gnuplot-comint-mode-map "\C-c\C-w" 'gnuplot-show-version) (define-key gnuplot-comint-mode-map "\C-c\C-i" 'gnuplot-insert-filename) @@ -2267,7 +1819,7 @@ buffer." (message "Starting gnuplot plotting program...") (setq gnuplot-buffer (make-comint gnuplot-process-name gnuplot-program) gnuplot-process (get-buffer-process gnuplot-buffer)) - (gnuplot-set-process-query-on-exit-flag gnuplot-process nil) + (set-process-query-on-exit-flag gnuplot-process nil) (with-current-buffer gnuplot-buffer (gnuplot-comint-mode) (when gnuplot-inline-image-mode @@ -2322,16 +1874,11 @@ defaults to 3.7." "Setup stuff that depends on version number." ;; set up the menubar (possibly dependent on version number) (gnuplot-setup-menubar) - ;; set up the toolbar (possibly dependent on version number) - (if (and gnuplot-xemacs-p gnuplot-toolbar-display-flag) - (condition-case () ; deal with the toolbar - (and (require 'toolbar) - (require 'xpm) - (gnuplot-make-toolbar-function)) - (error nil))) - (message "gnuplot-mode %s (gnuplot %s) -- report bugs as issues at %s" - gnuplot-version gnuplot-program-version - gnuplot-maintainer-url)) + ;; We silence the startup message for now + ;; (message "gnuplot-mode %s (gnuplot %s) -- report bugs as issues at %s" + ;; gnuplot-version gnuplot-program-version + ;; gnuplot-maintainer-url) + ) (defvar gnuplot-prompt-regexp (regexp-opt '("gnuplot> " "multiplot> ")) @@ -2416,8 +1963,7 @@ gnuplot process buffer will be displayed in a window." (defun gnuplot-display-images-p () "Inline images require GNU Emacs." - (and (not (featurep 'xemacs)) - (fboundp 'display-images-p) + (and (fboundp 'display-images-p) (display-images-p))) (defun gnuplot-external-display-mode () @@ -2939,6 +2485,7 @@ distribution. See gnuplot-context.el for details." (if gnuplot-context-sensitive-mode ;; Turn on (progn + ;; TODO Require by default ? (load-library "gnuplot-context") (load-library "eldoc") (setq gnuplot-completion-at-point-function #'gnuplot-context-completion-at-point) @@ -3000,21 +2547,6 @@ positions and COMPLETIONS is a list." (message "No gnuplot keywords complete '%s'" pattern) nil))) -(defun gnuplot-comint-complete () - "Complete the keyword preceding point in the gnuplot comint buffer. - -This is only used in Emacs versions before 24.1." - (let ((completions (gnuplot-completion-at-point))) - (if completions - (let* ((beg (nth 0 completions)) - (end (nth 1 completions)) - (candidates (nth 2 completions)) - (completion-base-position (list beg end))) - (comint-dynamic-simple-complete - (buffer-substring-no-properties beg end) - candidates)) - nil))) - (defun gnuplot-info-lookup-symbol (symbol &optional mode) "Wrapper for `info-lookup-symbol'. @@ -3055,7 +2587,7 @@ called." ;; we can't use shrink-window-if-larger-than-buffer here ;; because it doesn't work with Info mode's narrowing (with-selected-window (get-buffer-window "*info*") - (unless (gnuplot-window-full-height-p) + (unless (window-full-height-p) (enlarge-window (min (- (count-lines (point-min) (point-max)) (window-height) -1) (- (/ (frame-height) 2) (window-height))))))) @@ -3066,7 +2598,6 @@ called." (setq gnuplot-info-frame (make-frame))) (select-frame gnuplot-info-frame) (raise-frame gnuplot-info-frame) - (if gnuplot-xemacs-p (setq toolbar-info-frame gnuplot-info-frame)) (switch-to-buffer "*info*")) (t @@ -3179,29 +2710,13 @@ a list: (set (make-local-variable 'beginning-of-defun-function) 'gnuplot-beginning-of-defun) (set (make-local-variable 'end-of-defun-function) 'gnuplot-end-of-continuation) - (unless (featurep 'xemacs) - (add-hook 'completion-at-point-functions 'gnuplot-completion-at-point nil t)) + (add-hook 'completion-at-point-functions 'gnuplot-completion-at-point nil t) (set-syntax-table gnuplot-mode-syntax-table) (when (eq gnuplot-keywords-when 'immediately) ; (gnuplot-setup-info-look)) ;; - (if gnuplot-xemacs-p ; deal with font-lock - (when (fboundp 'turn-on-font-lock) - (turn-on-font-lock)) - (progn - ;; Add syntax-propertizing functions to search for strings and comments - (set (make-local-variable 'syntax-propertize-function) - #'gnuplot-syntax-propertize) - (add-hook 'syntax-propertize-extend-region-functions - #'gnuplot-syntax-propertize-extend-region nil t) - - ;; Set up font-lock - (setq font-lock-defaults gnuplot-font-lock-defaults) - (set (make-local-variable 'font-lock-multiline) t) - (set (make-local-variable 'parse-sexp-lookup-properties) t))) - (if (fboundp 'widget-create) ; gnuplot-gui (condition-case () (require 'gnuplot-gui) @@ -3232,6 +2747,7 @@ following in your .emacs file: (gnuplot-mode)) ;;;###autoload +;;; TODO Rename to gnuplot-run-gnuplot (defun run-gnuplot () "Run an inferior Gnuplot process." (interactive) diff --git a/gpelcard.tex b/gpelcard.tex index 2d66c7f..03f88f2 100644 --- a/gpelcard.tex +++ b/gpelcard.tex @@ -233,9 +233,7 @@ \textsc{gnuplot} info file be available and that the info-look package be installed. The info file can be made from the documentation supplied with the \textsc{gnuplot} distribution and - the info-look package is a standard part of Emacs 20. Users of - XEmacs or Emacs 19 should download \file{info-look.el} from the - gnuplot-mode homepage. + the info-look package is a standard part of Emacs 20. \item[Using pm3d] \hfill \\ All features of the pm3d patch to \textsc{gnuplot} should be available when using gnuplot-mode. One particularly useful feature @@ -394,33 +392,6 @@ \variable{gnuplot-insertions-surface-plots}{\Star}{Contents of the \texttt{surface plots} sub-menu.} - - -\begin{center} - \begin{Boxedminipage}{0.75\linewidth} - \begin{center} - {\large Toolbar variables} - \end{center} - \end{Boxedminipage} -\end{center} - -\noindent These variables control the use and location of the -toolbar in XEmacs. The toolbar has buttons equivalent to the key -sequences \texttt{C-c C-l}, \texttt{C-c C-r}, \texttt{C-c C-b}, -\texttt{C-c C-e}, and \texttt{C-c C-h}. - -\vspace{2ex} - -% -\variable{gnuplot-display-toolbar-flag}{nil}{Non-nil means to display - a toolbar if using XEmacs.} -% -\variable{gnuplot-use-toolbar}{left-toolbar}{Location of XEmacs - toolbar. Valid values are \texttt{left-toolbar}, - \texttt{right-toolbar}, \texttt{top-toolbar}, \texttt{bottom-toolbar}, - \texttt{default-toolbar} and nil.} -% - \begin{center} \begin{Boxedminipage}{0.75\linewidth} \begin{center} @@ -450,9 +421,6 @@ or \texttt{'complete} -- describes the extent of the list of properties of for plot, splot, and fit in the GUI.} % -\variable{gnuplot-gui-frame-plist}{\Star}{Property list of parameters - controlling the argument setting frame. Used by XEmacs.} -% \variable{gnuplot-gui-frame-parameters}{\Star}{List of parameters controlling the argument setting frame. Used by Emacs.} %