aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Paul Wallington2003-01-03 11:46:20 +0000
committerJohn Paul Wallington2003-01-03 11:46:20 +0000
commit2dba57c18e7e941b0d01bd7890a6cd0154e021e4 (patch)
tree743a2550e407efc127d7abe8e9aea7f02756af25
parent7413b888c02a4de594d76045cde31a5a80e7902e (diff)
downloademacs-2dba57c18e7e941b0d01bd7890a6cd0154e021e4.tar.gz
emacs-2dba57c18e7e941b0d01bd7890a6cd0154e021e4.zip
(eldoc-get-var-docstring): Only return a
documentation string when `sym' is non-nil.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/eldoc.el23
2 files changed, 17 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f39518c7bf3..2604475ac00 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12003-01-03 John Paul Wallington <jpw@shootybangbang.com>
2
3 * emacs-lisp/eldoc.el (eldoc-get-var-docstring): Only return a
4 documentation string when `sym' is non-nil.
5
12003-01-02 Steven Tamm <steventamm@mac.com> 62003-01-02 Steven Tamm <steventamm@mac.com>
2 7
3 * scroll-bar.el (toggle-scroll-bar, scroll-bar-mode): Have 8 * scroll-bar.el (toggle-scroll-bar, scroll-bar-mode): Have
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index ea09720db24..b40ffc0afb1 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -7,7 +7,7 @@
7;; Keywords: extensions 7;; Keywords: extensions
8;; Created: 1995-10-06 8;; Created: 1995-10-06
9 9
10;; $Id: eldoc.el,v 1.20 2002/01/08 23:57:30 rms Exp $ 10;; $Id: eldoc.el,v 1.21 2002/11/19 23:32:54 monnier Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -327,16 +327,17 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
327;; Return a string containing a brief (one-line) documentation string for 327;; Return a string containing a brief (one-line) documentation string for
328;; the variable. 328;; the variable.
329(defun eldoc-get-var-docstring (sym) 329(defun eldoc-get-var-docstring (sym)
330 (cond ((and (eq sym (aref eldoc-last-data 0)) 330 (when sym
331 (eq 'variable (aref eldoc-last-data 2))) 331 (cond ((and (eq sym (aref eldoc-last-data 0))
332 (aref eldoc-last-data 1)) 332 (eq 'variable (aref eldoc-last-data 2)))
333 (t 333 (aref eldoc-last-data 1))
334 (let ((doc (documentation-property sym 'variable-documentation t))) 334 (t
335 (cond (doc 335 (let ((doc (documentation-property sym 'variable-documentation t)))
336 (setq doc (eldoc-docstring-format-sym-doc 336 (cond (doc
337 sym (eldoc-docstring-first-line doc))) 337 (setq doc (eldoc-docstring-format-sym-doc
338 (eldoc-last-data-store sym doc 'variable))) 338 sym (eldoc-docstring-first-line doc)))
339 doc)))) 339 (eldoc-last-data-store sym doc 'variable)))
340 doc)))))
340 341
341(defun eldoc-last-data-store (symbol doc type) 342(defun eldoc-last-data-store (symbol doc type)
342 (aset eldoc-last-data 0 symbol) 343 (aset eldoc-last-data 0 symbol)