summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-03 00:36:08 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-03 00:36:08 +0100
commitef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e (patch)
tree92441ddd68062a2c6f229dc4947c283359f3ba7a
parentd2afd2b7f9f793962dd0f949461851ae8be2649b (diff)
downloadgeiser-chez-ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e.tar.gz
geiser-chez-ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e.tar.bz2
Micro-optimisation.
-rw-r--r--elisp/geiser-autodoc.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index d6424b4..f4ffbae 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -73,7 +73,7 @@ when `geiser-autodoc-display-module-p' is on."
(defvar geiser-autodoc--last nil))
(make-variable-buffer-local
- (defvar geiser-autodoc--last-funs nil))
+ (defvar geiser-autodoc--last-result nil))
(defun geiser-autodoc--function-args (form)
(if (equal (car geiser-autodoc--last) form) (cdr geiser-autodoc--last)
@@ -82,11 +82,13 @@ when `geiser-autodoc-display-module-p' is on."
`(:eval ((:ge autodoc) (quote (:scm ,form))))
500)))
(when (and res (listp res))
- (setq geiser-autodoc--last
- (cons form
- (geiser-autodoc--str (cdr (assoc 'signature res))
- (or (cdr (assoc 'position res)) 0)
- (cdr (assoc 'module res)))))
+ (unless (equalp res geiser-autodoc--last-result)
+ (setq geiser-autodoc--last-result res)
+ (setq geiser-autodoc--last
+ (cons form
+ (geiser-autodoc--str (cdr (assoc 'signature res))
+ (or (cdr (assoc 'position res)) 0)
+ (cdr (assoc 'module res))))))
(cdr geiser-autodoc--last))))))
(defun geiser-autodoc--insert-arg (arg current pos)