emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 9d70e4d 2/3: * lisp/ibuffer.el: Add face for locked


From: Tino Calancha
Subject: [Emacs-diffs] master 9d70e4d 2/3: * lisp/ibuffer.el: Add face for locked buffers
Date: Thu, 7 Jul 2016 16:49:26 +0000 (UTC)

branch: master
commit 9d70e4da7402e5a89db6a1b175b917cd3fb37e36
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    * lisp/ibuffer.el: Add face for locked buffers
---
 lisp/ibuffer.el |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index a8eba8d..ff1eb8b 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -160,7 +160,8 @@ elisp byte-compiler."
             (null buffer-file-name))
        italic)
     (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face)
-    (35 (derived-mode-p 'dired-mode) font-lock-function-name-face))
+    (35 (derived-mode-p 'dired-mode) font-lock-function-name-face)
+    (40 (and (boundp 'emacs-lock-mode) emacs-lock-mode) ibuffer-locked-buffer))
   "An alist describing how to fontify buffers.
 Each element should be of the form (PRIORITY FORM FACE), where
 PRIORITY is an integer, FORM is an arbitrary form to evaluate in the
@@ -1733,6 +1734,15 @@ If point is on a group name, this function operates on 
that group."
 
 (defvar ibuffer-inline-columns nil)
 
+(defface ibuffer-locked-buffer
+  '((((background dark)) (:foreground "RosyBrown"))
+    (t (:foreground "brown4")))
+  "*Face used for locked buffers in Ibuffer."
+  :version "25.2"
+  :group 'ibuffer
+  :group 'font-lock-highlighting-faces)
+(defvar ibuffer-locked-buffer 'ibuffer-locked-buffer)
+
 (define-ibuffer-column mark (:name " " :inline t)
   (string mark))
 
@@ -1741,7 +1751,8 @@ If point is on a group name, this function operates on 
that group."
       (string ibuffer-read-only-char)
     " "))
 
-(define-ibuffer-column locked (:name "L" :inline t)
+(define-ibuffer-column locked
+  (:name "L" :inline t :props ('font-lock-face 'ibuffer-locked-buffer))
   (if (and (boundp 'emacs-lock-mode) emacs-lock-mode)
       (string ibuffer-locked-char)
     " "))



reply via email to

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