** Dired
+---
+*** Broken and circular links are shown with the new
+ 'dired-broken-symlink' face.
+
*** '=' ('dired-diff') will now put all backup files into the 'M-n' history.
When using '=' on a file with backup files, the default file to use
for diffing is the newest backup file. You can now use 'M-n' to quickly
(defvar dired-symlink-face 'dired-symlink
"Face name used for symbolic links.")
+(defface dired-broken-symlink
+ '((((class color))
+ :foreground "yellow1" :background "red1" :weight bold)
+ (t :weight bold :slant italic :underline t))
+ "Face used for broken symbolic links."
+ :group 'dired-faces
+ :version "28.1")
+
(defface dired-special
'((t (:inherit font-lock-variable-name-face)))
"Face used for sockets, pipes, block devices and char devices."
(list dired-re-dir
'(".+" (dired-move-to-filename) nil (0 dired-directory-face)))
;;
+ ;; Broken Symbolic link.
+ (list dired-re-sym
+ (list (lambda (end)
+ (let* ((file (dired-file-name-at-point))
+ (truename (ignore-errors (file-truename file))))
+ ;; either not existent target or circular link
+ (and (not (and truename (file-exists-p truename)))
+ (search-forward-regexp "\\(.+\\) \\(->\\) ?\\(.+\\)" end t))))
+ '(dired-move-to-filename)
+ nil
+ '(1 'dired-broken-symlink)
+ '(2 dired-symlink-face)
+ '(3 'dired-broken-symlink)))
+ ;;
;; Symbolic link to a directory.
(list dired-re-sym
(list (lambda (end)