[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot e02534c 066/184: Add menu items for context-sensit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot e02534c 066/184: Add menu items for context-sensitive and inline-image modes |
Date: |
Sun, 29 Aug 2021 11:03:16 -0400 (EDT) |
branch: elpa/gnuplot
commit e02534cb372da68be1c71b73b6162ca71e0e71bd
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Add menu items for context-sensitive and inline-image modes
---
gnuplot-context.el | 3 +-
gnuplot.el | 149 ++++++++++++++++++++++++++++++++++-------------------
2 files changed, 97 insertions(+), 55 deletions(-)
diff --git a/gnuplot-context.el b/gnuplot-context.el
index b4de23b..3ee35bd 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -341,7 +341,8 @@ off. With no argument, toggle context-sensitive mode."
(ad-activate 'gnuplot-completion-at-point)
(remove-hook 'gnuplot-mode-hook 'gnuplot-setup-eldoc)
- (remove-hook 'gnuplot-comint-mode-hook 'gnuplot-setup-eldoc)))
+ (remove-hook 'gnuplot-comint-mode-hook 'gnuplot-setup-eldoc)
+ (eldoc-mode 0)))
;; Has to be defined here. Grumble.
(defadvice gnuplot-completion-at-point (around gnuplot-context disable)
diff --git a/gnuplot.el b/gnuplot.el
index dad7adb..fa75143 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -327,6 +327,14 @@
(require 'comint)
(require 'easymenu)
+;; Keep gnuplot-context separate from main gnuplot library, for people
+;; who don't want to load the whole thing. Load it automatically on
+;; choosing the menu item.
+(autoload 'gnuplot-context-sensitive-mode "gnuplot-context"
+ "Toggle gnuplot context-sensitive completion and help mode."
+ t)
+
+
;;; --- variable definitions + eval-and-compile clauses
@@ -644,37 +652,56 @@ you're not using that musty old thing, are you..."
'gnuplot-gui-mouse-set))))
(defvar gnuplot-mode-menu nil)
-(defvar gnuplot-menu nil
+(defvar gnuplot-menu
+ '("Gnuplot"
+ ["Send line to gnuplot" gnuplot-send-line-to-gnuplot t]
+ ["Send line & move forward" gnuplot-send-line-and-forward (not
(eobp))]
+ ["Send region to gnuplot" gnuplot-send-region-to-gnuplot
+ (gnuplot-mark-active)]
+ ["Send buffer to gnuplot" gnuplot-send-buffer-to-gnuplot t]
+ ["Send file to gnuplot" gnuplot-send-file-to-gnuplot t]
+ "---"
+ ["Inline plot display" gnuplot-inline-image-mode
+ :enable (display-images-p)
+ :style toggle
+ :selected gnuplot-inline-image-mode]
+ ["Contextual completion and help" gnuplot-context-sensitive-mode
+ :style toggle
+ :selected (gnuplot-context-mode-p)]
+ ["Echo area help (eldoc-mode)" eldoc-mode
+ :enable (gnuplot-context-mode-p)
+ :style toggle
+ :selected eldoc-mode]
+ "---"
+ ["Insert filename at point" gnuplot-insert-filename t]
+ ["Negate set option" gnuplot-negate-option t]
+ ;;["Set key binding" gnuplot-set-binding
gnuplot-three-eight-p]
+ ["Keyword help" gnuplot-info-lookup-symbol
+ (or gnuplot-keywords gnuplot-keywords-pending)]
+ ["Quick help for thing at point" gnuplot-help-function
+ (gnuplot-context-mode-p)]
+ ["Info documentation on thing at point"
+ gnuplot-info-at-point
+ (gnuplot-context-mode-p)]
+ ["Show gnuplot process buffer" gnuplot-show-gnuplot-buffer t]
+ ["Set arguments at point" gnuplot-gui-set-options-and-insert
+ (fboundp 'gnuplot-gui-set-options-and-insert)]
+ ["Swap plot/splot/fit lists in GUI" gnuplot-gui-swap-simple-complete
+ (fboundp 'gnuplot-gui-swap-simple-complete)]
+ "---"
+ ["Customize gnuplot" gnuplot-customize t]
+ ["Submit bug report" gnuplot-bug-report t]
+ ["Show gnuplot-mode version" gnuplot-show-version t]
+ ["Show gnuplot version" gnuplot-show-gnuplot-version t]
+ "---"
+ ["Kill gnuplot" gnuplot-kill-gnuplot-buffer t]
+ )
"Menu for `gnuplot-mode'.")
-(setq gnuplot-menu
- '("Gnuplot"
- ["Send line to gnuplot" gnuplot-send-line-to-gnuplot t]
- ["Send line & move forward" gnuplot-send-line-and-forward (not
(eobp))]
- ["Send region to gnuplot" gnuplot-send-region-to-gnuplot
- (gnuplot-mark-active)]
- ["Send buffer to gnuplot" gnuplot-send-buffer-to-gnuplot t]
- ["Send file to gnuplot" gnuplot-send-file-to-gnuplot t]
- "---"
- ["Insert filename at point" gnuplot-insert-filename t]
- ["Negate set option" gnuplot-negate-option t]
- ;;["Set key binding" gnuplot-set-binding
gnuplot-three-eight-p]
- ["Keyword help" gnuplot-info-lookup-symbol
- (or gnuplot-keywords gnuplot-keywords-pending)]
- ["Show gnuplot process buffer" gnuplot-show-gnuplot-buffer t]
- ["Set arguments at point" gnuplot-gui-set-options-and-insert
- (fboundp 'gnuplot-gui-set-options-and-insert)]
- ["Swap plot/splot/fit lists in GUI" gnuplot-gui-swap-simple-complete
- (fboundp 'gnuplot-gui-swap-simple-complete)]
- ["Toggle inline plot display" gnuplot-inline-image-mode
- (display-images-p)]
- "---"
- ["Customize gnuplot" gnuplot-customize t]
- ["Submit bug report" gnuplot-bug-report t]
- ["Show gnuplot-mode version" gnuplot-show-version t]
- ["Show gnuplot version" gnuplot-show-gnuplot-version t]
- "---"
- ["Kill gnuplot" gnuplot-kill-gnuplot-buffer t]
- ))
+
+;; Disable or enable menu items that depend on gnuplot-context being
+;; loaded and enabled
+(defsubst gnuplot-context-mode-p ()
+ (and (boundp 'gnuplot-context-sensitive-mode)
gnuplot-context-sensitive-mode))
;;; --- insertions variables and menus
@@ -2061,30 +2088,44 @@ buffer."
;; Menu for gnuplot-comint-mode
(defvar gnuplot-comint-mode-menu nil
"Menu for `gnuplot-comint-mode'.")
-(defvar gnuplot-comint-menu nil)
-(setq gnuplot-comint-menu
- '("Gnuplot"
- ["Plot most recent gnuplot buffer" gnuplot-plot-from-comint
- (buffer-live-p gnuplot-comint-recent-buffer)]
- ["Save and plot most recent gnuplot buffer"
gnuplot-save-and-plot-from-comint
- (buffer-live-p gnuplot-comint-recent-buffer)]
- "---"
- ["Insert filename at point" gnuplot-insert-filename
t]
- ["Negate set option" gnuplot-negate-option t]
- ["Keyword help"
gnuplot-info-lookup-symbol
- (or gnuplot-keywords gnuplot-keywords-pending)]
- ["Switch to recent gnuplot script buffer"
gnuplot-pop-to-recent-buffer
- (buffer-live-p gnuplot-comint-recent-buffer)]
- ["Toggle inline plot display"
gnuplot-inline-image-mode
- (display-images-p)]
- "---"
- ["Customize gnuplot" gnuplot-customize t]
- ["Submit bug report" gnuplot-bug-report t]
- ["Show gnuplot-mode version" gnuplot-show-version t]
- ["Show gnuplot version"
gnuplot-show-gnuplot-version t]
- "---"
- ["Kill gnuplot"
gnuplot-kill-gnuplot-buffer t]
- ))
+(defvar gnuplot-comint-menu
+ '("Gnuplot"
+ ["Plot most recent gnuplot buffer" gnuplot-plot-from-comint
+ (buffer-live-p gnuplot-comint-recent-buffer)]
+ ["Save and plot most recent gnuplot buffer"
gnuplot-save-and-plot-from-comint
+ (buffer-live-p gnuplot-comint-recent-buffer)]
+ "---"
+ ["Inline plot display" gnuplot-inline-image-mode
+ :enable (display-images-p)
+ :style toggle
+ :selected gnuplot-inline-image-mode]
+ ["Contextual completion and help" gnuplot-context-sensitive-mode
+ :style toggle
+ :selected (gnuplot-context-mode-p)]
+ ["Echo area help (eldoc-mode)" eldoc-mode
+ :enable (gnuplot-context-mode-p)
+ :style toggle
+ :selected eldoc-mode]
+ "---"
+ ["Insert filename at point" gnuplot-insert-filename
t]
+ ["Negate set option" gnuplot-negate-option t]
+ ["Keyword help" gnuplot-info-lookup-symbol
+ (or gnuplot-keywords gnuplot-keywords-pending)]
+ ["Quick help for thing at point" gnuplot-help-function
+ (gnuplot-context-mode-p)]
+ ["Info documentation on thing at point"
+ gnuplot-info-at-point
+ (gnuplot-context-mode-p)]
+ ["Switch to recent gnuplot script buffer" gnuplot-pop-to-recent-buffer
+ (buffer-live-p gnuplot-comint-recent-buffer)]
+ "---"
+ ["Customize gnuplot" gnuplot-customize t]
+ ["Submit bug report" gnuplot-bug-report t]
+ ["Show gnuplot-mode version" gnuplot-show-version t]
+ ["Show gnuplot version" gnuplot-show-gnuplot-version t]
+ "---"
+ ["Kill gnuplot" gnuplot-kill-gnuplot-buffer t]
+ ))
;; Switch to the gnuplot program buffer
(defun gnuplot-make-gnuplot-buffer ()
- [nongnu] elpa/gnuplot 40efb8e 067/184: Make loading of gnuplot work with and without gnuplot-context., (continued)
- [nongnu] elpa/gnuplot 40efb8e 067/184: Make loading of gnuplot work with and without gnuplot-context., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 0d2079a 056/184: Fixed a regression in 7cb3975 relating to scanning stack at end-of-command, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 2bf9779 063/184: Remove macro hacks for ancient Emacs versions, as per issue #12, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot cf513f9 049/184: Added (require 'eldoc) to gnuplot-context.el. Improved documentation., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a7cfd1d 055/184: Abbreviate "print" command, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ae5e628 074/184: Make context completion work on xemacs (21.4), ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 6e0ed5f 050/184: Added x2label, y2label to grammar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 89e5445 053/184: Add customization options to turn context completion on and off., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ffe6c66 059/184: First shot at implementing inline plot images in process buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 5030976 051/184: Alter header to conform to package.el specifications, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e02534c 066/184: Add menu items for context-sensitive and inline-image modes,
ELPA Syncer <=
- [nongnu] elpa/gnuplot a70749e 054/184: Fix "replot" command in grammar., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 0ff395e 071/184: Compatibility hacks for pre-23 emacs versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c3e13f0 076/184: change version number to 0.7beta to avoid any confusion, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 319a176 072/184: clean up tests a bit, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e9447f0 048/184: More consistent keys between gnuplot.el and gnuplot-context.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ea83e14 081/184: cleanup parsing tests some more, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot b618811 069/184: Silence some compiler warnings about obsolete font-lock faces, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c520e94 075/184: Remove a redundant check for gnuplot-keywords-pending, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 6792a81 083/184: Simple indentation fix for new block-structured do and if, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7e33d0d 087/184: three fixes: indentation, require cl macros, fix defc, ELPA Syncer, 2021/08/29