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 | 673d6027eaae6c5ce5955435cf23cacd83899b52 (patch) | |
tree | 54ad085abc8d75c84b12ad78830872c2161fcbfc | |
parent | a4358aa381d45b1c05bea5c8545a108a7bc20123 (diff) | |
download | geiser-673d6027eaae6c5ce5955435cf23cacd83899b52.tar.gz geiser-673d6027eaae6c5ce5955435cf23cacd83899b52.tar.bz2 |
Micro-optimisation.
-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) |