Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
39dca947
Commit
39dca947
authored
Sep 09, 2015
by
Juri Linkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/info.el (Info-fontify-node): Don't stop at the non-title underline.
(Bug#21433)
parent
f201dfd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
lisp/info.el
lisp/info.el
+22
-22
No files found.
lisp/info.el
View file @
39dca947
...
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment