diff options
| author | Juri Linkov | 2007-10-22 23:45:05 +0000 |
|---|---|---|
| committer | Juri Linkov | 2007-10-22 23:45:05 +0000 |
| commit | 73b27641c5bf9d5f96fa8447440781d405d1edfd (patch) | |
| tree | e8940107b70aabfdceec66de8ce02228a94761de | |
| parent | d240f431cbbddfeb3ae2ac8a2879ce34bf52d111 (diff) | |
| download | emacs-73b27641c5bf9d5f96fa8447440781d405d1edfd.tar.gz emacs-73b27641c5bf9d5f96fa8447440781d405d1edfd.zip | |
(change-log-mode): Make and set buffer-local variable
isearch-buffers-next-buffer-function to change-log-next-buffer.
Call isearch-buffers-minor-mode.
(change-log-next-buffer): New function.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/add-log.el | 24 |
2 files changed, 37 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c828474c12f..1ca5e67c6ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2007-10-22 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch-multi.el: New file. | ||
| 4 | |||
| 5 | * isearch.el (isearch-search-string): After finding the next | ||
| 6 | occurrence switch to buffer isearch-buffers-current-buffer when | ||
| 7 | isearch-buffers-next-buffer-function is non-nil and | ||
| 8 | isearch-buffers-current-buffer is live. | ||
| 9 | |||
| 10 | * add-log.el (change-log-mode): Make and set buffer-local variable | ||
| 11 | isearch-buffers-next-buffer-function to change-log-next-buffer. | ||
| 12 | Call isearch-buffers-minor-mode. | ||
| 13 | (change-log-next-buffer): New function. | ||
| 14 | |||
| 1 | 2007-10-22 Carsten Dominik <dominik@science.uva.nl> | 15 | 2007-10-22 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 16 | ||
| 3 | * org.el (org-read-date-get-relative): New function. | 17 | * org.el (org-read-date-get-relative): New function. |
diff --git a/lisp/add-log.el b/lisp/add-log.el index a58d6318670..5ec49861906 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -760,7 +760,29 @@ Runs `change-log-mode-hook'. | |||
| 760 | 'change-log-resolve-conflict) | 760 | 'change-log-resolve-conflict) |
| 761 | (set (make-local-variable 'adaptive-fill-regexp) "\\s *") | 761 | (set (make-local-variable 'adaptive-fill-regexp) "\\s *") |
| 762 | (set (make-local-variable 'font-lock-defaults) | 762 | (set (make-local-variable 'font-lock-defaults) |
| 763 | '(change-log-font-lock-keywords t nil nil backward-paragraph))) | 763 | '(change-log-font-lock-keywords t nil nil backward-paragraph)) |
| 764 | (set (make-local-variable 'isearch-buffers-next-buffer-function) | ||
| 765 | 'change-log-next-buffer) | ||
| 766 | (isearch-buffers-minor-mode)) | ||
| 767 | |||
| 768 | (defun change-log-next-buffer (&optional buffer wrap) | ||
| 769 | "Return the next buffer in the series of ChangeLog file buffers. | ||
| 770 | This function is used for multiple buffers isearch. | ||
| 771 | A sequence of buffers is formed by ChangeLog files with decreasing | ||
| 772 | numeric file name suffixes in the directory of the initial ChangeLog | ||
| 773 | file were isearch was started." | ||
| 774 | (let* ((name (change-log-name)) | ||
| 775 | (files (cons name (sort (file-expand-wildcards | ||
| 776 | (concat name "[-.][0-9]*")) | ||
| 777 | (lambda (a b) | ||
| 778 | (version< (substring b (length name)) | ||
| 779 | (substring a (length name))))))) | ||
| 780 | (files (if isearch-forward files (reverse files)))) | ||
| 781 | (find-file-noselect | ||
| 782 | (if wrap | ||
| 783 | (car files) | ||
| 784 | (cadr (member (file-name-nondirectory (buffer-file-name buffer)) | ||
| 785 | files)))))) | ||
| 764 | 786 | ||
| 765 | ;; It might be nice to have a general feature to replace this. The idea I | 787 | ;; It might be nice to have a general feature to replace this. The idea I |
| 766 | ;; have is a variable giving a regexp matching text which should not be | 788 | ;; have is a variable giving a regexp matching text which should not be |