Skip to content

Commit ee0de25

Browse files
committed
Use defvar-keymap, require Compat
1 parent b9869c6 commit ee0de25

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

gnuplot-context.el

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@
218218

219219
;;; Code:
220220

221-
(require 'cl-lib)
222221
(require 'gnuplot)
223-
(require 'info)
224-
(require 'info-look)
225222

226223

227224
;;;; The tokenizer.

gnuplot-gui.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555

5656
(require 'gnuplot)
5757
(require 'wid-edit)
58-
(require 'cl-lib)
5958

6059

6160
;;; customizable variables

gnuplot.el

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
;; Version: 0.9
99
;; Keywords: data gnuplot plotting
1010
;; URL: https://github.com/emacs-gnuplot/gnuplot
11-
;; Package-Requires: ((emacs "28.1"))
11+
;; Package-Requires: ((emacs "28.1") (compat "30"))
1212

1313
;; This file is not part of GNU Emacs.
1414

@@ -65,6 +65,7 @@
6565

6666
;;; Code:
6767

68+
(require 'compat)
6869
(require 'cl-lib)
6970
(require 'comint)
7071
(require 'info)
@@ -319,26 +320,24 @@ non-nil."
319320

320321
;;; --- key bindings and menus
321322

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)
342341

343342
(defvar gnuplot-mode-menu nil)
344343

0 commit comments

Comments
 (0)