[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113011: lisp/progmodes/prog-mode.el: Force font-loc
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] trunk r113011: lisp/progmodes/prog-mode.el: Force font-lock to deal with `composition' prop. |
Date: |
Mon, 17 Jun 2013 01:09:22 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113011
revision-id: address@hidden
parent: address@hidden
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Mon 2013-06-17 03:09:13 +0200
message:
lisp/progmodes/prog-mode.el: Force font-lock to deal with `composition' prop.
(prog-prettify-install): Add `composition' to `font-lock-extra-managed-props'
if any prettifying keyword is added.
(prog--prettify-font-lock-compose-symbol): Use ?\s instead of ?\ .
(prog-mode): Use `setq-local'.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/prog-mode.el progmode.el-20091230193750-bspzfk1gt8nm2mal-14
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-17 00:52:24 +0000
+++ b/lisp/ChangeLog 2013-06-17 01:09:13 +0000
@@ -1,3 +1,10 @@
+2013-06-17 Juanma Barranquero <address@hidden>
+
+ * progmodes/prog-mode.el (prog-prettify-install): Add `composition' to
+ `font-lock-extra-managed-props' if any prettifying keyword is added.
+ (prog--prettify-font-lock-compose-symbol): Use ?\s instead of ?\ .
+ (prog-mode): Use `setq-local'.
+
2013-06-17 Stefan Monnier <address@hidden>
* international/characters.el (standard-case-table): Set syntax of ?»
=== modified file 'lisp/progmodes/prog-mode.el'
--- a/lisp/progmodes/prog-mode.el 2013-06-16 01:26:42 +0000
+++ b/lisp/progmodes/prog-mode.el 2013-06-17 01:09:13 +0000
@@ -76,8 +76,8 @@
(syntaxes (if (eq (char-syntax (char-after start)) ?w)
'(?w) '(?. ?\\)))
match)
- (if (or (memq (char-syntax (or (char-before start) ?\ )) syntaxes)
- (memq (char-syntax (or (char-after end) ?\ )) syntaxes)
+ (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes)
+ (memq (char-syntax (or (char-after end) ?\s)) syntaxes)
;; syntax-ppss could modify the match data (bug#14595)
(progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
;; No composition for you. Let's actually remove any composition
@@ -106,13 +106,16 @@
Internally, `font-lock-add-keywords' is called."
(setq-local prog-prettify-symbols-alist alist)
(let ((keywords (prog-prettify-font-lock-symbols-keywords)))
- (if keywords (font-lock-add-keywords nil keywords))))
+ (when keywords
+ (font-lock-add-keywords nil keywords)
+ (setq-local font-lock-extra-managed-props
+ (cons 'composition font-lock-extra-managed-props)))))
;;;###autoload
(define-derived-mode prog-mode fundamental-mode "Prog"
"Major mode for editing programming language source code."
- (set (make-local-variable 'require-final-newline) mode-require-final-newline)
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
+ (setq-local require-final-newline mode-require-final-newline)
+ (setq-local parse-sexp-ignore-comments t)
;; Any programming language is always written left to right.
(setq bidi-paragraph-direction 'left-to-right))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113011: lisp/progmodes/prog-mode.el: Force font-lock to deal with `composition' prop.,
Juanma Barranquero <=