aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2015-09-09 00:51:32 +0300
committerJuri Linkov2015-09-09 00:51:32 +0300
commit39dca94701de81d02c75316e32d67e3677bd685d (patch)
treefeff63071d6130a919ddaf069732b0aec798e8cf
parentf201dfd377cc35c79bcee7ca8da07c41fb33591f (diff)
downloademacs-39dca94701de81d02c75316e32d67e3677bd685d.tar.gz
emacs-39dca94701de81d02c75316e32d67e3677bd685d.zip
* lisp/info.el (Info-fontify-node): Don't stop at the non-title underline.
(Bug#21433)
-rw-r--r--lisp/info.el44
1 files changed, 22 insertions, 22 deletions
diff --git a/lisp/info.el b/lisp/info.el
index a5a2c559e0d..95f0bcbd37c 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4720,28 +4720,28 @@ first line or header line, and for breadcrumb links.")
4720 ;; Fontify titles 4720 ;; Fontify titles
4721 (goto-char (point-min)) 4721 (goto-char (point-min))
4722 (when (and font-lock-mode not-fontified-p) 4722 (when (and font-lock-mode not-fontified-p)
4723 (while (and (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$" 4723 (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
4724 nil t) 4724 nil t)
4725 ;; Only consider it as an underlined title if the ASCII 4725 ;; Only consider it as an underlined title if the ASCII
4726 ;; underline has the same size as the text. A typical 4726 ;; underline has the same size as the text. A typical
4727 ;; counter example is when a continuation "..." is alone 4727 ;; counter example is when a continuation "..." is alone
4728 ;; on a line. 4728 ;; on a line.
4729 (= (string-width (match-string 1)) 4729 (when (= (string-width (match-string 1))
4730 (string-width (match-string 2)))) 4730 (string-width (match-string 2)))
4731 (let* ((c (preceding-char)) 4731 (let* ((c (preceding-char))
4732 (face 4732 (face
4733 (cond ((= c ?*) 'info-title-1) 4733 (cond ((= c ?*) 'info-title-1)
4734 ((= c ?=) 'info-title-2) 4734 ((= c ?=) 'info-title-2)
4735 ((= c ?-) 'info-title-3) 4735 ((= c ?-) 'info-title-3)
4736 (t 'info-title-4)))) 4736 (t 'info-title-4))))
4737 (put-text-property (match-beginning 1) (match-end 1) 4737 (put-text-property (match-beginning 1) (match-end 1)
4738 'font-lock-face face)) 4738 'font-lock-face face))
4739 ;; This is a serious problem for trying to handle multiple 4739 ;; This is a serious problem for trying to handle multiple
4740 ;; frame types at once. We want this text to be invisible 4740 ;; frame types at once. We want this text to be invisible
4741 ;; on frames that can display the font above. 4741 ;; on frames that can display the font above.
4742 (when (memq (framep (selected-frame)) '(x pc w32 ns)) 4742 (when (memq (framep (selected-frame)) '(x pc w32 ns))
4743 (add-text-properties (1- (match-beginning 2)) (match-end 2) 4743 (add-text-properties (1- (match-beginning 2)) (match-end 2)
4744 '(invisible t front-sticky nil rear-nonsticky t))))) 4744 '(invisible t front-sticky nil rear-nonsticky t))))))
4745 4745
4746 ;; Fontify cross references 4746 ;; Fontify cross references
4747 (goto-char (point-min)) 4747 (goto-char (point-min))