diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-03 00:36:08 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-03 00:36:08 +0100 |
commit | ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e (patch) | |
tree | 92441ddd68062a2c6f229dc4947c283359f3ba7a /elisp/geiser-autodoc.el | |
parent | d2afd2b7f9f793962dd0f949461851ae8be2649b (diff) | |
download | geiser-chez-ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e.tar.gz geiser-chez-ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e.tar.bz2 |
Micro-optimisation.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r-- | elisp/geiser-autodoc.el | 14 |
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) |