Hyperlink symbol names without word syntax in Help
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): Allow single-character symbol names. * lisp/help-mode.el (help-xref-symbol-regexp): Also match symbol names starting with symbol syntax (bug#6601, bug#24309). * test/lisp/help-mode-tests.el (help-mode-tests-xref-button): Test hyperlink creation for function names without symbol syntax.
This commit is contained in:
parent
4c55eeee39
commit
25dadca0d1
3 changed files with 16 additions and 14 deletions
|
@ -456,8 +456,7 @@ This will generate compile-time constants from BINDINGS."
|
|||
("\\(\\\\\\)\\([^\"\\]\\)"
|
||||
(1 (elisp--font-lock-backslash) prepend))
|
||||
;; Words inside ‘’ and `' tend to be symbol names.
|
||||
(,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
|
||||
lisp-mode-symbol-regexp "\\)['’]")
|
||||
(,(concat "[`‘]\\(" lisp-mode-symbol-regexp "\\)['’]")
|
||||
(1 font-lock-constant-face prepend))
|
||||
;; Constant values.
|
||||
(,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>")
|
||||
|
@ -507,8 +506,7 @@ This will generate compile-time constants from BINDINGS."
|
|||
(,(concat "(" cl-errs-re "\\_>")
|
||||
(1 font-lock-warning-face))
|
||||
;; Words inside ‘’ and `' tend to be symbol names.
|
||||
(,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
|
||||
lisp-mode-symbol-regexp "\\)['’]")
|
||||
(,(concat "[`‘]\\(" lisp-mode-symbol-regexp "\\)['’]")
|
||||
(1 font-lock-constant-face prepend))
|
||||
;; Uninterned symbols, e.g., (defpackage #:my-package ...)
|
||||
;; must come before keywords below to have effect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue