mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 06:00:41 -08:00
(diary-list-entries): Replace superfluous save-excursion with
save-current-buffer. Widen before searching. (Bug#5093) (diary-list-sexp-entries): Remove superfluous save-excursion.
This commit is contained in:
parent
c79fb97624
commit
5813f6ef75
2 changed files with 40 additions and 32 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2009-12-02 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* calendar/diary-lib.el (diary-list-entries): Replace superfluous
|
||||||
|
save-excursion with save-current-buffer.
|
||||||
|
Widen before searching. (Bug#5093)
|
||||||
|
(diary-list-sexp-entries): Remove superfluous save-excursion.
|
||||||
|
|
||||||
2009-12-02 Michael Welsh Duggan <mwd@cert.org>
|
2009-12-02 Michael Welsh Duggan <mwd@cert.org>
|
||||||
|
|
||||||
* woman.el (woman-make-bufname): Handle man-pages with "." in the
|
* woman.el (woman-make-bufname): Handle man-pages with "." in the
|
||||||
|
|
|
||||||
|
|
@ -744,7 +744,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
|
||||||
(diary-buffer (find-buffer-visiting diary-file))
|
(diary-buffer (find-buffer-visiting diary-file))
|
||||||
diary-entries-list file-glob-attrs)
|
diary-entries-list file-glob-attrs)
|
||||||
(message "Preparing diary...")
|
(message "Preparing diary...")
|
||||||
(save-excursion
|
(save-current-buffer
|
||||||
(if (not diary-buffer)
|
(if (not diary-buffer)
|
||||||
(set-buffer (find-file-noselect diary-file t))
|
(set-buffer (find-file-noselect diary-file t))
|
||||||
(set-buffer diary-buffer)
|
(set-buffer diary-buffer)
|
||||||
|
|
@ -765,6 +765,8 @@ LIST-ONLY is non-nil, in which case it just returns the list."
|
||||||
;; d-s-p is passed to the diary display function.
|
;; d-s-p is passed to the diary display function.
|
||||||
(let ((diary-saved-point (point)))
|
(let ((diary-saved-point (point)))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
(save-restriction
|
||||||
|
(widen) ; bug#5093
|
||||||
(setq file-glob-attrs (cadr (diary-pull-attrs nil "")))
|
(setq file-glob-attrs (cadr (diary-pull-attrs nil "")))
|
||||||
(with-syntax-table diary-syntax-table
|
(with-syntax-table diary-syntax-table
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
@ -795,7 +797,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
|
||||||
(funcall (or diary-display-function
|
(funcall (or diary-display-function
|
||||||
'diary-simple-display))))
|
'diary-simple-display))))
|
||||||
(run-hooks 'diary-hook)
|
(run-hooks 'diary-hook)
|
||||||
diary-entries-list))))))
|
diary-entries-list)))))))
|
||||||
|
|
||||||
(define-obsolete-function-alias 'list-diary-entries 'diary-list-entries "22.1")
|
(define-obsolete-function-alias 'list-diary-entries 'diary-list-entries "22.1")
|
||||||
|
|
||||||
|
|
@ -1694,8 +1696,7 @@ best if they are non-marking."
|
||||||
sexp-start sexp entry specifier entry-start line-start
|
sexp-start sexp entry specifier entry-start line-start
|
||||||
diary-entry temp literal)
|
diary-entry temp literal)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(save-excursion
|
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
|
||||||
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))))
|
|
||||||
(while (re-search-forward s-entry nil t)
|
(while (re-search-forward s-entry nil t)
|
||||||
(backward-char 1)
|
(backward-char 1)
|
||||||
(setq sexp-start (point))
|
(setq sexp-start (point))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue