Skip to content

Commit 24cb7b3

Browse files
committed
Add mode specification to commands, require Emacs 28
1 parent b61f4d8 commit 24cb7b3

File tree

4 files changed

+91
-100
lines changed

4 files changed

+91
-100
lines changed

README.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ features:
1515
- Context-sensitive completion.
1616
- Inline display of Gnuplot plots.
1717

18-
It is recommended to use GNU Emacs 25 or above, and Gnuplot version 5.0 or
18+
It is recommended to use GNU Emacs 28 or above, and Gnuplot version 5.0 or
1919
above.
2020

2121
* Installation

gnuplot-context.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ there."
20532053

20542054
(defun gnuplot-help-function ()
20552055
"Pop up the extended documentation for the construction at point."
2056-
(interactive)
2056+
(interactive nil gnuplot-mode gnuplot-comint-mode)
20572057
(gnuplot-context--parse-at-point nil)
20582058
(if (and gnuplot-context--info-at-point gnuplot-eldoc-hash)
20592059
(let ((eldoc
@@ -2063,7 +2063,7 @@ there."
20632063
;; Info lookup
20642064
(defun gnuplot-info-at-point (&optional query)
20652065
"Open the relevant gnuplot info page for the construction at point."
2066-
(interactive "P")
2066+
(interactive "P" gnuplot-mode gnuplot-comint-mode)
20672067
(setq gnuplot-context--info-at-point nil)
20682068
(unless query
20692069
(gnuplot-context--parse-at-point nil))
@@ -2190,6 +2190,7 @@ summaries appear in the echo area as you type, toggle
21902190
To choose whether to use this mode by default in Gnuplot buffers,
21912191
customize the variable
21922192
`gnuplot-use-context-sensitive-completion'."
2193+
:interactive (gnuplot-mode gnuplot-comint-mode)
21932194
:keymap
21942195
`((,(kbd "C-c C-/") . gnuplot-help-function)
21952196
(,(kbd "C-c C-d") . gnuplot-info-at-point))

gnuplot-gui.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ This alist is formed at load time by appending together
796796
gnuplot-gui-test-type))
797797

798798
(defun gnuplot-gui-swap-simple-complete ()
799-
(interactive)
799+
(interactive nil gnuplot-mode)
800800
(setq gnuplot-gui-plot-splot-fit-style
801801
(if (equal gnuplot-gui-plot-splot-fit-style 'complete)
802802
'simple 'complete))
@@ -825,7 +825,7 @@ This alist is formed at load time by appending together
825825
Determine contents of current line and set up the appropriate GUI
826826
frame. Bound to \\[gnuplot-gui-set-options-and-insert]
827827
Note that \"cntrparam\" is not currently supported."
828-
(interactive (list last-nonmenu-event))
828+
(interactive (list last-nonmenu-event) gnuplot-mode)
829829
(save-excursion
830830
(if event (mouse-set-point event))
831831
(let ((begin (gnuplot--point-at-beginning-of-command))
@@ -904,7 +904,7 @@ Note that \"cntrparam\" is not currently supported."
904904
"%S is not a gnuplot command which takes options" w)))) ))))
905905

906906
(defun gnuplot-gui-toggle-popup ()
907-
(interactive)
907+
(interactive nil gnuplot-mode)
908908
(setq gnuplot-gui-popup-flag (not gnuplot-gui-popup-flag))
909909
(message (if gnuplot-gui-popup-flag
910910
"Argument popup will appear after insertions."

0 commit comments

Comments
 (0)