mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-08 15:35:02 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
This commit is contained in:
commit
0e8d3445a7
9
etc/NEWS
9
etc/NEWS
@ -198,6 +198,15 @@ same as in modes where the character is not whitespace.
|
||||
|
||||
** Ibuffer
|
||||
|
||||
---
|
||||
*** A new command 'ibuffer-mark-by-locked' to mark
|
||||
all locked buffers; bound to '% L'.
|
||||
|
||||
---
|
||||
*** A new option 'ibuffer-locked-char' to indicate
|
||||
locked buffers; Ibuffer shows a new column displaying
|
||||
'ibuffer-locked-char' for locked buffers.
|
||||
|
||||
---
|
||||
*** A new command 'ibuffer-unmark-all-marks' to unmark
|
||||
all buffers without asking confirmation; bound to
|
||||
|
@ -1484,6 +1484,24 @@ You can then feed the file name(s) to other commands with \\[yank]."
|
||||
#'(lambda (buf)
|
||||
(string-match regexp (buffer-name buf)))))
|
||||
|
||||
(defun ibuffer-locked-buffer-p (&optional buf)
|
||||
"Return non-nil if BUF is locked.
|
||||
When BUF nil, default to the buffer at current line."
|
||||
(let ((_buffer (or buf (ibuffer-current-buffer)))
|
||||
char)
|
||||
(when _buffer
|
||||
(with-current-buffer _buffer
|
||||
(and (boundp 'emacs-lock-mode) emacs-lock-mode)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ibuffer-mark-by-locked ()
|
||||
"Mark all locked buffers."
|
||||
(interactive)
|
||||
(when (featurep 'emacs-lock)
|
||||
(ibuffer-mark-on-buffer
|
||||
(lambda (buf)
|
||||
(ibuffer-locked-buffer-p buf)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ibuffer-mark-by-mode-regexp (regexp)
|
||||
"Mark all buffers whose major mode matches REGEXP."
|
||||
|
@ -71,7 +71,8 @@ and filter displayed buffers by various criteria."
|
||||
:version "22.1"
|
||||
:group 'convenience)
|
||||
|
||||
(defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide)
|
||||
(defcustom ibuffer-formats '((mark modified read-only locked
|
||||
" " (name 18 18 :left :elide)
|
||||
" " (size 9 -1 :right)
|
||||
" " (mode 16 16 :left :elide) " " filename-and-process)
|
||||
(mark " " (name 16 -1) " " filename))
|
||||
@ -137,6 +138,7 @@ value for this variable would be
|
||||
|
||||
Using \\[ibuffer-switch-format], you can rotate the display between
|
||||
the specified formats in the list."
|
||||
:version "25.2"
|
||||
:type '(repeat sexp)
|
||||
:group 'ibuffer)
|
||||
|
||||
@ -158,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
|
||||
@ -280,6 +283,12 @@ Note that this specialized filtering occurs before real filtering."
|
||||
:type 'character
|
||||
:group 'ibuffer)
|
||||
|
||||
(defcustom ibuffer-locked-char ?L
|
||||
"The character to display for locked buffers."
|
||||
:version "25.2"
|
||||
:type 'character
|
||||
:group 'ibuffer)
|
||||
|
||||
(defcustom ibuffer-deletion-char ?D
|
||||
"The character to display for buffers marked for deletion."
|
||||
:type 'character
|
||||
@ -547,6 +556,7 @@ directory, like `default-directory'."
|
||||
(define-key map (kbd "% m") 'ibuffer-mark-by-mode-regexp)
|
||||
(define-key map (kbd "% f") 'ibuffer-mark-by-file-name-regexp)
|
||||
(define-key map (kbd "% g") 'ibuffer-mark-by-content-regexp)
|
||||
(define-key map (kbd "% L") 'ibuffer-mark-by-locked)
|
||||
|
||||
(define-key map (kbd "C-t") 'ibuffer-visit-tags-table)
|
||||
|
||||
@ -773,6 +783,9 @@ directory, like `default-directory'."
|
||||
'(menu-item "Mark by content (regexp)..."
|
||||
ibuffer-mark-by-content-regexp
|
||||
:help "Mark buffers whose content matches a regexp"))
|
||||
(define-key-after map [menu-bar mark mark-by-locked]
|
||||
'(menu-item "Mark by locked buffers..." ibuffer-mark-by-locked
|
||||
:help "Mark all locked buffers"))
|
||||
|
||||
map))
|
||||
|
||||
@ -1725,6 +1738,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))
|
||||
|
||||
@ -1733,6 +1755,12 @@ 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 :props ('font-lock-face 'ibuffer-locked-buffer))
|
||||
(if (and (boundp 'emacs-lock-mode) emacs-lock-mode)
|
||||
(string ibuffer-locked-char)
|
||||
" "))
|
||||
|
||||
(define-ibuffer-column modified (:name "M" :inline t)
|
||||
(if (buffer-modified-p)
|
||||
(string ibuffer-modified-char)
|
||||
@ -2452,6 +2480,7 @@ Marking commands:
|
||||
`\\[ibuffer-mark-by-mode-regexp]' - Mark buffers by their major mode, using a regexp.
|
||||
`\\[ibuffer-mark-by-file-name-regexp]' - Mark buffers by their filename, using a regexp.
|
||||
`\\[ibuffer-mark-by-content-regexp]' - Mark buffers by their content, using a regexp.
|
||||
`\\[ibuffer-mark-by-locked]' - Mark all locked buffers.
|
||||
|
||||
Filtering commands:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user