diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-27 23:59:55 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-27 23:59:55 +0100 |
commit | 770937b83eaed743b0d5f18b283b42476b747091 (patch) | |
tree | 9f6b5be66eac287317636ad4301a12743613bcd2 | |
parent | 6100a2e3ff7469f745dfa20892d0180973dd609d (diff) | |
download | geiser-770937b83eaed743b0d5f18b283b42476b747091.tar.gz geiser-770937b83eaed743b0d5f18b283b42476b747091.tar.bz2 |
Font lock for autodoc's function name.
-rw-r--r-- | elisp/geiser-autodoc.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 9f5954d..3577193 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -42,6 +42,10 @@ (geiser-custom--defface autodoc-current-arg 'bold geiser-autodoc "highlighting current argument in autodoc messages") +(geiser-custom--defface autodoc-procedure-name + 'font-lock-function-name-face + geiser-autodoc "highlighting procedure name in autodoc messages") + (defcustom geiser-autodoc-delay 0.2 "Delay before autodoc messages are fetched and displayed, in seconds." :type 'number @@ -98,6 +102,15 @@ when `geiser-autodoc-display-module-p' is on." (t (insert " . ") (geiser-autodoc--insert-args args nil (1+ current) pos))))) +(defsubst geiser-autodoc--proc-name (proc module) + (let ((str (if module + (format geiser-autodoc-procedure-name-format module proc) + proc))) + (put-text-property 0 (length str) + 'face 'geiser-font-lock-autodoc-procedure-name + str) + str)) + (defun geiser-autodoc--str (signature pos module) (when signature (save-current-buffer @@ -105,10 +118,7 @@ when `geiser-autodoc-display-module-p' is on." (erase-buffer) (let ((proc (car signature)) (args (cdr signature))) - (insert (format "(%s " - (if module - (format geiser-autodoc-procedure-name-format module proc) - proc))) + (insert (format "(%s " (geiser-autodoc--proc-name proc module))) (if args (if (listp args) (geiser-autodoc--insert-args (car args) (cdr args) 1 pos) |