Commit 42be9479 authored by Glenn Morris's avatar Glenn Morris
Browse files

(help-make-xrefs): Search for symbol constituents, rather than just `-'.

parent 6c4a608e
...@@ -436,9 +436,9 @@ that." ...@@ -436,9 +436,9 @@ that."
;; An obvious case of a key substitution: ;; An obvious case of a key substitution:
(save-excursion (save-excursion
(while (re-search-forward (while (re-search-forward
;; Assume command name is only word characters ;; Assume command name is only word and symbol
;; and dashes to get things like `use M-x foo.'. ;; characters to get things like `use M-x foo->bar'.
"\\<M-x\\s-+\\(\\sw\\(\\sw\\|-\\)+\\)" nil t) "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)" nil t)
(let ((sym (intern-soft (match-string 1)))) (let ((sym (intern-soft (match-string 1))))
(if (fboundp sym) (if (fboundp sym)
(help-xref-button 1 'help-function sym))))) (help-xref-button 1 'help-function sym)))))
...@@ -464,7 +464,7 @@ that." ...@@ -464,7 +464,7 @@ that."
(end-of-line) (end-of-line)
(skip-chars-backward "^ \t\n") (skip-chars-backward "^ \t\n")
(if (and (>= (current-column) col) (if (and (>= (current-column) col)
(looking-at "\\(\\sw\\|-\\)+$")) (looking-at "\\(\\sw\\|\\s_\\)+$"))
(let ((sym (intern-soft (match-string 0)))) (let ((sym (intern-soft (match-string 0))))
(if (fboundp sym) (if (fboundp sym)
(help-xref-button 0 'help-function sym)))) (help-xref-button 0 'help-function sym))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment