comparison lisp/help-mode.el @ 78505:480b6a56b1bf

(help-make-xrefs): Search for symbol constituents, rather than just `-'.
author Glenn Morris <rgm@gnu.org>
date Wed, 08 Aug 2007 08:03:53 +0000
parents 9355f9b7bbff
children 740099935129
comparison
equal deleted inserted replaced
78504:0203a38a9036 78505:480b6a56b1bf
434 ((fboundp sym) 434 ((fboundp sym)
435 (help-xref-button 8 'help-function sym))))))) 435 (help-xref-button 8 'help-function sym)))))))
436 ;; An obvious case of a key substitution: 436 ;; An obvious case of a key substitution:
437 (save-excursion 437 (save-excursion
438 (while (re-search-forward 438 (while (re-search-forward
439 ;; Assume command name is only word characters 439 ;; Assume command name is only word and symbol
440 ;; and dashes to get things like `use M-x foo.'. 440 ;; characters to get things like `use M-x foo->bar'.
441 "\\<M-x\\s-+\\(\\sw\\(\\sw\\|-\\)+\\)" nil t) 441 "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)" nil t)
442 (let ((sym (intern-soft (match-string 1)))) 442 (let ((sym (intern-soft (match-string 1))))
443 (if (fboundp sym) 443 (if (fboundp sym)
444 (help-xref-button 1 'help-function sym))))) 444 (help-xref-button 1 'help-function sym)))))
445 ;; Look for commands in whole keymap substitutions: 445 ;; Look for commands in whole keymap substitutions:
446 (save-excursion 446 (save-excursion
462 ;; Skip a single blank line. 462 ;; Skip a single blank line.
463 (and (eolp) (forward-line)) 463 (and (eolp) (forward-line))
464 (end-of-line) 464 (end-of-line)
465 (skip-chars-backward "^ \t\n") 465 (skip-chars-backward "^ \t\n")
466 (if (and (>= (current-column) col) 466 (if (and (>= (current-column) col)
467 (looking-at "\\(\\sw\\|-\\)+$")) 467 (looking-at "\\(\\sw\\|\\s_\\)+$"))
468 (let ((sym (intern-soft (match-string 0)))) 468 (let ((sym (intern-soft (match-string 0))))
469 (if (fboundp sym) 469 (if (fboundp sym)
470 (help-xref-button 0 'help-function sym)))) 470 (help-xref-button 0 'help-function sym))))
471 (forward-line)))))) 471 (forward-line))))))
472 (set-syntax-table stab)) 472 (set-syntax-table stab))