Commit 7fdbcd83 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* x-dnd.el (x-dnd-maybe-call-test-function):

* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
parent 2ccbc060
2009-11-13 Stefan Monnier <monnier@iro.umontreal.ca>
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 Glenn Morris <rgm@gnu.org>
* Makefile.in (ELCFILES): Regenerate.
2009-11-13 Michael Albinus <michael.albinus@gmx.de>
* net/dbus.el (dbus-registered-objects-table): Renamed from
`dbus-registered-functions-table', because it contains also
properties.
* net/dbus.el (dbus-registered-objects-table): Rename from
`dbus-registered-functions-table', because it contains also properties.
(dbus-unregister-object): Unregister also properties.
(dbus-get-property, dbus-set-property, dbus-get-all-properties):
Use a timeout of 500 msec, in order to not block.
......@@ -448,8 +530,8 @@
* custom.el (custom-declare-group): Purecopy standard-value.
(custom-declare-group): Purecopy custom-prefix.
* international/mule.el (load-with-code-conversion): Call
do-after-load-evaluation unconditionally.
* international/mule.el (load-with-code-conversion):
Call do-after-load-evaluation unconditionally.
* emacs-lisp/bytecomp.el (byte-compile-output-file-form): Handle defvaralias.
......
......@@ -5605,7 +5605,7 @@ alternate presentation format for the outline:
(goto-char beg)
(allout-topic-flat-index))
'(1))))
(save-excursion (set-buffer tobuf)(erase-buffer))
(with-current-buffer tobuf (erase-buffer))
(allout-process-exposed 'allout-insert-listified
beg
end
......@@ -6283,8 +6283,7 @@ of the availability of a cached copy."
;; Symmetric hereon:
(save-excursion
(set-buffer allout-buffer)
(with-current-buffer allout-buffer
(let* ((hint (if (and (not (string= allout-passphrase-hint-string ""))
(or (equal allout-passphrase-hint-handling 'always)
(and (equal allout-passphrase-hint-handling
......@@ -6481,8 +6480,7 @@ Derived from value of `allout-passphrase-verifier-string'."
"True if passphrase successfully decrypts verifier, nil otherwise.
\"Otherwise\" includes absence of passphrase verifier."
(save-excursion
(set-buffer allout-buffer)
(with-current-buffer allout-buffer
(and (boundp 'allout-passphrase-verifier-string)
allout-passphrase-verifier-string
(allout-encrypt-string (allout-get-encryption-passphrase-verifier)
......
......@@ -736,8 +736,7 @@ Returns list of symbols and documentation found."
(apropos-sort-by-scores apropos-documentation-sort-by-scores)
f v sf sv)
(unwind-protect
(save-excursion
(set-buffer standard-input)
(with-current-buffer standard-input
(apropos-documentation-check-doc-file)
(if do-all
(mapatoms
......
......@@ -116,8 +116,7 @@ The buffer is left in Command History mode."
(prin1 (car history))
(terpri))
(setq history (cdr history))))
(save-excursion
(set-buffer "*Command History*")
(with-current-buffer "*Command History*"
(goto-char (point-min))
(if (eobp)
(error "No command history")
......
......@@ -62,8 +62,7 @@
;; the article for expansion):
;; (set (make-local-variable 'dabbrev-friend-buffer-function)
;; (lambda (buffer)
;; (save-excursion
;; (set-buffer buffer)
;; (with-current-buffer buffer
;; (memq major-mode '(news-reply-mode gnus-article-mode)))))
......@@ -594,8 +593,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
;;; Checks if OTHER-BUFFER has the same major mode as current buffer.
(defun dabbrev--same-major-mode-p (other-buffer)
(eq major-mode
(save-excursion
(set-buffer other-buffer)
(with-current-buffer other-buffer
major-mode)))
;;; Back over all abbrev type characters and then moves forward over
......
......@@ -1251,8 +1251,7 @@ Special value `always' suppresses confirmation."
(let ((expanded-from-dir (expand-file-name from-dir))
(blist (buffer-list)))
(while blist
(save-excursion
(set-buffer (car blist))
(with-current-buffer (car blist)
(if (and buffer-file-name
(dired-in-this-tree buffer-file-name expanded-from-dir))
(let ((modflag (buffer-modified-p))
......@@ -1530,8 +1529,7 @@ Optional arg HOW-TO determiness how to treat the target.
;; non-dired buffer may want to profit from this function, e.g. vm-uudecode
(if dired-dwim-target
(let* ((other-buf (window-buffer (next-window)))
(other-dir (save-excursion
(set-buffer other-buf)
(other-dir (with-current-buffer other-buf
(and (eq major-mode 'dired-mode)
(dired-current-directory)))))
(or other-dir this-dir))
......
......@@ -819,8 +819,7 @@ for a remote directory. This feature is used by Auto Revert Mode."
(while blist
(if (null (buffer-name (cdr (car blist))))
(setq blist (cdr blist))
(save-excursion
(set-buffer (cdr (car blist)))
(with-current-buffer (cdr (car blist))
(if (and (eq major-mode mode)
dired-directory ;; nil during find-alternate-file
(equal dirname
......
......@@ -87,8 +87,7 @@ Valid symbols are `truncation', `wrap', `escape', `control',
(princ "\nVertical window border glyph: ")
(prin1 (display-table-slot dt 'vertical-border))
(princ "\nCharacter display glyph sequences:\n")
(save-excursion
(set-buffer standard-output)
(with-current-buffer standard-output
(let ((vector (make-vector 256 nil))
(i 0))
(while (< i 256)
......
......@@ -197,8 +197,7 @@ set to the appropriate coding system, and the value of
(find-file filename)))
(defun find-file-not-found-set-buffer-file-coding-system ()
(save-excursion
(set-buffer (current-buffer))
(with-current-buffer (current-buffer)
(let ((coding buffer-file-coding-system))
;; buffer-file-coding-system is already set by
;; find-operation-coding-system, which was called from
......
......@@ -34,8 +34,7 @@
With prefix arg NOCONFIRM, execute current line as-is without editing."
(interactive "P")
(let (todo)
(save-excursion
(set-buffer "*Command History*")
(with-current-buffer "*Command History*"
(beginning-of-line)
(setq todo (read (current-buffer)))
(if (boundp 'electric-history-in-progress)
......
......@@ -1225,8 +1225,7 @@ delimiter regions"))
(unwind-protect
(let ((directory default-directory)
proc)
(save-excursion
(set-buffer buffer)
(with-current-buffer buffer
(erase-buffer)
(setq default-directory directory)
(if (or (memq system-type '(emx ms-dos windows-nt windows-95))
......@@ -1283,8 +1282,7 @@ delimiter regions"))
(if (and (memq (process-status process) '(exit signal))
(buffer-name (process-buffer process)))
(progn
(save-excursion
(set-buffer (process-buffer process))
(with-current-buffer (process-buffer process)
(setq mode-line-process nil))
(delete-process process))))
......@@ -1354,8 +1352,7 @@ arguments to `skip-chars-forward'."
ediff-forward-word-function)
ediff-forward-word-function))
inbuf-syntax-tbl sv-point diff-string)
(save-excursion
(set-buffer in-buffer)
(with-current-buffer in-buffer
(setq inbuf-syntax-tbl
(if control-buf
(ediff-with-current-buffer control-buf
......
......@@ -1639,8 +1639,7 @@ Useful commands:
(cond ((ediff-buffer-live-p custom-diff-buf)
;; for live session buffers we do them first because the user may
;; have changed them with respect to the underlying files
(save-excursion
(set-buffer meta-diff-buff)
(with-current-buffer meta-diff-buff
(goto-char (point-max))
(insert-buffer-substring custom-diff-buf)
(insert "\n")))
......@@ -1649,8 +1648,8 @@ Useful commands:
ediff-merge-directories
ediff-merge-directories-with-ancestor))
;; get diffs by calling shell command on ediff-custom-diff-program
(save-excursion
(set-buffer (setq tmp-buf (get-buffer-create ediff-tmp-buffer)))
(with-current-buffer
(setq tmp-buf (get-buffer-create ediff-tmp-buffer))
(erase-buffer)
(shell-command
(format
......@@ -1662,8 +1661,7 @@ Useful commands:
)
t)
)
(save-excursion
(set-buffer meta-diff-buff)
(with-current-buffer meta-diff-buff
(goto-char (point-max))
(insert-buffer-substring tmp-buf)
(insert "\n")))
......
......@@ -343,8 +343,7 @@ to invocation.")
(setq buffer-C
(get-buffer-create
(ediff-unique-buffer-name "*ediff-merge" "*")))
(save-excursion
(set-buffer buffer-C)
(with-current-buffer buffer-C
(insert-buffer-substring buf)
(goto-char (point-min))
(funcall (ediff-with-current-buffer buf major-mode))
......
......@@ -123,8 +123,7 @@ comparison or merge operations are being performed."
(fundamental-mode))
(let ((output-buffer (ediff-rcs-get-output-buffer filename buff)))
(delete-windows-on output-buffer)
(save-excursion
(set-buffer output-buffer)
(with-current-buffer output-buffer
(apply 'call-process "co" nil t nil
;; -q: quiet (no diagnostics)
(append switches rcs-default-co-switches
......
......@@ -977,8 +977,7 @@ lines. For large regions, use `ediff-regions-linewise'."
(buffer-B
(ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-"))
reg-A-beg reg-A-end reg-B-beg reg-B-end)
(save-excursion
(set-buffer buffer-A)
(with-current-buffer buffer-A
(setq reg-A-beg (region-beginning)
reg-A-end (region-end))
(set-buffer buffer-B)
......@@ -1018,8 +1017,7 @@ lines. For small regions, use `ediff-regions-wordwise'."
(buffer-B
(ediff-clone-buffer-for-region-comparison buffer-B "-Region.B-"))
reg-A-beg reg-A-end reg-B-beg reg-B-end)
(save-excursion
(set-buffer buffer-A)
(with-current-buffer buffer-A
(setq reg-A-beg (region-beginning)
reg-A-end (region-end))
;; enlarge the region to hold full lines
......
......@@ -321,8 +321,7 @@ will select it.)"
;;>> suspend updating of the tick in order to allow
;;>> things like momentary-string-display)
(and b
(save-excursion
(set-buffer b)
(with-current-buffer b
(set-buffer-modified-p t)))
(fset 'help-print-return-message 'ignore)
(call-interactively fun)
......@@ -333,8 +332,7 @@ will select it.)"
(not (buffer-modified-p b)))))
(fset 'help-print-return-message p)
(and b (buffer-name b)
(save-excursion
(set-buffer b)
(with-current-buffer b
(set-buffer-modified-p m))))))
(with-electric-help 'ignore name t))))
......
......@@ -2060,8 +2060,7 @@ With a negative argument, turn off Skip-Prefers mode."
(A-end (1- (aref diff-vector 1)))
;; so further kills don't append
this-command)
(save-excursion
(set-buffer emerge-A-buffer)
(with-current-buffer emerge-A-buffer
(copy-region-as-kill A-begin A-end))))
(defun emerge-copy-as-kill-B ()
......@@ -2074,8 +2073,7 @@ With a negative argument, turn off Skip-Prefers mode."
(B-end (1- (aref diff-vector 3)))
;; so further kills don't append
this-command)
(save-excursion
(set-buffer emerge-B-buffer)
(with-current-buffer emerge-B-buffer
(copy-region-as-kill B-begin B-end))))
(defun emerge-insert-A (arg)
......@@ -2170,8 +2168,7 @@ Use C-u l to reset the windows afterward."
(princ (buffer-name))))
(princ "\n")))
(princ emerge-output-description)
(save-excursion
(set-buffer standard-output)
(with-current-buffer standard-output
(help-mode)))))
(defun emerge-join-differences (arg)
......@@ -3020,8 +3017,7 @@ If some prefix of KEY has a non-prefix definition, it is redefined."
;; minor-mode indicator))
;; (princ (documentation minor-mode)))))
;; (setq minor-modes (cdr minor-modes))))
;; (save-excursion
;; (set-buffer standard-output)
;; (with-current-buffer standard-output
;; (help-mode))
;; (help-print-return-message)))
......
......@@ -463,8 +463,7 @@ If ARG is non-nil, mark the key."
(apply #'epa--list-keys epa-list-keys-arguments))
(defun epa--marked-keys ()
(or (save-excursion
(set-buffer epa-keys-buffer)
(or (with-current-buffer epa-keys-buffer
(goto-char (point-min))
(let (keys key)
(while (re-search-forward "^\\*" nil t)
......@@ -479,11 +478,10 @@ If ARG is non-nil, mark the key."
(list key))))))
(defun epa--select-keys (prompt keys)
(save-excursion
(unless (and epa-keys-buffer
(buffer-live-p epa-keys-buffer))
(setq epa-keys-buffer (generate-new-buffer "*Keys*")))
(set-buffer epa-keys-buffer)
(unless (and epa-keys-buffer
(buffer-live-p epa-keys-buffer))
(setq epa-keys-buffer (generate-new-buffer "*Keys*")))
(with-current-buffer epa-keys-buffer
(epa-key-list-mode)
(let ((inhibit-read-only t)
buffer-read-only)
......@@ -615,8 +613,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
(setq epa-info-buffer (generate-new-buffer "*Info*")))
(if (get-buffer-window epa-info-buffer)
(delete-window (get-buffer-window epa-info-buffer)))
(save-excursion
(set-buffer epa-info-buffer)
(with-current-buffer epa-info-buffer
(let ((inhibit-read-only t)
buffer-read-only)
(erase-buffer)
......@@ -716,8 +713,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
(setq type 'detached))
((eq c ??)
(with-output-to-temp-buffer "*Help*"
(save-excursion
(set-buffer standard-output)
(with-current-buffer standard-output
(insert "\
n - Create a normal signature
c - Create a cleartext signature
......
......@@ -1143,8 +1143,7 @@ This function is for internal use only."
(goto-char (point-max))
(insert input)))
(if (buffer-live-p (process-buffer process))
(save-excursion
(set-buffer (process-buffer process))
(with-current-buffer (process-buffer process)
(goto-char (point-max))
(insert input)
(unless epg-process-filter-running
......@@ -1927,8 +1926,7 @@ You can then use `write-region' to write new data into the file."
(defun epg-cancel (context)
(if (buffer-live-p (process-buffer (epg-context-process context)))
(save-excursion
(set-buffer (process-buffer (epg-context-process context)))
(with-current-buffer (process-buffer (epg-context-process context))
(epg-context-set-result-for
epg-context 'error
(cons '(quit)
......
......@@ -300,8 +300,7 @@ Optional argument STRING is a string upon which to add text properties."
See `ezimage-expand-image-button-alist' for details."
(interactive)
(with-output-to-temp-buffer "*Ezimage Images*"
(save-excursion
(set-buffer "*Ezimage Images*")
(with-current-buffer "*Ezimage Images*"
(goto-char (point-max))
(insert "Ezimage image cache.\n\n")
(let ((start (point)) (end nil))
......@@ -324,8 +323,7 @@ See `ezimage-expand-image-button-alist' for details."
See `ezimage-expand-image-button-alist' for details."
(interactive)
(with-output-to-temp-buffer "*Ezimage Images*"
(save-excursion
(set-buffer "*Ezimage Images*")
(with-current-buffer "*Ezimage Images*"
(goto-char (point-max))
(insert "Ezimage image cache.\n\n")
(let ((start (point)) (end nil))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment