diff options
| -rw-r--r-- | lisp/info.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/info.el b/lisp/info.el index c211887a39a..9ecb187e958 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -136,6 +136,12 @@ The Lisp code is executed when the node is selected.") | |||
| 136 | :version "22.1" | 136 | :version "22.1" |
| 137 | :group 'info) | 137 | :group 'info) |
| 138 | 138 | ||
| 139 | (defface info-emphasis | ||
| 140 | '((t (:inherit italic))) | ||
| 141 | "*Face for emphasized text (enclosed with underscores)." | ||
| 142 | :version "25.1" | ||
| 143 | :group 'info) | ||
| 144 | |||
| 139 | (defcustom Info-fontify-visited-nodes t | 145 | (defcustom Info-fontify-visited-nodes t |
| 140 | "Non-nil to fontify references to visited nodes in `info-xref-visited' face." | 146 | "Non-nil to fontify references to visited nodes in `info-xref-visited' face." |
| 141 | :version "22.1" | 147 | :version "22.1" |
| @@ -4688,6 +4694,17 @@ first line or header line, and for breadcrumb links.") | |||
| 4688 | (put-text-property (match-beginning 1) (match-end 1) | 4694 | (put-text-property (match-beginning 1) (match-end 1) |
| 4689 | 'invisible t))))))) | 4695 | 'invisible t))))))) |
| 4690 | 4696 | ||
| 4697 | ;; Fontify emphasis: _..._ | ||
| 4698 | (goto-char (point-min)) | ||
| 4699 | (when (and font-lock-mode not-fontified-p) | ||
| 4700 | (while (re-search-forward "_\\(\\sw+\\)_" nil t) | ||
| 4701 | (add-text-properties (match-beginning 0) (1+ (match-beginning 0)) | ||
| 4702 | '(invisible t front-sticky nil rear-nonsticky t)) | ||
| 4703 | (add-text-properties (1- (match-end 0)) (match-end 0) | ||
| 4704 | '(invisible t front-sticky nil rear-nonsticky t)) | ||
| 4705 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 4706 | 'font-lock-face 'info-emphasis))) | ||
| 4707 | |||
| 4691 | ;; Fontify titles | 4708 | ;; Fontify titles |
| 4692 | (goto-char (point-min)) | 4709 | (goto-char (point-min)) |
| 4693 | (when (and font-lock-mode not-fontified-p) | 4710 | (when (and font-lock-mode not-fontified-p) |