aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2019-06-30 08:31:21 +0200
committerNoam Postavsky2019-07-22 23:13:16 -0400
commit97477edaf2044e51696f46b166b43801893156a3 (patch)
tree05b4995d76cdd13ee6169668b29b2e6cdb530b76
parent3f4a9a5a3b267fbc13a8bebc4295bbfadd6ff03e (diff)
downloademacs-97477edaf2044e51696f46b166b43801893156a3.tar.gz
emacs-97477edaf2044e51696f46b166b43801893156a3.zip
Document normal usage in ibuffer.el
* lisp/ibuffer.el (Commentary): Document normal usage. (Bug#5608) Remove redundant :group args.
-rw-r--r--lisp/ibuffer.el124
1 files changed, 51 insertions, 73 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 929336c479f..54992f279b9 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -24,9 +24,22 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; ibuffer.el is an advanced replacement for the `buffer-menu' which 27;; Ibuffer is an advanced replacement for the `buffer-menu' which is
28;; is normally distributed with Emacs. Its interface is intended to 28;; distributed with Emacs. It lets you operate on buffers in a
29;; be analogous to that of Dired. 29;; Dired-like way, with the ability to sort, mark by regular
30;; expression, and filter displayed buffers by various criteria. Its
31;; interface is intended to be analogous to that of Dired.
32;;
33;; To start using it, type `M-x ibuffer'. If you use it regularly,
34;; you might be interested in replacing the default `list-buffers' key
35;; binding by adding the following to your init file:
36;;
37;; (global-set-key (kbd "C-x C-b") 'ibuffer)
38;;
39;; See also the various customization options, not least the
40;; documentation for `ibuffer-formats'.
41;;
42;; For more help, type `?' in the "*Ibuffer*" buffer.
30 43
31;;; Code: 44;;; Code:
32 45
@@ -139,15 +152,13 @@ value for this variable would be
139Using \\[ibuffer-switch-format], you can rotate the display between 152Using \\[ibuffer-switch-format], you can rotate the display between
140the specified formats in the list." 153the specified formats in the list."
141 :version "26.1" 154 :version "26.1"
142 :type '(repeat sexp) 155 :type '(repeat sexp))
143 :group 'ibuffer)
144 156
145(defcustom ibuffer-always-compile-formats (featurep 'bytecomp) 157(defcustom ibuffer-always-compile-formats (featurep 'bytecomp)
146 "If non-nil, then use the byte-compiler to optimize `ibuffer-formats'. 158 "If non-nil, then use the byte-compiler to optimize `ibuffer-formats'.
147This will increase the redisplay speed, at the cost of loading the 159This will increase the redisplay speed, at the cost of loading the
148elisp byte-compiler." 160elisp byte-compiler."
149 :type 'boolean 161 :type 'boolean)
150 :group 'ibuffer)
151 162
152(defcustom ibuffer-fontification-alist 163(defcustom ibuffer-fontification-alist
153 '((10 buffer-read-only font-lock-constant-face) 164 '((10 buffer-read-only font-lock-constant-face)
@@ -174,34 +185,28 @@ recreate it for the change to take effect."
174 :type '(repeat 185 :type '(repeat
175 (list (integer :tag "Priority") 186 (list (integer :tag "Priority")
176 (sexp :tag "Test Form") 187 (sexp :tag "Test Form")
177 face)) 188 face)))
178 :group 'ibuffer)
179 189
180(defcustom ibuffer-use-other-window nil 190(defcustom ibuffer-use-other-window nil
181 "If non-nil, display Ibuffer in another window by default." 191 "If non-nil, display Ibuffer in another window by default."
182 :type 'boolean 192 :type 'boolean)
183 :group 'ibuffer)
184 193
185(defcustom ibuffer-default-shrink-to-minimum-size nil 194(defcustom ibuffer-default-shrink-to-minimum-size nil
186 "If non-nil, minimize the size of the Ibuffer window by default." 195 "If non-nil, minimize the size of the Ibuffer window by default."
187 :type 'boolean 196 :type 'boolean)
188 :group 'ibuffer)
189(defvar ibuffer-shrink-to-minimum-size nil) 197(defvar ibuffer-shrink-to-minimum-size nil)
190 198
191(defcustom ibuffer-display-summary t 199(defcustom ibuffer-display-summary t
192 "If non-nil, summarize Ibuffer columns." 200 "If non-nil, summarize Ibuffer columns."
193 :type 'boolean 201 :type 'boolean)
194 :group 'ibuffer)
195 202
196(defcustom ibuffer-truncate-lines t 203(defcustom ibuffer-truncate-lines t
197 "If non-nil, do not display continuation lines." 204 "If non-nil, do not display continuation lines."
198 :type 'boolean 205 :type 'boolean)
199 :group 'ibuffer)
200 206
201(defcustom ibuffer-case-fold-search case-fold-search 207(defcustom ibuffer-case-fold-search case-fold-search
202 "If non-nil, ignore case when searching." 208 "If non-nil, ignore case when searching."
203 :type 'boolean 209 :type 'boolean)
204 :group 'ibuffer)
205 210
206(defcustom ibuffer-default-sorting-mode 'recency 211(defcustom ibuffer-default-sorting-mode 'recency
207 "The criteria by which to sort the buffers. 212 "The criteria by which to sort the buffers.
@@ -213,21 +218,18 @@ view of the buffers."
213 (const :tag "Lexicographic" :value alphabetic) 218 (const :tag "Lexicographic" :value alphabetic)
214 (const :tag "Buffer size" :value size) 219 (const :tag "Buffer size" :value size)
215 (const :tag "File name" :value filename/process) 220 (const :tag "File name" :value filename/process)
216 (const :tag "Major mode" :value major-mode)) 221 (const :tag "Major mode" :value major-mode)))
217 :group 'ibuffer)
218(defvar ibuffer-sorting-mode nil) 222(defvar ibuffer-sorting-mode nil)
219(defvar ibuffer-last-sorting-mode nil) 223(defvar ibuffer-last-sorting-mode nil)
220 224
221(defcustom ibuffer-default-sorting-reversep nil 225(defcustom ibuffer-default-sorting-reversep nil
222 "If non-nil, reverse the default sorting order." 226 "If non-nil, reverse the default sorting order."
223 :type 'boolean 227 :type 'boolean)
224 :group 'ibuffer)
225(defvar ibuffer-sorting-reversep nil) 228(defvar ibuffer-sorting-reversep nil)
226 229
227(defcustom ibuffer-eliding-string "..." 230(defcustom ibuffer-eliding-string "..."
228 "The string to use for eliding long columns." 231 "The string to use for eliding long columns."
229 :type 'string 232 :type 'string)
230 :group 'ibuffer)
231 233
232(defcustom ibuffer-maybe-show-predicates `(,(lambda (buf) 234(defcustom ibuffer-maybe-show-predicates `(,(lambda (buf)
233 (and (string-match "^ " (buffer-name buf)) 235 (and (string-match "^ " (buffer-name buf))
@@ -243,13 +245,11 @@ Viewing of buffers hidden because of these predicates may be customized
243via `ibuffer-default-display-maybe-show-predicates' and is toggled by 245via `ibuffer-default-display-maybe-show-predicates' and is toggled by
244giving a non-nil prefix argument to `ibuffer-update'. 246giving a non-nil prefix argument to `ibuffer-update'.
245Note that this specialized filtering occurs before real filtering." 247Note that this specialized filtering occurs before real filtering."
246 :type '(repeat (choice regexp function)) 248 :type '(repeat (choice regexp function)))
247 :group 'ibuffer)
248 249
249(defcustom ibuffer-default-display-maybe-show-predicates nil 250(defcustom ibuffer-default-display-maybe-show-predicates nil
250 "Non-nil means show buffers that match `ibuffer-maybe-show-predicates'." 251 "Non-nil means show buffers that match `ibuffer-maybe-show-predicates'."
251 :type 'boolean 252 :type 'boolean)
252 :group 'ibuffer)
253 253
254(defvar ibuffer-display-maybe-show-predicates nil) 254(defvar ibuffer-display-maybe-show-predicates nil)
255 255
@@ -257,47 +257,39 @@ Note that this specialized filtering occurs before real filtering."
257 257
258(defcustom ibuffer-movement-cycle t 258(defcustom ibuffer-movement-cycle t
259 "If non-nil, then forward and backwards movement commands cycle." 259 "If non-nil, then forward and backwards movement commands cycle."
260 :type 'boolean 260 :type 'boolean)
261 :group 'ibuffer)
262 261
263(defcustom ibuffer-modified-char ?* 262(defcustom ibuffer-modified-char ?*
264 "The character to display for modified buffers." 263 "The character to display for modified buffers."
265 :type 'character 264 :type 'character)
266 :group 'ibuffer)
267 265
268(defcustom ibuffer-read-only-char ?% 266(defcustom ibuffer-read-only-char ?%
269 "The character to display for read-only buffers." 267 "The character to display for read-only buffers."
270 :type 'character 268 :type 'character)
271 :group 'ibuffer)
272 269
273(defcustom ibuffer-marked-char ?> 270(defcustom ibuffer-marked-char ?>
274 "The character to display for marked buffers." 271 "The character to display for marked buffers."
275 :type 'character 272 :type 'character)
276 :group 'ibuffer)
277 273
278(defcustom ibuffer-locked-char ?L 274(defcustom ibuffer-locked-char ?L
279 "The character to display for locked buffers." 275 "The character to display for locked buffers."
280 :version "26.1" 276 :version "26.1"
281 :type 'character 277 :type 'character)
282 :group 'ibuffer)
283 278
284(defcustom ibuffer-deletion-char ?D 279(defcustom ibuffer-deletion-char ?D
285 "The character to display for buffers marked for deletion." 280 "The character to display for buffers marked for deletion."
286 :type 'character 281 :type 'character)
287 :group 'ibuffer)
288 282
289(defcustom ibuffer-expert nil 283(defcustom ibuffer-expert nil
290 "If non-nil, don't ask for confirmation of \"dangerous\" operations." 284 "If non-nil, don't ask for confirmation of \"dangerous\" operations."
291 :type 'boolean 285 :type 'boolean)
292 :group 'ibuffer)
293 286
294(defcustom ibuffer-view-ibuffer nil 287(defcustom ibuffer-view-ibuffer nil
295 "If non-nil, display the current Ibuffer buffer itself. 288 "If non-nil, display the current Ibuffer buffer itself.
296Note that this has a drawback - the data about the current Ibuffer 289Note that this has a drawback - the data about the current Ibuffer
297buffer will most likely be inaccurate. This includes modification 290buffer will most likely be inaccurate. This includes modification
298state, size, etc." 291state, size, etc."
299 :type 'boolean 292 :type 'boolean)
300 :group 'ibuffer)
301 293
302(defcustom ibuffer-always-show-last-buffer nil 294(defcustom ibuffer-always-show-last-buffer nil
303 "If non-nil, always display the previous buffer. 295 "If non-nil, always display the previous buffer.
@@ -305,19 +297,16 @@ This variable takes precedence over filtering, and even
305`ibuffer-never-show-predicates'." 297`ibuffer-never-show-predicates'."
306 :type '(choice (const :tag "Always" :value t) 298 :type '(choice (const :tag "Always" :value t)
307 (const :tag "Never" :value nil) 299 (const :tag "Never" :value nil)
308 (const :tag "Always except minibuffer" :value :nomini)) 300 (const :tag "Always except minibuffer" :value :nomini)))
309 :group 'ibuffer)
310 301
311(defcustom ibuffer-jump-offer-only-visible-buffers nil 302(defcustom ibuffer-jump-offer-only-visible-buffers nil
312 "If non-nil, only offer buffers visible in the Ibuffer buffer 303 "If non-nil, only offer buffers visible in the Ibuffer buffer
313in completion lists of the `ibuffer-jump-to-buffer' command." 304in completion lists of the `ibuffer-jump-to-buffer' command."
314 :type 'boolean 305 :type 'boolean)
315 :group 'ibuffer)
316 306
317(defcustom ibuffer-use-header-line (boundp 'header-line-format) 307(defcustom ibuffer-use-header-line (boundp 'header-line-format)
318 "If non-nil, display a header line containing current filters." 308 "If non-nil, display a header line containing current filters."
319 :type 'boolean 309 :type 'boolean)
320 :group 'ibuffer)
321 310
322(defcustom ibuffer-default-directory nil 311(defcustom ibuffer-default-directory nil
323 "The default directory to use for a new Ibuffer buffer. 312 "The default directory to use for a new Ibuffer buffer.
@@ -325,65 +314,54 @@ If nil, inherit the directory of the buffer in which `ibuffer' was
325called. Otherwise, this variable should be a string naming a 314called. Otherwise, this variable should be a string naming a
326directory, like `default-directory'." 315directory, like `default-directory'."
327 :type '(choice (const :tag "Inherit" :value nil) 316 :type '(choice (const :tag "Inherit" :value nil)
328 string) 317 string))
329 :group 'ibuffer)
330 318
331(defcustom ibuffer-help-buffer-modes 319(defcustom ibuffer-help-buffer-modes
332 '(help-mode apropos-mode Info-mode Info-edit-mode) 320 '(help-mode apropos-mode Info-mode Info-edit-mode)
333 "List of \"Help\" major modes." 321 "List of \"Help\" major modes."
334 :type '(repeat function) 322 :type '(repeat function))
335 :group 'ibuffer)
336 323
337(defcustom ibuffer-compressed-file-name-regexp 324(defcustom ibuffer-compressed-file-name-regexp
338 "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|xz\\|zip\\|z\\)$" 325 "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|xz\\|zip\\|z\\)$"
339 "Regexp to match compressed file names." 326 "Regexp to match compressed file names."
340 :version "24.1" ; added xz 327 :version "24.1" ; added xz
341 :type 'regexp 328 :type 'regexp)
342 :group 'ibuffer)
343 329
344(defcustom ibuffer-hook nil 330(defcustom ibuffer-hook nil
345 "Hook run when `ibuffer' is called." 331 "Hook run when `ibuffer' is called."
346 :type 'hook 332 :type 'hook)
347 :group 'ibuffer)
348 333
349(defcustom ibuffer-mode-hook nil 334(defcustom ibuffer-mode-hook nil
350 "Hook run upon entry into `ibuffer-mode'." 335 "Hook run upon entry into `ibuffer-mode'."
351 :type 'hook 336 :type 'hook
352 :options '(ibuffer-auto-mode) 337 :options '(ibuffer-auto-mode))
353 :group 'ibuffer)
354 338
355(defcustom ibuffer-load-hook nil 339(defcustom ibuffer-load-hook nil
356 "Hook run when Ibuffer is loaded." 340 "Hook run when Ibuffer is loaded."
357 :type 'hook 341 :type 'hook)
358 :group 'ibuffer)
359 342
360(defcustom ibuffer-marked-face 'warning 343(defcustom ibuffer-marked-face 'warning
361 "Face used for displaying marked buffers." 344 "Face used for displaying marked buffers."
362 :type 'face 345 :type 'face)
363 :group 'ibuffer)
364 346
365(defcustom ibuffer-deletion-face 'error 347(defcustom ibuffer-deletion-face 'error
366 "Face used for displaying buffers marked for deletion." 348 "Face used for displaying buffers marked for deletion."
367 :type 'face 349 :type 'face)
368 :group 'ibuffer)
369 350
370(defcustom ibuffer-title-face 'font-lock-type-face 351(defcustom ibuffer-title-face 'font-lock-type-face
371 "Face used for the title string." 352 "Face used for the title string."
372 :type 'face 353 :type 'face)
373 :group 'ibuffer)
374 354
375(defcustom ibuffer-filter-group-name-face 'bold 355(defcustom ibuffer-filter-group-name-face 'bold
376 "Face used for displaying filtering group names." 356 "Face used for displaying filtering group names."
377 :type 'face 357 :type 'face)
378 :group 'ibuffer)
379 358
380(defcustom ibuffer-directory-abbrev-alist nil 359(defcustom ibuffer-directory-abbrev-alist nil
381 "An alist of file name abbreviations like `directory-abbrev-alist'." 360 "An alist of file name abbreviations like `directory-abbrev-alist'."
382 :type '(repeat (cons :format "%v" 361 :type '(repeat (cons :format "%v"
383 :value ("" . "") 362 :value ("" . "")
384 (regexp :tag "From") 363 (regexp :tag "From")
385 (regexp :tag "To"))) 364 (regexp :tag "To"))))
386 :group 'ibuffer)
387 365
388(defvar ibuffer-mode-groups-popup 366(defvar ibuffer-mode-groups-popup
389 (let ((groups-map (make-sparse-keymap "Filter Groups"))) 367 (let ((groups-map (make-sparse-keymap "Filter Groups")))