|
33 | 33 | ;; backward compatible to 3.5, it will work well for that version |
34 | 34 | ;; also. |
35 | 35 | ;; |
36 | | -;; gnuplot-gui.el was developed using Emacs 19.34 and is known to work |
37 | | -;; on Emacs 20.x and XEmacs 20.x. I do not know what is the earliest |
38 | | -;; version for which it will work, but I make no guarantees for |
39 | | -;; versions before 19.34. Note that this makes heavy use of the |
40 | | -;; widget package, so this will not work on Emacs 19.34 unless you |
41 | | -;; install the widget package separately. |
| 36 | +;; gnuplot-gui.el was developed using GNU Emacs 25 and should be |
| 37 | +;; compatible with GNU Emacs 24.3 and above. |
42 | 38 | ;; |
43 | 39 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
44 | 40 | ;; |
|
74 | 70 | (error nil))) |
75 | 71 | (require 'cl) |
76 | 72 | (eval-when-compile ; suppress some compiler warnings |
77 | | - (defvar gnuplot-xemacs-p nil) |
78 | 73 | (defvar gnuplot-quote-character nil) |
79 | 74 | (defvar gnuplot-info-display nil) |
80 | 75 | (defvar gnuplot-mode-map nil)) |
@@ -115,17 +110,7 @@ This would be done after menu insertion of Gnuplot commands." |
115 | 110 |
|
116 | 111 | (defvar gnuplot-gui-frame nil |
117 | 112 | "Frame used to hold the buffer for setting options.") |
118 | | -(defcustom gnuplot-gui-frame-plist |
119 | | - '(height 18 width 65 border-width 0 |
120 | | - user-position t top 150 left 150 |
121 | | - internal-border-width 0 unsplittable t |
122 | | - default-toolbar-visible-p nil has-modeline-p nil |
123 | | - menubar-visible-p nil) |
124 | | - "Frame plist for the input run-time display frame in XEmacs." |
125 | | - :type '(repeat (group :inline t |
126 | | - (symbol :tag "Property") |
127 | | - (sexp :tag "Value"))) |
128 | | - :group 'gnuplot-gui) |
| 113 | + |
129 | 114 | (defcustom gnuplot-gui-frame-parameters |
130 | 115 | '((height . 18) |
131 | 116 | (width . 65) |
@@ -885,13 +870,10 @@ currently supported." |
885 | 870 | (gnuplot-gui-set-options-and-insert)))) |
886 | 871 |
|
887 | 872 | (defun gnuplot-gui-get-frame-param (param) |
888 | | - (if gnuplot-xemacs-p |
889 | | - (plist-get gnuplot-gui-frame-plist param) |
890 | | - (cdr (assoc param gnuplot-gui-frame-parameters)))) |
| 873 | + (cdr (assoc param gnuplot-gui-frame-parameters))) |
| 874 | + |
891 | 875 | (defun gnuplot-gui-set-frame-param (param value) |
892 | | - (if gnuplot-xemacs-p |
893 | | - (plist-put gnuplot-gui-frame-plist param value) |
894 | | - (setcdr (assoc param gnuplot-gui-frame-parameters) value))) |
| 876 | + (setcdr (assoc param gnuplot-gui-frame-parameters) value)) |
895 | 877 |
|
896 | 878 | (defun gnuplot-gui-set-options-and-insert () |
897 | 879 | "Insert arguments using a GUI interface. |
@@ -984,9 +966,7 @@ Note that \"cntrparam\" is not currently supported." |
984 | 966 |
|
985 | 967 |
|
986 | 968 | (defun gnuplot-gui-y-n (foo)) |
987 | | -(if gnuplot-xemacs-p |
988 | | - (defalias 'gnuplot-gui-y-n 'y-or-n-p-maybe-dialog-box) |
989 | | - (defalias 'gnuplot-gui-y-n 'y-or-n-p)) |
| 969 | +(defalias 'gnuplot-gui-y-n 'y-or-n-p) |
990 | 970 |
|
991 | 971 | (defun gnuplot-gui-correct-command (word set term begin) |
992 | 972 | "Check syntax of set command and terminal specifications. |
@@ -1281,25 +1261,15 @@ SAVE-FRAME is non-nil when the widgets are being reset." |
1281 | 1261 | gnuplot-current-buffer (current-buffer) |
1282 | 1262 | gnuplot-current-buffer-point (point-marker)) |
1283 | 1263 | (unless (and gnuplot-gui-frame (frame-live-p gnuplot-gui-frame)) |
1284 | | - (setq gnuplot-gui-frame (if gnuplot-xemacs-p |
1285 | | - (make-frame gnuplot-gui-frame-plist) |
1286 | | - (make-frame gnuplot-gui-frame-parameters)))) |
| 1264 | + (setq gnuplot-gui-frame (make-frame gnuplot-gui-frame-parameters))) |
1287 | 1265 | (select-frame gnuplot-gui-frame) |
1288 | 1266 | ;;(set-frame-position gnuplot-gui-frame 150 150) ;; so herky-jerky |
1289 | | - (if gnuplot-xemacs-p |
1290 | | - (set-mouse-position (selected-window) 0 0) |
1291 | | - (set-mouse-position gnuplot-gui-frame 0 0))) |
| 1267 | + (set-mouse-position gnuplot-gui-frame 0 0)) |
1292 | 1268 | (kill-buffer (get-buffer-create "*Gnuplot GUI*")) |
1293 | 1269 | (switch-to-buffer (get-buffer-create "*Gnuplot GUI*")) |
1294 | 1270 | (kill-all-local-variables) |
1295 | | - (if gnuplot-xemacs-p |
1296 | | - (progn |
1297 | | - (set (make-local-variable 'frame-title-format) |
1298 | | - "Set Gnuplot Options") |
1299 | | - (set (make-local-variable 'frame-icon-title-format) |
1300 | | - "Set Gnuplot Options")) |
1301 | | - (modify-frame-parameters (selected-frame) |
1302 | | - '((title . "Set Gnuplot Options"))) ) |
| 1271 | + (modify-frame-parameters (selected-frame) |
| 1272 | + '((title . "Set Gnuplot Options"))) |
1303 | 1273 | (widget-insert "\nSet options for \"" item "\" ") |
1304 | 1274 | (let (tag help val) |
1305 | 1275 | (cond ((string-match "^[xyz]2?tics" item) |
@@ -1466,8 +1436,7 @@ SAVE-FRAME is non-nil when the widgets are being reset." |
1466 | 1436 | (:bold t :foreground "tan")) |
1467 | 1437 | (t |
1468 | 1438 | (:italic t))) |
1469 | | - "Face used for push-buttons. |
1470 | | -Only used in Emacs. XEmacs displays push-buttons with a pixmap." |
| 1439 | + "Face used for push-buttons." |
1471 | 1440 | :group 'gnuplot-faces) |
1472 | 1441 | (defface gnuplot-gui-labels-face '((((class color) (background light)) |
1473 | 1442 | (:bold t :foreground "darkslateblue")) |
|
0 commit comments