/[emacs]/emacs/lisp/help-fns.el
ViewVC logotype

Diff of /emacs/lisp/help-fns.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.75 by lektu, Tue Sep 13 14:58:35 2005 UTC revision 1.76 by rms, Sun Oct 23 19:12:10 2005 UTC
# Line 311  face (according to `face-differs-from-de Line 311  face (according to `face-differs-from-de
311    ;; Return value is like the one from help-split-fundoc, but highlighted    ;; Return value is like the one from help-split-fundoc, but highlighted
312    (cons usage doc))    (cons usage doc))
313    
314    (defun describe-simplify-lib-file-name (file)
315      "Simplify a library name FILE to a relative name, and make it a source file."
316      (if file
317          ;; Try converting the absolute file name to a library name.
318          (let ((libname (file-name-nondirectory file)))
319            ;; Now convert that back to a file name and see if we get
320            ;; the original one.  If so, they are equivalent.
321            (if (equal file (locate-file libname load-path '("")))
322                (if (string-match "[.]elc?\\'" libname)
323                    (substring libname 0 -1)
324                  libname)
325              file))))
326    
327  ;;;###autoload  ;;;###autoload
328  (defun describe-function-1 (function)  (defun describe-function-1 (function)
329    (let* ((def (if (symbolp function)    (let* ((def (if (symbolp function)
# Line 363  face (according to `face-differs-from-de Line 376  face (according to `face-differs-from-de
376                (help-xref-button 1 'help-function def)))))                (help-xref-button 1 'help-function def)))))
377      (or file-name      (or file-name
378          (setq file-name (symbol-file function 'defun)))          (setq file-name (symbol-file function 'defun)))
379        (setq file-name (describe-simplify-lib-file-name file-name))
380      (when (equal file-name "loaddefs.el")      (when (equal file-name "loaddefs.el")
381        ;; Find the real def site of the preloaded function.        ;; Find the real def site of the preloaded function.
382        ;; This is necessary only for defaliases.        ;; This is necessary only for defaliases.
# Line 531  it is displayed along with the global va Line 545  it is displayed along with the global va
545              ;; change the format of the buffer's initial line in case              ;; change the format of the buffer's initial line in case
546              ;; anything expects the current format.)              ;; anything expects the current format.)
547              (let ((file-name (symbol-file variable 'defvar)))              (let ((file-name (symbol-file variable 'defvar)))
548                  (setq file-name (describe-simplify-lib-file-name file-name))
549                (when (equal file-name "loaddefs.el")                (when (equal file-name "loaddefs.el")
550                  ;; Find the real def site of the preloaded variable.                  ;; Find the real def site of the preloaded variable.
551                  (let ((location                  (let ((location

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26