diff options
| author | Tassilo Horn | 2014-09-21 11:34:02 +0200 |
|---|---|---|
| committer | Tassilo Horn | 2014-09-21 11:34:02 +0200 |
| commit | 09973863ea476212830858caf304afbcdbe19ed6 (patch) | |
| tree | e238e640f54a267c15ecd7820887782f7ded3774 | |
| parent | a58c2690db26d69112d97122c6eb91d8906f7476 (diff) | |
| download | emacs-09973863ea476212830858caf304afbcdbe19ed6.tar.gz emacs-09973863ea476212830858caf304afbcdbe19ed6.zip | |
Use font-lock-face property; derive from special-mode
* lisp/textmodes/reftex-sel.el (reftex-select-label-mode)
(reftex-select-bib-mode, reftex-insert-docstruct): Derive modes
from special-mode (instead of fundamental-mode) and propertize
with font-lock-face instead of just face.
* lisp/textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto.
Fixes: debbugs:18496
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-sel.el | 16 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-toc.el | 4 |
3 files changed, 19 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5725aa924d7..ec995c1b406 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-09-21 Tassilo Horn <tsdh@gnu.org> | ||
| 2 | |||
| 3 | * textmodes/reftex-sel.el (reftex-select-label-mode) | ||
| 4 | (reftex-select-bib-mode, reftex-insert-docstruct): Derive modes | ||
| 5 | from special-mode (instead of fundamental-mode) and propertize | ||
| 6 | with font-lock-face instead of just face. (Bug#18496) | ||
| 7 | |||
| 8 | * textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto. | ||
| 9 | |||
| 1 | 2014-09-19 Dmitry Gutov <dgutov@yandex.ru> | 10 | 2014-09-19 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 11 | ||
| 3 | * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate | 12 | * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate |
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index a993a883b0f..e1fc8bf908e 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el | |||
| @@ -103,7 +103,7 @@ This keymap can be used to configure the label selection process which is | |||
| 103 | started with the command \\[reftex-reference].") | 103 | started with the command \\[reftex-reference].") |
| 104 | 104 | ||
| 105 | ;;;###autoload | 105 | ;;;###autoload |
| 106 | (define-derived-mode reftex-select-label-mode fundamental-mode "LSelect" | 106 | (define-derived-mode reftex-select-label-mode special-mode "LSelect" |
| 107 | "Major mode for selecting a label in a LaTeX document. | 107 | "Major mode for selecting a label in a LaTeX document. |
| 108 | This buffer was created with RefTeX. | 108 | This buffer was created with RefTeX. |
| 109 | It only has a meaningful keymap when you are in the middle of a | 109 | It only has a meaningful keymap when you are in the middle of a |
| @@ -149,7 +149,7 @@ This keymap can be used to configure the BibTeX selection process which is | |||
| 149 | started with the command \\[reftex-citation].") | 149 | started with the command \\[reftex-citation].") |
| 150 | 150 | ||
| 151 | ;;;###autoload | 151 | ;;;###autoload |
| 152 | (define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect" | 152 | (define-derived-mode reftex-select-bib-mode special-mode "BSelect" |
| 153 | "Major mode for selecting a citation key in a LaTeX document. | 153 | "Major mode for selecting a citation key in a LaTeX document. |
| 154 | This buffer was created with RefTeX. | 154 | This buffer was created with RefTeX. |
| 155 | It only has a meaningful keymap when you are in the middle of a | 155 | It only has a meaningful keymap when you are in the middle of a |
| @@ -296,7 +296,7 @@ During a selection process, these are the local bindings. | |||
| 296 | (setq to (point)) | 296 | (setq to (point)) |
| 297 | (when font | 297 | (when font |
| 298 | (put-text-property from to | 298 | (put-text-property from to |
| 299 | 'face reftex-file-boundary-face)) | 299 | 'font-lock-face reftex-file-boundary-face)) |
| 300 | (when toc-buffer | 300 | (when toc-buffer |
| 301 | (if mouse-face | 301 | (if mouse-face |
| 302 | (put-text-property from (1- to) | 302 | (put-text-property from (1- to) |
| @@ -314,7 +314,7 @@ During a selection process, these are the local bindings. | |||
| 314 | (setq to (point)) | 314 | (setq to (point)) |
| 315 | (when font | 315 | (when font |
| 316 | (put-text-property from to | 316 | (put-text-property from to |
| 317 | 'face reftex-section-heading-face)) | 317 | 'font-lock-face reftex-section-heading-face)) |
| 318 | (when toc-buffer | 318 | (when toc-buffer |
| 319 | (if mouse-face | 319 | (if mouse-face |
| 320 | (put-text-property from (1- to) | 320 | (put-text-property from (1- to) |
| @@ -353,7 +353,7 @@ During a selection process, these are the local bindings. | |||
| 353 | (setq to (point)) | 353 | (setq to (point)) |
| 354 | (put-text-property | 354 | (put-text-property |
| 355 | (- (point) (length label)) to | 355 | (- (point) (length label)) to |
| 356 | 'face (if comment | 356 | 'font-lock-face (if comment |
| 357 | 'font-lock-comment-face | 357 | 'font-lock-comment-face |
| 358 | label-face)) | 358 | label-face)) |
| 359 | (goto-char to)) | 359 | (goto-char to)) |
| @@ -383,14 +383,14 @@ During a selection process, these are the local bindings. | |||
| 383 | (setq index-tag (format "<%s>" (nth 1 cell))) | 383 | (setq index-tag (format "<%s>" (nth 1 cell))) |
| 384 | (and font | 384 | (and font |
| 385 | (put-text-property 0 (length index-tag) | 385 | (put-text-property 0 (length index-tag) |
| 386 | 'face reftex-index-tag-face index-tag)) | 386 | 'font-lock-face reftex-index-tag-face index-tag)) |
| 387 | (insert label-indent index-tag " " (nth 7 cell)) | 387 | (insert label-indent index-tag " " (nth 7 cell)) |
| 388 | 388 | ||
| 389 | (when font | 389 | (when font |
| 390 | (setq to (point)) | 390 | (setq to (point)) |
| 391 | (put-text-property | 391 | (put-text-property |
| 392 | (- (point) (length (nth 7 cell))) to | 392 | (- (point) (length (nth 7 cell))) to |
| 393 | 'face index-face) | 393 | 'font-lock-face index-face) |
| 394 | (goto-char to)) | 394 | (goto-char to)) |
| 395 | (insert "\n") | 395 | (insert "\n") |
| 396 | (setq to (point)) | 396 | (setq to (point)) |
| @@ -690,7 +690,7 @@ Cycle in reverse order if optional argument REVERSE is non-nil." | |||
| 690 | eoe (or (next-single-property-change (point) :data) (point-max))) | 690 | eoe (or (next-single-property-change (point) :data) (point-max))) |
| 691 | (setq ovl (reftex-make-overlay boe eoe)) | 691 | (setq ovl (reftex-make-overlay boe eoe)) |
| 692 | (push (list data ovl separator) reftex-select-marked) | 692 | (push (list data ovl separator) reftex-select-marked) |
| 693 | (reftex-overlay-put ovl 'face reftex-select-mark-face) | 693 | (reftex-overlay-put ovl 'font-lock-face reftex-select-mark-face) |
| 694 | (reftex-overlay-put ovl 'before-string | 694 | (reftex-overlay-put ovl 'before-string |
| 695 | (if separator | 695 | (if separator |
| 696 | (format "*%c%d* " separator | 696 | (format "*%c%d* " separator |
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index e164770fa0c..fab558ff2fb 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el | |||
| @@ -129,7 +129,7 @@ | |||
| 129 | (defvar reftex-toc-include-index-indicator nil) | 129 | (defvar reftex-toc-include-index-indicator nil) |
| 130 | (defvar reftex-toc-max-level-indicator nil) | 130 | (defvar reftex-toc-max-level-indicator nil) |
| 131 | 131 | ||
| 132 | (define-derived-mode reftex-toc-mode fundamental-mode "TOC" | 132 | (define-derived-mode reftex-toc-mode special-mode "TOC" |
| 133 | "Major mode for managing Table of Contents for LaTeX files. | 133 | "Major mode for managing Table of Contents for LaTeX files. |
| 134 | This buffer was created with RefTeX. | 134 | This buffer was created with RefTeX. |
| 135 | Press `?' for a summary of important key bindings. | 135 | Press `?' for a summary of important key bindings. |
| @@ -279,7 +279,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help | |||
| 279 | " (abbreviate-file-name reftex-last-toc-master))) | 279 | " (abbreviate-file-name reftex-last-toc-master))) |
| 280 | 280 | ||
| 281 | (if (reftex-use-fonts) | 281 | (if (reftex-use-fonts) |
| 282 | (put-text-property (point-min) (point) 'face reftex-toc-header-face)) | 282 | (put-text-property (point-min) (point) 'font-lock-face reftex-toc-header-face)) |
| 283 | (put-text-property (point-min) (point) 'intangible t) | 283 | (put-text-property (point-min) (point) 'intangible t) |
| 284 | (put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist) | 284 | (put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist) |
| 285 | 285 | ||