[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
non-ref to a face name shadows references to functions and vars in docst
From: |
Juanma Barranquero |
Subject: |
non-ref to a face name shadows references to functions and vars in docstrings |
Date: |
Mon, 20 Jun 2005 15:41:37 +0200 |
For example, in a describe-function of
(defun test ()
"This tries to reference `next-error', the function."
t)
`next-error' does not get a link, because the existing face
`next-error' is shadowing the possible function or variable symbols.
(That's because the docstring does not use "the face `next-error'" or
"the `next-error' face".) It is a consequence of this change:
2003-10-20 Luc Teirlinck <address@hidden>
* help-mode.el (help-make-xrefs): Make sure that if a symbol is
followed by the word `face', it gets treated as a face, even if
it is also defined as a variable or a function.
which reordered some checks on `help-make-xrefs'.
Arguably, as in absence of "the face", "the function" or "the
variable" we don't really know which one was the goal,
`help-make-xrefs' should continue checking for the other
possibilities.
I propose the following patch.
--
/L/e/k/t/u
Index: lisp/help-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help-mode.el,v
retrieving revision 1.33
diff -u -2 -r1.33 help-mode.el
--- lisp/help-mode.el 26 May 2005 12:51:09 -0000 1.33
+++ lisp/help-mode.el 20 Jun 2005 13:23:24 -0000
@@ -389,7 +389,8 @@
;;; (goto-char (cdr location))))
(help-xref-button 8 'help-function-def sym))
- ((facep sym)
- (if (save-match-data (looking-at "[ \t\n]+face\\W"))
- (help-xref-button 8 'help-face sym)))
+ ((and
+ (facep sym)
+ (save-match-data (looking-at "[ \t\t]+face\\W")))
+ (help-xref-button 8 'help-face sym))
((and (boundp sym) (fboundp sym))
;; We can't intuit whether to use the
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.7817
diff -u -2 -r1.7817 ChangeLog
--- lisp/ChangeLog 20 Jun 2005 10:45:28 -0000 1.7817
+++ lisp/ChangeLog 20 Jun 2005 13:39:28 -0000
@@ -5,4 +5,8 @@
2005-06-20 Juanma Barranquero <address@hidden>
+ * help-mode.el (help-make-xrefs): If a symbol representing a face
+ name is not followed by the word "face", it could still be a
+ function or variable name, so don't bypass other checks.
+
* simple.el (kill-whole-line): Doc fix.
(next-error-buffer-p, next-error-find-buffer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- non-ref to a face name shadows references to functions and vars in docstrings,
Juanma Barranquero <=