[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot c827a90 090/184: Load gnuplot-eldoc only if needed
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot c827a90 090/184: Load gnuplot-eldoc only if needed |
Date: |
Sun, 29 Aug 2021 11:03:22 -0400 (EDT) |
branch: elpa/gnuplot
commit c827a90f9723f8b00c96a1d6d8505f6b583fe6f9
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Load gnuplot-eldoc only if needed
---
gnuplot-context.el | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/gnuplot-context.el b/gnuplot-context.el
index 4410d62..ea4dc00 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -270,11 +270,6 @@
These have to be compiled from the Gnuplot source tree using
`doc2texi.el'.")
-(condition-case nil
- (load-library "gnuplot-eldoc")
- (error
- (setq gnuplot-eldoc-hash (make-hash-table))))
-
;;;; Compatibility for Emacs version < 23
(eval-when-compile
@@ -394,7 +389,18 @@ off. With no argument, toggle context-sensitive mode."
(eldoc-add-command 'comint-dynamic-complete)
(when gnuplot-eldoc-mode
- (eldoc-mode))
+ (unless gnuplot-eldoc-hash
+ (condition-case nil
+ (load-library "gnuplot-eldoc")
+ (error
+ (message "gnuplot-eldoc.el not found. Install it from the Gnuplot
distribution.")
+ (setq gnuplot-eldoc-hash nil
+ gnuplot-eldoc-mode nil))))
+
+ (if gnuplot-eldoc-hash
+ (eldoc-mode 1)
+ (eldoc-mode 0)))
+
(when gnuplot-tab-completion
(set (make-local-variable 'tab-always-indent) 'complete)))
@@ -2172,10 +2178,10 @@ there."
(t info)))
(when gnuplot-info-at-point
(gnuplot-trace "\tset info to \"%s\"\n"
gnuplot-info-at-point)
- (when (not gnuplot-eldoc)
- (let ((eldoc
- (car (gethash gnuplot-info-at-point
gnuplot-eldoc-hash))))
- (when eldoc
+ (when (and (not gnuplot-eldoc) gnuplot-eldoc-hash)
+ (let ((eldoc
+ (car (gethash gnuplot-info-at-point
gnuplot-eldoc-hash))))
+ (when eldoc
(setq gnuplot-eldoc eldoc)
(gnuplot-trace "\tand set eldoc to \"%s\"\n"
eldoc))))))))
@@ -2246,7 +2252,7 @@ there."
"Pop up the extended documentation for the construction at point."
(interactive)
(gnuplot-parse-at-point nil)
- (if gnuplot-info-at-point
+ (if (and gnuplot-info-at-point gnuplot-eldoc-hash)
(let ((eldoc
(cadr (gethash gnuplot-info-at-point gnuplot-eldoc-hash))))
(if eldoc (message eldoc)))))
- [nongnu] elpa/gnuplot d70c94a 065/184: Better docstrings for context-sensitive and inline-image modes, (continued)
- [nongnu] elpa/gnuplot d70c94a 065/184: Better docstrings for context-sensitive and inline-image modes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 43effb0 068/184: Add gnuplot-context to makefiles., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f0b1ea7 085/184: Update lists of font-lock keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 70dd22e 060/184: Keyboard shortcut and menu item for toggling inline mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a0fee02 086/184: use `many1' for iteration spec, and tweak its test case, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 2dc71de 077/184: Move window-full-height-p up with other compatibility hacks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 3245468 084/184: Fixes to context-sensitive grammar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a290617 079/184: Make info window/frame handling work alike in context and non-context modes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot af7e8de 073/184: Remove references to obsolete kw-compl and hilit19 packages, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 630c945 093/184: Clean up build process to be closer to gnuplot source tree., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c827a90 090/184: Load gnuplot-eldoc only if needed,
ELPA Syncer <=
- [nongnu] elpa/gnuplot cabfc6c 088/184: fix annoying delay in indentation with blinking paren mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 327d564 091/184: Fix indentation: only outdent a maximum of one closing brace per line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7046fe1 092/184: Misc cleanup and documentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a25b290 094/184: Update README for new release., ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 0134457 098/184: Add configure scripts, etc. back to repository for easier building, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 1b8e0e3 095/184: Update included info file for Gnuplot 4.6, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot d5eb309 102/184: Merge pull request #17 from yyr/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot ae7c4b4 104/184: readme tweaks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 483a71f 103/184: Update documentation on installing, and tweak Makefile.dst, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7350c9d 107/184: Use the syntax-propertize mechanism instead of after-change-functions, ELPA Syncer, 2021/08/29