From 80a78d23ea06e4bd449096f207fcda41827de9de Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 10 May 2014 23:49:53 -0400 Subject: [PATCH] * lisp/info.el (Info-quoted): New face. (Info-mode-font-lock-keywords): New var. (Info-mode): Use it. --- lisp/ChangeLog | 16 ++++++++++------ lisp/info.el | 10 +++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a44ba6dc000..72c6d943710 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2014-05-11 Stefan Monnier + * info.el (Info-quoted): New face. + (Info-mode-font-lock-keywords): New var. + (Info-mode): Use it. + * emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," which are a hindrance for C-x C-e. @@ -232,14 +236,14 @@ (diary-chinese-insert-yearly-entry): New commands to insert Chinese diary entries. - * calendar/diary-lib.el (diary-font-lock-keywords): Support - font-locking Chinese dates. + * calendar/diary-lib.el (diary-font-lock-keywords): + Support font-locking Chinese dates. * calendar/cal-menu.el (cal-menu-diary-menu): Add entries for inserting Chinese diary entries. - * calendar/calendar.el (diary-chinese-entry-symbol): New - customizable variable. + * calendar/calendar.el (diary-chinese-entry-symbol): + New customizable variable. (calendar-mode-map): Add bindings for inserting Chinese diary entries. @@ -258,8 +262,8 @@ incorrectness of position adjustments when undoing in region. (Bug#17235) (undo-elt-crosses-region): Make obsolete. - (undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos): New - functions to adjust positions using undo-deltas. + (undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos): + New functions to adjust positions using undo-deltas. 2014-05-01 Stefan Monnier diff --git a/lisp/info.el b/lisp/info.el index 42b78f03526..89ca8bdbe33 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4209,9 +4209,16 @@ With a zero prefix arg, put the name inside a function call to `info'." st) "Syntax table used in `Info-mode'.") +(defface Info-quoted + '((t :family "courier")) + "Face used for quoted elements.") + +(defvar Info-mode-font-lock-keywords + '(("‘\\([^’]*\\)’" (1 'Info-quoted)))) + ;; Autoload cookie needed by desktop.el ;;;###autoload -(define-derived-mode Info-mode nil "Info" +(define-derived-mode Info-mode nil "Info" ;FIXME: Derive from special-mode? "Info mode provides commands for browsing through the Info documentation tree. Documentation in Info is divided into \"nodes\", each of which discusses one topic and contains references to other nodes which discuss related @@ -4297,6 +4304,7 @@ Advanced commands: (setq-local isearch-push-state-function #'Info-isearch-push-state) (setq-local isearch-filter-predicate #'Info-isearch-filter) (setq-local revert-buffer-function #'Info-revert-buffer-function) + (setq-local font-lock-defaults '(Info-mode-font-lock-keywords t t)) (Info-set-mode-line) (setq-local bookmark-make-record-function #'Info-bookmark-make-record)) -- 2.39.2