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

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

bug#9919: 24.0.91; font-lock broken in dired


From: Drew Adams
Subject: bug#9919: 24.0.91; font-lock broken in dired
Date: Mon, 31 Oct 2011 08:11:53 -0700

This regression started with the second delivery of pretest #1,
2011-10-31.  There is no such problem with the first delivery,
2011-10-24.
 
In my setup I use dired+.el, which is here:
http://www.emacswiki.org/emacs/download/dired%2b.el.
 
The relevant code is this:
 
(add-hook 'dired-mode-hook
          '(lambda ()
            (set (make-local-variable 'font-lock-defaults)
             (cons '(dired-font-lock-keywords diredp-font-lock-keywords-1) ; Two
levels.
              (cdr font-lock-defaults)))))
 
And this:

(defvar diredp-font-lock-keywords-1
  (list
   '("^  \\(.+:\\)$" 1 diredp-dir-heading) ; Directory headers
   '("^  wildcard.*$" 0 'default)       ; Override others, e.g. `l' for
`diredp-other-priv'.
   '("^  (No match).*$" 0 'default)     ; Override others, e.g. `t' for
`diredp-other-priv'.
   '("[^ .]\\.\\([^. /]+\\)$" 1 diredp-file-suffix) ; Suffix
   '("\\([^ ]+\\) -> [^ ]+$" 1 diredp-symlink) ; Symbolic links
   ;; 1) Date/time and 2) filename w/o suffix:
   (list dired-move-to-filename-regexp
         (if (or (not (fboundp 'version<)) (version< emacs-version "23.2"))
             (list 1 'diredp-date-time t t)
           (list 2 'diredp-date-time t t)) ; Date/time
         (list "\\(.+\\)$" nil nil (list 0 diredp-file-name 'keep t))) ;
Filename
 
   ;; Files to ignore
   (list (concat "^  \\(.*\\(" (concat (mapconcat 'regexp-quote
                                                  (or (and (boundp
'dired-omit-extensions)
 
dired-omit-extensions)
 
completion-ignored-extensions)
                                                  "[*]?\\|")
                                       "[*]?")        ; Allow for executable
flag (*).
                 "\\|\\.\\(g?z\\|Z\\)[*]?\\)\\)$") ; Compressed.
         1 diredp-ignored-file-name t)
   '("[^ .]\\.\\([bg]?[zZ]2?\\)[*]?$" 1 diredp-compressed-file-suffix t) ;
Compressed (*.z)
   '("\\([*]\\)$" 1 diredp-executable-tag t) ; Executable (*)
   ;; Inode, hard-links, & file size (. and , are for the decimal point,
depending on locale)
   ;; See comment for `directory-listing-before-filename-regexp' in `files.el'
or `files+.el'.
   '("\\(\\([0-9]+\\([.,][0-9]+\\)?\\)[BkKMGTPEZY]? \\)" 1 diredp-number)
 
   ;; Directory names
   (list "^..\\([0-9]* \\)*d"
         (list dired-move-to-filename-regexp nil nil)
         (list "\\(.+\\)" nil nil '(0 diredp-dir-priv t t)))
   '("^..\\([0-9]* \\)*.........\\(x\\)" 2 diredp-exec-priv) ;o x
   '("^..\\([0-9]* \\)*.........\\([lsStT]\\)" 2 diredp-other-priv) ; o misc
   '("^..\\([0-9]* \\)*........\\(w\\)" 2 diredp-write-priv) ; o w
   '("^..\\([0-9]* \\)*.......\\(r\\)" 2 diredp-read-priv) ; o r
   '("^..\\([0-9]* \\)*......\\(x\\)" 2 diredp-exec-priv) ; g x
   '("^..\\([0-9]* \\)*....[^0-9].\\([lsStT]\\)" 2 diredp-other-priv) ; g misc
   '("^..\\([0-9]* \\)*.....\\(w\\)" 2 diredp-write-priv) ; g w
   '("^..\\([0-9]* \\)*....\\(r\\)" 2 diredp-read-priv) ; g r
   '("^..\\([0-9]* \\)*...\\(x\\)" 2 diredp-exec-priv) ; u x
   '("^..\\([0-9]* \\)*...\\([lsStT]\\)" 2 diredp-other-priv) ; u misc
   '("^..\\([0-9]* \\)*..\\(w\\)" 2 diredp-write-priv) ; u w
   '("^..\\([0-9]* \\)*.\\(r\\)" 2 diredp-read-priv) ; u r
   '("^..\\([0-9]* \\)*.\\([-rwxlsStT]+\\)" 2 diredp-no-priv keep) ;-
   '("^..\\([0-9]* \\)*\\([bcsmpS]\\)[-rwxlsStT]" 2 diredp-rare-priv) ; (rare)
   '("^..\\([0-9]* \\)*\\(l\\)[-rwxlsStT]" 2 diredp-link-priv) ; l
   (list (concat "^\\([^\n " (char-to-string dired-del-marker) "].*$\\)")
         1 diredp-flag-mark-line t)     ; Flag/mark lines
   (list (concat "^\\([" (char-to-string dired-del-marker) "]\\)") ; Deletion
flags (D)
         '(1 diredp-deletion t)
         '(".+" (dired-move-to-filename) nil (0 diredp-deletion-file-name t)))
   (list (concat "^\\([^\n " (char-to-string dired-del-marker) "]\\)") ; Flags,
marks (except D)
         1 diredp-flag-mark t)
   ) "2nd level of Dired highlighting.  See `font-lock-maximum-decoration'.")
 
The local value of `font-lock-defaults' is correctly set to this value, as
it is in the earlier pretest #1 and in all prior Emacs releases:
 
((dired-font-lock-keywords diredp-font-lock-keywords-1)
 t nil nil beginning-of-line)
 
But none of the specified font-locking is manifested.  I see only the
default emacs -Q font-locking.  I don't know why, and am not sure how
to check this further.  
 
I've diff'd dired.el, dired-x.el, dired-aux.el, and font-lock.el between
the first pretest #1 delivery (2011-10-24) and the second one (2011-10-31),
but I don't recognize any change that would affect this.  Dunno what other
code changes were made between these two pretest deliveries, but something
broke font-locking badly in this context.
 

In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-10-30 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -I"D:/devel/emacs/libs/libXpm-3.5.8/include"
 -I"D:/devel/emacs/libs/libXpm-3.5.8/src"
 -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include"
 -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include"
 -I"D:/devel/emacs/libs/giflib-4.1.4-1/include"
 -I"D:/devel/emacs/libs/jpeg-6b-4/include"
 -I"D:/devel/emacs/libs/tiff-3.8.2-1/include"
 -I"D:/devel/emacs/libs/gnutls-2.10.1/include" --ldflags
 -L"D:/devel/emacs/libs/gnutls-2.10.1/lib"'
 






reply via email to

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