[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 39dca94: * lisp/info.el (Info-fontify-node): Don't
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master 39dca94: * lisp/info.el (Info-fontify-node): Don't stop at the non-title underline. |
Date: |
Tue, 08 Sep 2015 21:51:42 +0000 |
branch: master
commit 39dca94701de81d02c75316e32d67e3677bd685d
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* lisp/info.el (Info-fontify-node): Don't stop at the non-title underline.
(Bug#21433)
---
lisp/info.el | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/lisp/info.el b/lisp/info.el
index a5a2c55..95f0bcb 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4720,28 +4720,28 @@ first line or header line, and for breadcrumb links.")
;; Fontify titles
(goto-char (point-min))
(when (and font-lock-mode not-fontified-p)
- (while (and (re-search-forward "\n\\([^
\t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
- nil t)
- ;; Only consider it as an underlined title if the ASCII
- ;; underline has the same size as the text. A typical
- ;; counter example is when a continuation "..." is alone
- ;; on a line.
- (= (string-width (match-string 1))
- (string-width (match-string 2))))
- (let* ((c (preceding-char))
- (face
- (cond ((= c ?*) 'info-title-1)
- ((= c ?=) 'info-title-2)
- ((= c ?-) 'info-title-3)
- (t 'info-title-4))))
- (put-text-property (match-beginning 1) (match-end 1)
- 'font-lock-face face))
- ;; This is a serious problem for trying to handle multiple
- ;; frame types at once. We want this text to be invisible
- ;; on frames that can display the font above.
- (when (memq (framep (selected-frame)) '(x pc w32 ns))
- (add-text-properties (1- (match-beginning 2)) (match-end 2)
- '(invisible t front-sticky nil rear-nonsticky
t)))))
+ (while (re-search-forward "\n\\([^
\t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
+ nil t)
+ ;; Only consider it as an underlined title if the ASCII
+ ;; underline has the same size as the text. A typical
+ ;; counter example is when a continuation "..." is alone
+ ;; on a line.
+ (when (= (string-width (match-string 1))
+ (string-width (match-string 2)))
+ (let* ((c (preceding-char))
+ (face
+ (cond ((= c ?*) 'info-title-1)
+ ((= c ?=) 'info-title-2)
+ ((= c ?-) 'info-title-3)
+ (t 'info-title-4))))
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'font-lock-face face))
+ ;; This is a serious problem for trying to handle multiple
+ ;; frame types at once. We want this text to be invisible
+ ;; on frames that can display the font above.
+ (when (memq (framep (selected-frame)) '(x pc w32 ns))
+ (add-text-properties (1- (match-beginning 2)) (match-end 2)
+ '(invisible t front-sticky nil
rear-nonsticky t))))))
;; Fontify cross references
(goto-char (point-min))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 39dca94: * lisp/info.el (Info-fontify-node): Don't stop at the non-title underline.,
Juri Linkov <=