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
Open sidebar
emacs
emacs
Commits
b71813cb
Commit
b71813cb
authored
May 11, 2005
by
Stefan Monnier
Browse files
(font-lock-fontify-keywords-region): Use a marker
when trying to ensure forward progress.
parent
cc9442f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
lisp/ChangeLog
lisp/ChangeLog
+7
-2
lisp/font-lock.el
lisp/font-lock.el
+8
-5
No files found.
lisp/ChangeLog
View file @
b71813cb
2005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
* font-lock.el (font-lock-fontify-keywords-region): Use a marker
when trying to ensure forward progress.
2005-05-11 Chong Yidong <cyd@stupidchicken.com>
* mouse-sel.el (mouse-sel-follow-link-p): New function.
...
...
@@ -18,8 +23,8 @@
(ada-mode): Add ada-adjust-case-skeleton to skeleton-end-hook.
* progmodes/ada-stmt.el (ada-adjust-case-skeleton):
Move
d
to ada-mode.el.
(ada-stmt-mode-hook): Delete
d
; do the work in ada-mode.
Move to ada-mode.el.
(ada-stmt-mode-hook): Delete; do the work in ada-mode.
* cus-edit.el (custom-file): Call file-chase-links.
...
...
lisp/font-lock.el
View file @
b71813cb
...
...
@@ -1420,6 +1420,7 @@ LOUDLY, if non-nil, allows progress-meter bar."
(
let
((
case-fold-search
font-lock-keywords-case-fold-search
)
(
keywords
(
cddr
font-lock-keywords
))
(
bufname
(
buffer-name
))
(
count
0
)
(
pos
(
make-marker
))
keyword
matcher
highlights
)
;;
;; Fontify each item in `font-lock-keywords' from `start' to `end'.
...
...
@@ -1454,12 +1455,14 @@ LOUDLY, if non-nil, allows progress-meter bar."
(
while
highlights
(
if
(
numberp
(
car
(
car
highlights
)))
(
font-lock-apply-highlight
(
car
highlights
))
(
let
((
pos
(
point
)))
(
font-lock-fontify-anchored-keywords
(
car
highlights
)
end
)
;; Ensure forward progress.
(
if
(
<
(
point
)
pos
)
(
goto-char
pos
))))
(
set-marker
pos
(
point
))
(
font-lock-fontify-anchored-keywords
(
car
highlights
)
end
)
;; Ensure forward progress. `pos' is a marker because anchored
;; keyword may add/delete text (this happens e.g. in grep.el).
(
if
(
<
(
point
)
pos
)
(
goto-char
pos
)))
(
setq
highlights
(
cdr
highlights
))))
(
setq
keywords
(
cdr
keywords
)))))
(
setq
keywords
(
cdr
keywords
)))
(
set-marker
pos
nil
)))
;;; End of Keyword regexp fontification functions.
...
...
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