diff options
| author | Karl Fogel | 2009-11-20 21:12:54 +0000 |
|---|---|---|
| committer | Karl Fogel | 2009-11-20 21:12:54 +0000 |
| commit | 6aeaa3dcde4b682244b26b2f1443d9810bd1a3c9 (patch) | |
| tree | 3595393f32caf391a5b6d20be9e698fdf3b19832 /lisp | |
| parent | cc7748fbc73af299b8ad8fb3d92a2b7d201cb328 (diff) | |
| download | emacs-6aeaa3dcde4b682244b26b2f1443d9810bd1a3c9.tar.gz emacs-6aeaa3dcde4b682244b26b2f1443d9810bd1a3c9.zip | |
* lisp/bookmark.el: Formatting and doc fixes only:
(bookmark-search-delay): Shorten doc string to fit in 80 columns.
(bookmark-bmenu-search): Wrap to fit within 80 columns. Minor
grammar and punctuation fixes in doc string.
(bookmark-read-search-input): Adjust to fit within 80 columns.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/bookmark.el | 29 |
2 files changed, 26 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cbddccc3ba0..dab502c6bb8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-11-20 Karl Fogel <karl.fogel@red-bean.com> | ||
| 2 | |||
| 3 | * bookmark.el Formatting and doc fixes only: | ||
| 4 | (bookmark-search-delay): Shorten doc string to fit in 80 columns. | ||
| 5 | (bookmark-bmenu-search): Wrap to fit within 80 columns. | ||
| 6 | Minor grammar and punctuation fixes in doc string. | ||
| 7 | (bookmark-read-search-input): Adjust to fit within 80 columns. | ||
| 8 | |||
| 1 | 2009-11-20 Tassilo Horn <tassilo@member.fsf.org> | 9 | 2009-11-20 Tassilo Horn <tassilo@member.fsf.org> |
| 2 | 10 | ||
| 3 | * progmodes/cc-cmds.el (c-forward-into-nomenclature) | 11 | * progmodes/cc-cmds.el (c-forward-into-nomenclature) |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index a68f83a29b7..e9e4e727d9e 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -198,7 +198,7 @@ following in your `.emacs' file: | |||
| 198 | 198 | ||
| 199 | 199 | ||
| 200 | (defcustom bookmark-search-delay 0.2 | 200 | (defcustom bookmark-search-delay 0.2 |
| 201 | "*Display when searching bookmarks is updated all `bookmark-search-delay' seconds." | 201 | "*When searching bookmarks, redisplay every `bookmark-search-delay' seconds." |
| 202 | :group 'bookmark | 202 | :group 'bookmark |
| 203 | :type 'integer) | 203 | :type 'integer) |
| 204 | 204 | ||
| @@ -2102,7 +2102,8 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 2102 | (defun bookmark-read-search-input () | 2102 | (defun bookmark-read-search-input () |
| 2103 | "Read each keyboard input and add it to `bookmark-search-pattern'." | 2103 | "Read each keyboard input and add it to `bookmark-search-pattern'." |
| 2104 | (setq bookmark-search-pattern "") ; Always reset pattern to empty string | 2104 | (setq bookmark-search-pattern "") ; Always reset pattern to empty string |
| 2105 | (let ((prompt (propertize bookmark-search-prompt 'face '((:foreground "cyan")))) | 2105 | (let ((prompt (propertize bookmark-search-prompt |
| 2106 | 'face '((:foreground "cyan")))) | ||
| 2106 | (inhibit-quit t) | 2107 | (inhibit-quit t) |
| 2107 | (tmp-list ()) | 2108 | (tmp-list ()) |
| 2108 | char) | 2109 | char) |
| @@ -2113,14 +2114,17 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 2113 | (setq char (read-char (concat prompt bookmark-search-pattern))) | 2114 | (setq char (read-char (concat prompt bookmark-search-pattern))) |
| 2114 | (error (throw 'break nil))) | 2115 | (error (throw 'break nil))) |
| 2115 | (case char | 2116 | (case char |
| 2116 | ((or ?\e ?\r) (throw 'break nil)) ; RET or ESC break search loop and lead to [1]. | 2117 | ((or ?\e ?\r) ; RET or ESC break search loop and lead to [1]. |
| 2117 | (?\d (pop tmp-list) ; Delete last char of `bookmark-search-pattern' with DEL | 2118 | (throw 'break nil)) |
| 2118 | (setq bookmark-search-pattern (mapconcat 'identity (reverse tmp-list) "")) | 2119 | (?\d (pop tmp-list) ; Delete last char of `bookmark-search-pattern' |
| 2120 | (setq bookmark-search-pattern | ||
| 2121 | (mapconcat 'identity (reverse tmp-list) "")) | ||
| 2119 | (throw 'continue nil)) | 2122 | (throw 'continue nil)) |
| 2120 | (?\C-g (setq bookmark-quit-flag t) (throw 'break nil)) | 2123 | (?\C-g (setq bookmark-quit-flag t) (throw 'break nil)) |
| 2121 | (t | 2124 | (t |
| 2122 | (push (text-char-description char) tmp-list) | 2125 | (push (text-char-description char) tmp-list) |
| 2123 | (setq bookmark-search-pattern (mapconcat 'identity (reverse tmp-list) "")) | 2126 | (setq bookmark-search-pattern |
| 2127 | (mapconcat 'identity (reverse tmp-list) "")) | ||
| 2124 | (throw 'continue nil)))))))) | 2128 | (throw 'continue nil)))))))) |
| 2125 | 2129 | ||
| 2126 | 2130 | ||
| @@ -2138,17 +2142,20 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 2138 | 2142 | ||
| 2139 | ;;;###autoload | 2143 | ;;;###autoload |
| 2140 | (defun bookmark-bmenu-search () | 2144 | (defun bookmark-bmenu-search () |
| 2141 | "Incremental search of bookmarks matching `bookmark-search-pattern'. | 2145 | "Incrementally search bookmarks matching `bookmark-search-pattern'. |
| 2142 | `bookmark-search-pattern' is build incrementally with `bookmark-read-search-input'" | 2146 | `bookmark-search-pattern' is built incrementally with |
| 2147 | `bookmark-read-search-input'." | ||
| 2143 | (interactive) | 2148 | (interactive) |
| 2144 | (when (string= (buffer-name (current-buffer)) "*Bookmark List*") | 2149 | (when (string= (buffer-name (current-buffer)) "*Bookmark List*") |
| 2145 | (let ((bmk (bookmark-bmenu-bookmark))) | 2150 | (let ((bmk (bookmark-bmenu-bookmark))) |
| 2146 | (unwind-protect | 2151 | (unwind-protect |
| 2147 | (progn | 2152 | (progn |
| 2148 | (setq bookmark-search-timer | 2153 | (setq bookmark-search-timer |
| 2149 | (run-with-idle-timer bookmark-search-delay 'repeat | 2154 | (run-with-idle-timer |
| 2150 | #'(lambda () | 2155 | bookmark-search-delay 'repeat |
| 2151 | (bookmark-bmenu-filter-alist-by-regexp bookmark-search-pattern)))) | 2156 | #'(lambda () |
| 2157 | (bookmark-bmenu-filter-alist-by-regexp | ||
| 2158 | bookmark-search-pattern)))) | ||
| 2152 | (bookmark-read-search-input)) | 2159 | (bookmark-read-search-input)) |
| 2153 | (progn ; [1] Stop timer. | 2160 | (progn ; [1] Stop timer. |
| 2154 | (bookmark-bmenu-cancel-search) | 2161 | (bookmark-bmenu-cancel-search) |