[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot e9447f0 048/184: More consistent keys between gnup
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot e9447f0 048/184: More consistent keys between gnuplot.el and gnuplot-context.el |
Date: |
Sun, 29 Aug 2021 11:03:13 -0400 (EDT) |
branch: elpa/gnuplot
commit e9447f01ab8b0c36d1856b6baf67943b5c96c9d8
Author: Jonathan Oddie <j.j.oddie@gmail.com>
Commit: Jonathan Oddie <j.j.oddie@gmail.com>
More consistent keys between gnuplot.el and gnuplot-context.el
C-c C-d (instead of C-c C-h or C-c C-/) for the info-lookup function
(gnuplot-info-lookup-symbol if context is not loaded,
gnuplot-info-at-point when context is loaded)
gnuplot-info-at-point now prompts for a symbol to look up if called
with a prefix arg or if parsing fails.
C-c C-s (instead of C-c h) for "extended eldoc" in context
mode (gnuplot-help-function)
TAB for completion in comint buffer. (Is this a problem?)
Setup eldoc thru a named defun rather than a lambda in
gnuplot-mode-hook.
---
.gitignore | 1 +
gnuplot-context.el | 31 ++++++++++++++++++++++---------
gnuplot.el | 9 +++++----
3 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index c4d293f..ed79435 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/#*#
*/#*#
/hacks.el
+.#*
diff --git a/gnuplot-context.el b/gnuplot-context.el
index 9e5a5e8..f3255a7 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -2034,22 +2034,35 @@ there."
(cadr (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
(if eldoc (message eldoc)))))
-(define-key gnuplot-mode-map (kbd "C-c h") 'gnuplot-help-function)
+(defun gnuplot-setup-eldoc ()
+ (set (make-local-variable 'eldoc-documentation-function)
+ 'gnuplot-eldoc-function)
+ ;; Check for ElDoc after doing completion
+ (eldoc-add-command 'completion-at-point))
-(defun gnuplot-info-at-point ()
+(define-key gnuplot-mode-map (kbd "C-c C-s") 'gnuplot-help-function)
+(add-hook 'gnuplot-mode-hook 'gnuplot-setup-eldoc)
+
+;; Info lookup
+(defun gnuplot-info-at-point (&optional query)
"Open the relevant gnuplot info page for the construction at point."
- (interactive)
+ (interactive "P")
(gnuplot-parse-at-point nil)
+ (if (or query (not gnuplot-info-at-point))
+ (let ((info
+ (info-lookup-interactive-arguments 'symbol)))
+ (setq gnuplot-info-at-point (car info))))
(and gnuplot-info-at-point
(info-other-window (format "(gnuplot)%s" gnuplot-info-at-point))))
-(define-key gnuplot-mode-map (kbd "C-c C-/") 'gnuplot-info-at-point)
+(defun gnuplot-info-look-guess ()
+ (gnuplot-parse-at-point nil)
+ gnuplot-info-at-point)
+
+(define-key gnuplot-mode-map (kbd "C-c C-d") 'gnuplot-info-at-point)
+(define-key gnuplot-comint-mode-map (kbd "C-c C-d") 'gnuplot-info-at-point)
+(define-key gnuplot-comint-mode-map (kbd "TAB") 'comint-dynamic-complete)
-(add-hook
- 'gnuplot-mode-hook
- (lambda ()
- (set (make-local-variable 'eldoc-documentation-function)
- 'gnuplot-eldoc-function)))
;;; Some context-sensitive hacks
diff --git a/gnuplot.el b/gnuplot.el
index a6f457a..0a5837f 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -56,7 +56,7 @@
;; C-c C-c comment region
;; C-c C-o set arguments for command at point
;; S-mouse-2 set arguments for command under mouse cursor
-;; C-c C-h read the gnuplot info file
+;; C-c C-d read the gnuplot info file
;; C-c C-e show-gnuplot-buffer
;; C-c C-k kill gnuplot process
;; C-c C-u submit a bug report about gnuplot-mode
@@ -635,10 +635,10 @@ you're not using that musty old thing, are you..."
(define-key gnuplot-mode-map "\C-c\C-b" 'gnuplot-send-buffer-to-gnuplot)
(define-key gnuplot-mode-map "\C-c\C-c" 'comment-region) ; <RF>
(define-key gnuplot-mode-map "\C-c\C-o" 'gnuplot-gui-set-options-and-insert)
- (define-key gnuplot-mode-map "\C-c\C-d" 'gnuplot-show-version)
+ (define-key gnuplot-mode-map "\C-c\C-w" 'gnuplot-show-version)
(define-key gnuplot-mode-map "\C-c\C-e" 'gnuplot-show-gnuplot-buffer)
(define-key gnuplot-mode-map "\C-c\C-f" 'gnuplot-send-file-to-gnuplot)
- (define-key gnuplot-mode-map "\C-c\C-h" 'gnuplot-info-lookup-symbol)
+ (define-key gnuplot-mode-map "\C-c\C-d" 'gnuplot-info-lookup-symbol)
(define-key gnuplot-mode-map "\C-c\C-i" 'gnuplot-insert-filename)
(define-key gnuplot-mode-map "\C-c\C-j" 'gnuplot-forward-script-line)
(define-key gnuplot-mode-map "\C-c\C-k" 'gnuplot-kill-gnuplot-buffer)
@@ -2067,7 +2067,8 @@ buffer."
(define-key gnuplot-comint-mode-map "\C-d" 'gnuplot-delchar-or-maybe-eof)
(define-key gnuplot-comint-mode-map "\M-\r" 'comint-dynamic-complete)
(define-key gnuplot-comint-mode-map "\M-\t" 'comint-dynamic-complete)
-(define-key gnuplot-comint-mode-map "\C-c\C-d" 'gnuplot-show-version)
+(define-key gnuplot-comint-mode-map "\C-c\C-d" 'gnuplot-info-lookup-symbol)
+(define-key gnuplot-comint-mode-map "\C-c\C-w" 'gnuplot-show-version)
(define-key gnuplot-comint-mode-map "\C-c\C-h" 'gnuplot-info-lookup-symbol)
(define-key gnuplot-comint-mode-map "\C-c\C-i" 'gnuplot-insert-filename)
(define-key gnuplot-comint-mode-map "\C-c\C-n" 'gnuplot-negate-option)
- [nongnu] elpa/gnuplot ae5e628 074/184: Make context completion work on xemacs (21.4), (continued)
- [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, 2021/08/29
- [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 <=
- [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
- [nongnu] elpa/gnuplot 9dd0e15 096/184: Avoid having text syntax-property changes mark buffer as modified, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c52bb6c 089/184: grammar fixes for new-style if statement and blocks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e457287 099/184: Add aclocal.m4 into repository, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f5c4437 100/184: Reduce autotools dependency to version 2.61, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot e1ee092 097/184: Merge branch 'devel' containing 0.7 release candidate., ELPA Syncer, 2021/08/29