Mercurial > emacs
comparison lisp/bs.el @ 78950:569e6cbc4c70
Don't defvar `fontlock-verbose'.
(bs-config-clear): Fix typo in docstring.
(bs--show-header): Use `dolist' instead of `mapcar'.
(bs-mode): Set `show-trailing-whitespace' to nil.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 03 Oct 2007 11:09:47 +0000 |
parents | 9355f9b7bbff |
children | e1da8e0b5ae2 |
comparison
equal
deleted
inserted
replaced
78949:54ce7f4cf913 | 78950:569e6cbc4c70 |
---|---|
128 ;; configuration perhaps is "files" which ignores buffer *scratch*. | 128 ;; configuration perhaps is "files" which ignores buffer *scratch*. |
129 | 129 |
130 ;;; History: | 130 ;;; History: |
131 | 131 |
132 ;;; Code: | 132 ;;; Code: |
133 | |
134 (defvar font-lock-verbose) | |
135 | 133 |
136 ;; ---------------------------------------------------------------------- | 134 ;; ---------------------------------------------------------------------- |
137 ;; Globals for customization | 135 ;; Globals for customization |
138 ;; ---------------------------------------------------------------------- | 136 ;; ---------------------------------------------------------------------- |
139 | 137 |
656 (buffer-disable-undo) | 654 (buffer-disable-undo) |
657 (setq major-mode 'bs-mode | 655 (setq major-mode 'bs-mode |
658 mode-name "Buffer-Selection-Menu" | 656 mode-name "Buffer-Selection-Menu" |
659 buffer-read-only t | 657 buffer-read-only t |
660 truncate-lines t | 658 truncate-lines t |
659 show-trailing-whitespace nil | |
661 font-lock-defaults '(bs-mode-font-lock-keywords t) | 660 font-lock-defaults '(bs-mode-font-lock-keywords t) |
662 font-lock-verbose nil) | 661 font-lock-verbose nil) |
663 (run-mode-hooks 'bs-mode-hook)) | 662 (run-mode-hooks 'bs-mode-hook)) |
664 | 663 |
665 (defun bs--restore-window-config () | 664 (defun bs--restore-window-config () |
1032 ;; ---------------------------------------------------------------------- | 1031 ;; ---------------------------------------------------------------------- |
1033 ;; Configurations: | 1032 ;; Configurations: |
1034 ;; ---------------------------------------------------------------------- | 1033 ;; ---------------------------------------------------------------------- |
1035 | 1034 |
1036 (defun bs-config-clear () | 1035 (defun bs-config-clear () |
1037 "*Reset all variables which specify a configuration. | 1036 "Reset all variables which specify a configuration. |
1038 These variables are `bs-dont-show-regexp', `bs-must-show-regexp', | 1037 These variables are `bs-dont-show-regexp', `bs-must-show-regexp', |
1039 `bs-dont-show-function', `bs-must-show-function' and | 1038 `bs-dont-show-function', `bs-must-show-function' and |
1040 `bs-buffer-sort-function'." | 1039 `bs-buffer-sort-function'." |
1041 (setq bs-dont-show-regexp nil | 1040 (setq bs-dont-show-regexp nil |
1042 bs-must-show-regexp nil | 1041 bs-must-show-regexp nil |
1381 (concat (make-string (/ (- len width) 2) ?\s) string) | 1380 (concat (make-string (/ (- len width) 2) ?\s) string) |
1382 string)))) | 1381 string)))) |
1383 | 1382 |
1384 (defun bs--show-header () | 1383 (defun bs--show-header () |
1385 "Insert header for Buffer Selection Menu in current buffer." | 1384 "Insert header for Buffer Selection Menu in current buffer." |
1386 (mapcar '(lambda (string) | 1385 (dolist (string (bs--create-header)) |
1387 (insert string "\n")) | 1386 (insert string "\n"))) |
1388 (bs--create-header))) | |
1389 | 1387 |
1390 (defun bs--get-name-length () | 1388 (defun bs--get-name-length () |
1391 "Return value of `bs--name-entry-length'." | 1389 "Return value of `bs--name-entry-length'." |
1392 bs--name-entry-length) | 1390 bs--name-entry-length) |
1393 | 1391 |