]> code.delx.au - gnu-emacs/blobdiff - lisp/help-mode.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / help-mode.el
index 075b893ad6f0ab5242dfdd18832e224d3294d650..1435eb019ec6d393c0e2dc20d460300de1839e4e 100644 (file)
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -461,9 +461,11 @@ that."
               ;; An obvious case of a key substitution:
               (save-excursion
                 (while (re-search-forward
-                       ;; Assume command name is only word characters
-                       ;; and dashes to get things like `use M-x foo.'.
-                        "\\<M-x\\s-+\\(\\sw\\(\\sw\\|-\\)+\\)" nil t)
+                        ;; Assume command name is only word and symbol
+                        ;; characters to get things like `use M-x foo->bar'.
+                        ;; Command required to end with word constituent
+                        ;; to avoid `.' at end of a sentence.
+                        "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)*\\sw\\)" nil t)
                   (let ((sym (intern-soft (match-string 1))))
                     (if (fboundp sym)
                         (help-xref-button 1 'help-function sym)))))
@@ -489,7 +491,7 @@ that."
                      (end-of-line)
                      (skip-chars-backward "^ \t\n")
                      (if (and (>= (current-column) col)
-                              (looking-at "\\(\\sw\\|-\\)+$"))
+                              (looking-at "\\(\\sw\\|\\s_\\)+$"))
                          (let ((sym (intern-soft (match-string 0))))
                            (if (fboundp sym)
                                (help-xref-button 0 'help-function sym))))