bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13917: 24.3.50; Elisp manual: Font Lock Mode


From: Joost Kremers
Subject: bug#13917: 24.3.50; Elisp manual: Font Lock Mode
Date: Sun, 10 Mar 2013 17:39:01 +0100

The Elisp manual, info node "(elisp) Search-based Fontification" states
the following:

,----
| `(MATCHER . FACESPEC)'
|      In this kind of element, FACESPEC is an expression whose value
|      specifies the face to use for highlighting.  In the simplest case,
|      FACESPEC is a Lisp variable (a symbol) whose value is a face name.
| 
|           ;; Highlight occurrences of `fubar',
|           ;; using the face which is the value of `fubar-face'.
|           ("fubar" . fubar-face)
| 
|      However, FACESPEC can also evaluate to a list of this form:
| 
|           (face FACE PROP1 VAL1 PROP2 VAL2...)
| 
|      to specify the face FACE and various additional text properties to
|      put on the text that matches.  If you do this, be sure to add the
|      other text property names that you set in this way to the value of
|      `font-lock-extra-managed-props' so that the properties will also
|      be cleared out when they are no longer appropriate.  Alternatively,
|      you can set the variable `font-lock-unfontify-region-function' to
|      a function that clears these properties.  *Note Other Font Lock
|      Variables::.
`----

However, a font lock entry of the type

,----
| (MATCHER . (face FACE PROP1 VAL1 PROP1 VAL2))
`----

does not actually work. What works is any of the forms:

,----
| (MATCHER . (0 (face FACE PROP1 VAL1 PROP1 VAL2)))
| (MATCHER 0 (face FACE PROP1 VAL1 PROP1 VAL2))
| (MATCHER (0 (face FACE PROP1 VAL1 PROP1 VAL2)))
`----

(Where the first two are of course equivalent).




In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 3.6.0)
 of 2013-03-04 on charichuelo, modified by Debian
 (emacs-snapshot package, version 2:20130304-1~ppa1~quantal1)
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:     Ubuntu 12.10

Configured using:
 `configure --build i686-linux-gnu --host i686-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 
--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --without-compress-info --with-crt-dir=/usr/lib/i386-linux-gnu/
 --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes
 CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'
 CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed
 -znocombreloc''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  diff-auto-refine-mode: t
  TeX-PDF-mode: t
  autopair-global-mode: t
  autopair-mode: t
  global-edit-server-edit-mode: t
  override-global-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
s SPC t h e SPC o n e SPC t h a t SPC C-d r e t u r 
n s SPC t h e SPC f i e l d SPC t o SPC i n h e r i 
t SPC f r o m SPC <backspace> , SPC b a s e d SPC o 
n SPC a SPC f i e l d M-b M-b M-b M-b M-b M-b M-b M-b 
t a r g e t SPC M-f M-d M-d M-d M-f M-f M-f <backspace> 
t h e SPC o <backspace> s o u r c e M-f SPC a n d SPC 
t h e SPC n e t r y SPC <M-backspace> e n t r y SPC 
t y p e SPC o f SPC t e h SPC s o u r c e . M-b C-b 
C-b C-p C-e C-x C-s C-x # M-x e m a <tab> b u <tab> 
<M-backspace> <M-backspace> r e p <tab> o <tab> <tab> 
r <tab> <return> M a n u a l <M-backspace> C-g C-h 
i u u u m f o n - <backspace> t SPC l o c k <tab> m 
o <tab> <return> 3 b <backspace> <backspace> <backspace> 
<backspace> <backspace> C-t C-t C-t C-t C-t C-t C-t 
C-t C-t C-t C-t C-t C-t C-t C-t C-t C-t C-t C-SPC C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n M-w <C-tab> <return> <return> 
C-y <C-S-iso-lefttab> <C-S-iso-lefttab> <C-tab> <C-tab> 
C-h i <home> C-n C-b C-SPC C-e M-w q <return> <return> 
C-y C-t M-d M-d M-d M-d C-d C-d M-f M-f M-f C-k C-c 
C-g M-x e <backspace> r e p a r <backspace> <backspace> 
o r <tab> <return>

Recent messages:
Package `multiple-cursors-20130226.2138' deleted.
Package `ebib-20130309.145' deleted.
Package `dash-20130225.2203' deleted.
Field contents killed.
Wrote /home/joost/Dropbox/Work/Bibtex/genbib.bib
[mu4e] Retrieving mail...
[mu4e] Indexing... processed 4000, updated 0
[mu4e] Indexing completed; processed 4306, updated 0, cleaned-up 0
Making completion list... [2 times]
Quit

Load-path shadows:
/home/joost/.elpa/ess-20130225.1754/.dir-locals hides 
/home/joost/.elpa/magit-20130304.2017/.dir-locals
/usr/share/emacs/24.3.50/site-lisp/cmake-data/cmake-mode hides 
/usr/share/emacs/site-lisp/cmake-mode
~/.emacs.d/custom hides /usr/share/emacs/24.3.50/lisp/custom
~/src/org-mode/contrib/lisp/org-w3m hides 
/usr/share/emacs/24.3.50/lisp/org/org-w3m
~/src/org-mode/contrib/lisp/org-vm hides 
/usr/share/emacs/24.3.50/lisp/org/org-vm
~/src/org-mode/contrib/lisp/org-wl hides 
/usr/share/emacs/24.3.50/lisp/org/org-wl
~/src/org-mode/contrib/lisp/org-mew hides 
/usr/share/emacs/24.3.50/lisp/org/org-mew
/home/joost/.elpa/ess-20130225.1754/.dir-locals hides 
/usr/share/emacs/24.3.50/lisp/gnus/.dir-locals

Features:
(shadow emacsbug mc-separate-operations rectangular-region-mode
mc-mark-more mc-cycle-cursors mc-edit-lines multiple-cursors-core
autoload tar-mode url-http url-gw url-cache url-auth url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse url-vars mailcap finder-inf ace-jump-mode jump-char
debug ebib loadhist epa-file gnutls network-stream starttls tls
mailalias qp mail-extr sort parse-time boxquote crm view magit-bisect
magit-key-mode magit diff-mode log-edit pcvs-util add-log compile
re-builder bm expand-region text-mode-expansions org-mode-expansions
latex-mode-expansions expand-region-custom expand-region-core vc-git
reftex-index rect reftex-sel reftex-ref reftex-toc texmathp
writeroom-mode pcmpl-unix cus-edit cus-start cus-load wid-edit misearch
multi-isearch mule-util reftex-cite reftex-parse pandoc-mode bibtex
preview prv-emacs tex-buf reftex-dcr reftex reftex-vars face-remap
adaptive-wrap tex-fold font-latex latex tex-style tex dbus xml latexenc
offlineimap diminish epresent org-latex org-export-latex org-beamer
footnote autopair quail em-unix em-term term disp-table ehelp electric
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util
ielm pp anti-zenburn-theme edit-server uniquify org-mu4e org-exp ob-exp
org-exp-blocks org-agenda mu4e mu4e-speedbar speedbar sb-image ezimage
dframe mu4e-main mu4e-view epa epg epg-config browse-url mu4e-headers
mu4e-compose mu4e-draft mu4e-actions rfc2368 smtpmail auth-source eieio
gnus-util password-cache sendmail mu4e-mark mu4e-message html2text
mu4e-proc mu4e-utils doc-view jka-compr image-mode dired mu4e-lists
mu4e-about mu4e-vars message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mailabbrev mail-utils gmm-utils mailheader hl-line mu4e-meta
dictem org-drill org-learn org-id hi-lock org-inlinetask org byte-opt
warnings bytecomp byte-compile cconv ob-tangle ob-ref ob-lob ob-table
org-footnote org-src ob-comint ob-keys org-pcomplete pcomplete comint
ansi-color ring org-list org-faces org-entities org-version
ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec
find-func cal-menu calendar cal-loaddefs yasnippet dropdown-list derived
help-mode cl cm-mode cl-macs gv cl-lib markdown-mode thingatpt noutline
outline windmove swbuff nadvice advice help-fns preview-latex tex-site
auto-loads server edmacro kmacro bind-key easy-mmode paren delsel
ace-jump-mode-autoloads adaptive-wrap-autoloads
anti-zenburn-theme-autoloads autopair-autoloads bm-autoloads
boxquote-autoloads dash-autoloads diminish-autoloads ebib-autoloads
edit-server-autoloads expand-region-autoloads jump-char-autoloads
magit-autoloads multiple-cursors-autoloads offlineimap-autoloads
pandoc-mode-autoloads unfill-autoloads wc-mode-autoloads
writeroom-mode-autoloads info easymenu package time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

-- 
Joost Kremers, PhD
University of Göttingen
Institute for German Philology
Käte-Hamburger-Weg 3
37073 Göttingen, Germany





reply via email to

[Prev in Thread] Current Thread [Next in Thread]