emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/find-func.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/find-func.el,v
Date: Wed, 12 Jul 2006 16:03:47 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       06/07/12 16:03:47

Index: find-func.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/find-func.el,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- find-func.el        13 Apr 2006 14:31:23 -0000      1.72
+++ find-func.el        12 Jul 2006 16:03:47 -0000      1.73
@@ -205,6 +205,9 @@
 ;;;###autoload
 (defun find-function-search-for-symbol (symbol type library)
   "Search for SYMBOL's definition of type TYPE in LIBRARY.
+Visit the library in a buffer, and return a cons cell (BUFFER . POSITION),
+or just (BUFFER . nil) if the definition can't be found in the file.
+
 If TYPE is nil, look for a function definition.
 Otherwise, TYPE specifies the kind of definition,
 and it is interpreted via `find-function-regexp-alist'.
@@ -244,8 +247,7 @@
                (progn
                  (beginning-of-line)
                  (cons (current-buffer) (point)))
-             (error "Cannot find definition of `%s' in library `%s'"
-                    symbol library))))))))
+             (cons (current-buffer) nil))))))))
 
 ;;;###autoload
 (defun find-function-noselect (function)
@@ -253,7 +255,8 @@
 
 Finds the source file containing the definition of FUNCTION
 in a buffer and the point of the definition.  The buffer is
-not selected.
+not selected.  If the function definition can't be found in
+the buffer, returns (BUFFER).
 
 If the file where FUNCTION is defined is not known, then it is
 searched for in `find-function-source-path' if non nil, otherwise
@@ -335,7 +338,7 @@
       (when (memq new-buf orig-buffers)
        (push-mark orig-point))
       (funcall switch-fn new-buf)
-      (goto-char new-point)
+      (when new-point (goto-char new-point))
       (recenter find-function-recenter-line)
       (run-hooks 'find-function-after-hook))))
 
@@ -376,6 +379,7 @@
 
 Finds the library containing the definition of VARIABLE in a buffer and
 the point of the definition.  The buffer is not selected.
+If the variable's definition can't be found in the buffer, return (BUFFER).
 
 The library where VARIABLE is defined is searched for in FILE or
 `find-function-source-path', if non nil, otherwise in `load-path'."
@@ -421,6 +425,7 @@
 ;;;###autoload
 (defun find-definition-noselect (symbol type &optional file)
   "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL.
+If the definition can't be found in the buffer, return (BUFFER).
 TYPE says what type of definition: nil for a function, `defvar' for a
 variable, `defface' for a face.  This function does not switch to the
 buffer nor display it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]