|
8 | 8 | ;; Version: 0.9 |
9 | 9 | ;; Keywords: data gnuplot plotting |
10 | 10 | ;; URL: https://github.com/emacs-gnuplot/gnuplot |
11 | | -;; Package-Requires: ((emacs "28.1")) |
| 11 | +;; Package-Requires: ((emacs "28.1") (compat "30")) |
12 | 12 |
|
13 | 13 | ;; This file is not part of GNU Emacs. |
14 | 14 |
|
|
65 | 65 |
|
66 | 66 | ;;; Code: |
67 | 67 |
|
| 68 | +(require 'compat) |
68 | 69 | (require 'cl-lib) |
69 | 70 | (require 'comint) |
70 | 71 | (require 'info) |
@@ -319,26 +320,24 @@ non-nil." |
319 | 320 |
|
320 | 321 | ;;; --- key bindings and menus |
321 | 322 |
|
322 | | -(defvar gnuplot-mode-map |
323 | | - (let ((map (make-sparse-keymap))) |
324 | | - (define-key map "\C-c\C-b" #'gnuplot-send-buffer-to-gnuplot) |
325 | | - (define-key map "\C-c\C-o" #'gnuplot-gui-set-options-and-insert) |
326 | | - (define-key map "\C-c\C-e" #'gnuplot-show-comint-buffer) |
327 | | - (define-key map "\C-c\C-f" #'gnuplot-send-file-to-gnuplot) |
328 | | - (define-key map "\C-c\C-d" #'gnuplot-info-lookup-symbol) |
329 | | - (define-key map "\C-c\C-i" #'gnuplot-insert-filename) |
330 | | - (define-key map "\C-c\C-j" #'gnuplot-forward-script-line) |
331 | | - (define-key map "\C-c\C-k" #'gnuplot-kill-comint-buffer) |
332 | | - (define-key map "\C-c\C-l" #'gnuplot-send-line-to-gnuplot) |
333 | | - (define-key map "\C-c\C-n" #'gnuplot-negate-option) |
334 | | - (define-key map "\C-c\C-r" #'gnuplot-send-region-to-gnuplot) |
335 | | - (define-key map (kbd "C-M-x") #'gnuplot-send-line-to-gnuplot) |
336 | | - (define-key map "\C-c\C-v" #'gnuplot-send-line-and-forward) |
337 | | - (define-key map "\C-c\C-z" #'gnuplot-customize) |
338 | | - (define-key map "}" #'gnuplot-electric-insert) |
339 | | - (define-key map "\M-\t" #'completion-at-point) |
340 | | - (define-key map [S-mouse-2] #'gnuplot-gui-set-options-and-insert) |
341 | | - map)) |
| 323 | +(defvar-keymap gnuplot-mode-map |
| 324 | + "C-c C-b" #'gnuplot-send-buffer-to-gnuplot |
| 325 | + "C-c C-o" #'gnuplot-gui-set-options-and-insert |
| 326 | + "C-c C-e" #'gnuplot-show-comint-buffer |
| 327 | + "C-c C-f" #'gnuplot-send-file-to-gnuplot |
| 328 | + "C-c C-d" #'gnuplot-info-lookup-symbol |
| 329 | + "C-c C-i" #'gnuplot-insert-filename |
| 330 | + "C-c C-j" #'gnuplot-forward-script-line |
| 331 | + "C-c C-k" #'gnuplot-kill-comint-buffer |
| 332 | + "C-c C-l" #'gnuplot-send-line-to-gnuplot |
| 333 | + "C-c C-n" #'gnuplot-negate-option |
| 334 | + "C-c C-r" #'gnuplot-send-region-to-gnuplot |
| 335 | + "C-M-x" #'gnuplot-send-line-to-gnuplot |
| 336 | + "C-c C-v" #'gnuplot-send-line-and-forward |
| 337 | + "C-c C-z" #'gnuplot-customize |
| 338 | + "}" #'gnuplot-electric-insert |
| 339 | + "M-TAB" #'completion-at-point |
| 340 | + "S-<mouse-2>" #'gnuplot-gui-set-options-and-insert) |
342 | 341 |
|
343 | 342 | (defvar gnuplot-mode-menu nil) |
344 | 343 |
|
|
0 commit comments