diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-31 02:38:34 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-31 02:38:34 +0000 |
commit | 9a5293129d0e7b2b6333a735f054d2273572b1b3 (patch) | |
tree | a04125bf576f98c659f65f5b4a35cbfedc494652 /lisp/net | |
parent | d566f228251359ebf1f1f5ab69753089c04e5515 (diff) | |
download | emacs-9a5293129d0e7b2b6333a735f054d2273572b1b3.tar.gz |
* textmodes/two-column.el (2C-split):
* textmodes/texnfo-upd.el (texinfo-multi-file-included-list):
* textmodes/tex-mode.el (tex-set-buffer-directory):
* textmodes/spell.el (spell-region, spell-string):
* textmodes/reftex.el (reftex-erase-buffer):
(reftex-get-file-buffer-force, reftex-kill-temporary-buffers):
* textmodes/reftex-toc.el (reftex-toc-promote-action):
* textmodes/reftex-sel.el (reftex-get-offset, reftex-insert-docstruct)
(reftex-select-item):
* textmodes/reftex-ref.el (reftex-label-info-update)
(reftex-offer-label-menu):
* textmodes/reftex-index.el (reftex-index-change-entry)
(reftex-index-phrases-info):
* textmodes/reftex-global.el (reftex-create-tags-file)
(reftex-save-all-document-buffers, reftex-ensure-write-access):
* textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite)
(reftex-view-crossref-from-bibtex):
* textmodes/reftex-cite.el (reftex-bibtex-selection-callback)
(reftex-extract-bib-entries-from-thebibliography)
(reftex-all-used-citation-keys, reftex-create-bibtex-file):
* textmodes/refbib.el (r2b-capitalize-title):
(r2b-convert-buffer, r2b-help):
* textmodes/page-ext.el (pages-directory)
(pages-directory-goto-with-mouse):
* textmodes/bibtex.el (bibtex-validate-globally):
* textmodes/bib-mode.el (bib-capitalize-title):
* textmodes/artist.el (artist-clear-buffer, artist-system):
* progmodes/xscheme.el (global-set-scheme-interaction-buffer):
(local-set-scheme-interaction-buffer, xscheme-process-filter)
(verify-xscheme-buffer, xscheme-enter-interaction-mode)
(xscheme-enter-debugger-mode, xscheme-debugger-mode-p)
(xscheme-send-control-g-interrupt, xscheme-start-process)
(xscheme-process-sentinel, xscheme-cd):
* progmodes/verilog-mode.el (verilog-read-always-signals)
(verilog-set-define, verilog-getopt-file)
(verilog-module-inside-filename-p):
* progmodes/sh-script.el:
* progmodes/python.el (python-pdbtrack-get-source-buffer)
(python-pdbtrack-grub-for-buffer, python-execute-file):
* progmodes/octave-inf.el (inferior-octave):
* progmodes/idlwave.el (idlwave-scan-user-lib-files)
(idlwave-shell-compile-helper-routines, idlwave-set-local)
(idlwave-display-completion-list-xemacs, idlwave-list-abbrevs)
(idlwave-display-completion-list-emacs, idlwave-list-load-path-shadows)
(idlwave-completion-fontify-classes, idlwave-display-calling-sequence):
* progmodes/idlw-shell.el (idlwave-shell-examine-display-clear)
(idlwave-shell-filter, idlwave-shell-examine-highlight)
(idlwave-shell-sentinel, idlwave-shell-filter-directory)
(idlwave-shell-display-line, idlwave-shell-set-bp-in-module)
(idlwave-shell-examine-display, idlwave-shell-run-region)
(idlwave-shell-filter-bp, idlwave-shell-save-and-action)
(idlwave-shell-sources-filter, idlwave-shell-goto-next-error):
* progmodes/idlw-help.el (idlwave-help-get-special-help)
(idlwave-help-get-help-buffer):
* progmodes/gud.el (gud-basic-call, gud-find-class)
(gud-tooltip-activate-mouse-motions-if-enabled):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/ebrowse.el (ebrowse-member-table, ebrowse-save-tree-as)
(ebrowse-view-exit-fn, ebrowse-tags-list-members-in-file)
(ebrowse-tags-next-file):
* progmodes/ebnf2ps.el (ebnf-generate-eps, ebnf-generate-eps)
(ebnf-eps-production-list, ebnf-begin-file, ebnf-log)
(ebnf-eps-finish-and-write):
* progmodes/cpp.el (cpp-edit-save):
* progmodes/cperl-mode.el (cperl-pod-to-manpage):
* progmodes/cc-defs.el (c-emacs-features):
* progmodes/antlr-mode.el (antlr-invalidate-context-cache)
(antlr-directory-dependencies):
* progmodes/ada-xref.el (ada-gnat-parse-gpr, ada-get-ali-file-name)
(ada-run-application, ada-find-in-src-path, ada-goto-parent)
(ada-find-any-references, ada-make-filename-from-adaname)
(ada-make-body-gnatstub):
* obsolete/rnews.el (news-list-news-groups):
* obsolete/resume.el (resume-suspend-hook,resume-write-buffer-to-file):
* obsolete/iso-acc.el (iso-acc-minibuf-setup):
* net/rcirc.el (rcirc-debug):
* net/newst-treeview.el (newsticker--treeview-list-add-item)
(newsticker--treeview-list-clear, newsticker-treeview-browse-url)
(newsticker--treeview-list-update-faces, newsticker-treeview-save)
(newsticker--treeview-item-show-text, newsticker--treeview-item-show)
(newsticker--treeview-tree-update-tag,newsticker--treeview-buffer-init)
(newsticker-treeview-show-item, newsticker--treeview-unfold-node)
(newsticker--treeview-list-clear-highlight)
(newsticker--treeview-list-update-highlight)
(newsticker--treeview-list-highlight-start)
(newsticker--treeview-tree-update-highlight)
(newsticker--treeview-get-selected-item)
(newsticker-treeview-mark-list-items-old)
(newsticker--treeview-set-current-node):
* net/newst-plainview.el (newsticker--buffer-set-uptodate):
* net/newst-backend.el (newsticker--get-news-by-funcall)
(newsticker--get-news-by-wget, newsticker--image-get)
(newsticker--image-sentinel):
* net/mairix.el (mairix-rmail-fetch-field, mairix-gnus-fetch-field):
* net/eudcb-ph.el (eudc-ph-do-request, eudc-ph-open-session):
(eudc-ph-close-session):
* net/eudc.el (eudc-save-options):
* language/thai-word.el (thai-update-word-table):
* language/japan-util.el (japanese-string-conversion):
* international/titdic-cnv.el (tsang-quick-converter)
(ziranma-converter, ctlau-converter):
* international/mule-cmds.el (describe-language-environment):
* international/ja-dic-cnv.el (skkdic-convert-okuri-ari)
(skkdic-convert-postfix, skkdic-convert-prefix):
(skkdic-convert-okuri-nasi, skkdic-convert):
* emacs-lisp/re-builder.el (reb-update-overlays):
* emacs-lisp/pp.el (pp-to-string, pp-display-expression):
* emacs-lisp/gulp.el (gulp-send-requests):
* emacs-lisp/find-gc.el (trace-call-tree):
* emacs-lisp/eieio-opt.el (eieio-browse, eieio-describe-class)
(eieio-describe-generic):
* emacs-lisp/eieio-base.el (eieio-persistent-read):
* emacs-lisp/edebug.el (edebug-outside-excursion):
* emacs-lisp/debug.el (debugger-make-xrefs):
* emacs-lisp/cust-print.el (custom-prin1-to-string):
* emacs-lisp/chart.el (chart-new-buffer):
* emacs-lisp/authors.el (authors-scan-el, authors-scan-change-log):
Use with-current-buffer.
* textmodes/artist.el (artist-system): Don't call
copy-sequence on a fresh string.
* progmodes/idlw-shell.el (easymenu setup): Use dolist.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/eudc.el | 3 | ||||
-rw-r--r-- | lisp/net/eudcb-ph.el | 9 | ||||
-rw-r--r-- | lisp/net/mairix.el | 10 | ||||
-rw-r--r-- | lisp/net/newst-backend.el | 12 | ||||
-rw-r--r-- | lisp/net/newst-plainview.el | 9 | ||||
-rw-r--r-- | lisp/net/newst-treeview.el | 63 | ||||
-rw-r--r-- | lisp/net/rcirc.el | 3 |
7 files changed, 39 insertions, 70 deletions
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index e831aac6356..9b5f5977f9e 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1036,8 +1036,7 @@ queries the server for the existing fields and displays a corresponding form." (defun eudc-save-options () "Save options to `eudc-options-file'." (interactive) - (save-excursion - (set-buffer (find-file-noselect eudc-options-file t)) + (with-current-buffer (find-file-noselect eudc-options-file t) (goto-char (point-min)) ;; delete the previous setq (let ((standard-output (current-buffer)) diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 88e921ee322..b80d3bb3f5b 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -149,8 +149,7 @@ Wait for response and return the buffer containing it." (message "Contacting server...") (setq process (eudc-ph-open-session)) (if process - (save-excursion - (set-buffer (setq buffer (process-buffer process))) + (with-current-buffer (setq buffer (process-buffer process)) (eudc-ph-send-command process request) (message "Request sent, waiting for reply...") (eudc-ph-read-response process)))) @@ -173,8 +172,7 @@ SERVER is either a string naming the server or a list (NAME PORT)." (setq port (or (match-string 3 server) eudc-ph-default-server-port)) (setq eudc-ph-process-buffer (get-buffer-create (format " *PH-%s*" host))) - (save-excursion - (set-buffer eudc-ph-process-buffer) + (with-current-buffer eudc-ph-process-buffer (erase-buffer) (setq eudc-ph-read-point (point)) (and (featurep 'xemacs) (featurep 'mule) @@ -186,8 +184,7 @@ SERVER is either a string naming the server or a list (NAME PORT)." process))) (defun eudc-ph-close-session (process) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (eudc-ph-send-command process "quit") (eudc-ph-read-response process) (run-at-time 2 nil 'delete-process process))) diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index 9fd701954d5..4afffc246bb 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -260,8 +260,7 @@ Currently there are 'threads and 'flags.") ;; At this point, we are in rmail mode, so the rmail funcs are loaded. (if (fboundp 'rmail-get-header) ; Emacs 23 (rmail-get-header field) - (save-excursion - (set-buffer rmail-buffer) + (with-current-buffer rmail-buffer (save-restriction ;; Don't warn about this when compiling Emacs 23. (with-no-warnings (rmail-narrow-to-non-pruned-header)) @@ -294,10 +293,9 @@ Currently there are 'threads and 'flags.") "Get mail header FIELD for current message using Gnus." (unless (gnus-alive-p) (error "Gnus is not running")) - (save-excursion - (unless (gnus-buffer-exists-p gnus-article-buffer) - (error "No article buffer available")) - (set-buffer gnus-article-buffer) + (unless (gnus-buffer-exists-p gnus-article-buffer) + (error "No article buffer available")) + (with-current-buffer gnus-article-buffer (gnus-summary-toggle-header 1) (message-field-value field))) diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 23c7e1450f9..8c47314367c 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -726,8 +726,7 @@ If URL is nil it is searched at point." "Get news for the site FEED-NAME by calling FUNCTION. See `newsticker-get-news'." (let ((buffername (concat " *newsticker-funcall-" feed-name "*"))) - (save-excursion - (set-buffer (get-buffer-create buffername)) + (with-current-buffer (get-buffer-create buffername) (erase-buffer) (insert (string-to-multibyte (funcall function feed-name))) (newsticker--sentinel-work nil t feed-name function @@ -777,8 +776,7 @@ from." WGET-ARGUMENTS is a list of arguments for wget. See `newsticker-get-news'." (let ((buffername (concat " *newsticker-wget-" feed-name "*"))) - (save-excursion - (set-buffer (get-buffer-create buffername)) + (with-current-buffer (get-buffer-create buffername) (erase-buffer) ;; throw an error if there is an old wget-process around (if (get-process feed-name) @@ -1756,8 +1754,7 @@ If the image has been downloaded in the last 24h do nothing." feed-name))) (wget-arguments (or (car (cdr (cdr (cdr (cdr item))))) newsticker-wget-arguments))) - (save-excursion - (set-buffer (get-buffer-create buffername)) + (with-current-buffer (get-buffer-create buffername) (erase-buffer) ;; throw an error if there is an old wget-process around (if (get-process feed-name) @@ -1785,8 +1782,7 @@ If the image has been downloaded in the last 24h do nothing." feed-name) (throw 'oops nil)) (let (image-name) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (setq image-name (concat (newsticker--images-dir) feed-name)) (set-buffer-file-coding-system 'no-conversion) ;; make sure the cache dir exists diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index 551bda2426b..a6c120876e0 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -1210,11 +1210,10 @@ The mode-line is changed accordingly." (setq newsticker--buffer-uptodate-p value) (let ((b (get-buffer "*newsticker*"))) (when b - (save-excursion - (set-buffer b) - (if value - (setq mode-name "Newsticker -- up to date -- ") - (setq mode-name "Newsticker -- NEED UPDATE -- "))) + (with-current-buffer b + (setq mode-name (if value + "Newsticker -- up to date -- " + "Newsticker -- NEED UPDATE -- "))) (force-mode-line-update 0)))) (defun newsticker--buffer-redraw () diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 63740ff5085..9bc094103ec 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -307,8 +307,7 @@ their id stays constant." "Add news ITEM for FEED to newsticker treeview list window. If string SHOW-FEED is non-nil it is shown in the item string." (setq newsticker--treeview-list-show-feed show-feed) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let* ((inhibit-read-only t) pos1 pos2) (goto-char (point-max)) @@ -350,8 +349,7 @@ If string SHOW-FEED is non-nil it is shown in the item string." (defun newsticker--treeview-list-clear () "Clear the newsticker treeview list window." - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let ((inhibit-read-only t)) (erase-buffer) (kill-all-local-variables) @@ -549,8 +547,7 @@ The sort function is chosen according to the value of (defun newsticker--treeview-list-update-faces () "Update faces in the treeview list buffer." (let (pos-sel) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let ((inhibit-read-only t)) (goto-char (point-min)) (while (not (eobp)) @@ -582,8 +579,7 @@ The sort function is chosen according to the value of (defun newsticker--treeview-list-clear-highlight () "Clear the highlight in the treeview list buffer." - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let ((inhibit-read-only t)) (put-text-property (point-min) (point-max) :nt-selected nil)) (newsticker--treeview-list-update-faces))) @@ -592,8 +588,7 @@ The sort function is chosen according to the value of "Update the highlight in the treeview list buffer." (newsticker--treeview-list-clear-highlight) (let (pos num-lines) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let ((inhibit-read-only t)) (put-text-property (save-excursion (beginning-of-line) (point)) (save-excursion (end-of-line) (point)) @@ -602,8 +597,7 @@ The sort function is chosen according to the value of (defun newsticker--treeview-list-highlight-start () "Return position of selection in treeview list buffer." - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (goto-char (point-min)) (next-single-property-change (point) :nt-selected))) @@ -677,8 +671,7 @@ for the button." ;; ====================================================================== (defun newsticker--treeview-item-show-text (title description) "Show text in treeview item buffer consisting of TITLE and DESCRIPTION." - (save-excursion - (set-buffer (newsticker--treeview-item-buffer)) + (with-current-buffer (newsticker--treeview-item-buffer) (when (fboundp 'w3m-process-stop) (w3m-process-stop (current-buffer))) (let ((inhibit-read-only t)) @@ -696,8 +689,7 @@ for the button." (defun newsticker--treeview-item-show (item feed-name-symbol) "Show news ITEM coming from FEED-NAME-SYMBOL in treeview item buffer." (setq newsticker--treeview-current-feed (symbol-name feed-name-symbol)) - (save-excursion - (set-buffer (newsticker--treeview-item-buffer)) + (with-current-buffer (newsticker--treeview-item-buffer) (when (fboundp 'w3m-process-stop) (w3m-process-stop (current-buffer))) (let ((inhibit-read-only t) @@ -1012,8 +1004,7 @@ that case." (let ((p (point)) (notify (widget-get w :notify))) ;; FIXME: This moves point!!!! - (save-excursion - (set-buffer (newsticker--treeview-tree-buffer)) + (with-current-buffer (newsticker--treeview-tree-buffer) (widget-value-set w (widget-value w))) (goto-char p)))))) @@ -1045,8 +1036,7 @@ Arguments IGNORE are ignored." (newsticker--treeview-get-current-node) :parent) :from))) (when (or (integerp pos) (and (markerp pos) (marker-position pos))) - (save-excursion - (set-buffer (newsticker--treeview-tree-buffer)) + (with-current-buffer (newsticker--treeview-tree-buffer) (goto-char pos) (move-overlay newsticker--tree-selection-overlay (save-excursion (beginning-of-line) (point)) @@ -1167,8 +1157,7 @@ Arguments IGNORE are ignored." (defun newsticker-treeview-browse-url () "Call `browse-url' for the link of the item at point." (interactive) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (let ((url (get-text-property (point) :nt-link))) (when url (browse-url url) @@ -1186,15 +1175,13 @@ Arguments IGNORE are ignored." (get-buffer-create "*Newsticker Item*") t) (unless newsticker--selection-overlay - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (setq newsticker--selection-overlay (make-overlay (point-min) (point-max))) (overlay-put newsticker--selection-overlay 'face 'newsticker-treeview-selection-face))) (unless newsticker--tree-selection-overlay - (save-excursion - (set-buffer (newsticker--treeview-tree-buffer)) + (with-current-buffer (newsticker--treeview-tree-buffer) (setq newsticker--tree-selection-overlay (make-overlay (point-min) (point-max))) (overlay-put newsticker--tree-selection-overlay 'face @@ -1237,11 +1224,10 @@ Note: does not update the layout." (defun newsticker-treeview-save () "Save newsticker data including treeview settings." (interactive) - (save-excursion - (let ((coding-system-for-write 'utf-8) - (buf (find-file-noselect (concat newsticker-dir "/groups")))) - (when buf - (set-buffer buf) + (let ((coding-system-for-write 'utf-8) + (buf (find-file-noselect (concat newsticker-dir "/groups")))) + (when buf + (with-current-buffer buf (setq buffer-undo-list t) (erase-buffer) (insert ";; -*- coding: utf-8 -*-\n") @@ -1287,8 +1273,7 @@ Note: does not update the layout." (interactive) (newsticker--treeview-restore-layout) (newsticker--treeview-list-update-highlight) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (beginning-of-line) (let ((item (get-text-property (point) :nt-item)) (feed (get-text-property (point) :nt-feed))) @@ -1375,8 +1360,7 @@ Will move to previous feed until an item is found." (defun newsticker--treeview-get-selected-item () "Return item that is currently selected in list buffer." - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (beginning-of-line) (get-text-property (point) :nt-item))) @@ -1415,8 +1399,7 @@ Move to next item unless DONT-PROCEED is non-nil." (interactive) (let ((current-feed (or newsticker--treeview-current-feed newsticker--treeview-current-vfeed))) - (save-excursion - (set-buffer (newsticker--treeview-list-buffer)) + (with-current-buffer (newsticker--treeview-list-buffer) (goto-char (point-min)) (while (not (eobp)) (let ((item (get-text-property (point) :nt-item))) @@ -1443,8 +1426,7 @@ Move to next item unless DONT-PROCEED is non-nil." (defun newsticker--treeview-set-current-node (node) "Make NODE the current node." - (save-excursion - (set-buffer (newsticker--treeview-tree-buffer)) + (with-current-buffer (newsticker--treeview-tree-buffer) (setq newsticker--treeview-current-node-id (widget-get node :nt-id)) (setq newsticker--treeview-current-feed (widget-get node :nt-feed)) @@ -1626,8 +1608,7 @@ Return t if a new feed was activated, nil otherwise." (newsticker--treeview-unfold-node group-name)) (setq node (newsticker--treeview-get-node-of-feed feed-name))) (when node - (save-excursion - (set-buffer (newsticker--treeview-tree-buffer)) + (with-current-buffer (newsticker--treeview-tree-buffer) (widget-put node :nt-selected t) (widget-apply-action node) (newsticker--treeview-set-current-node node))))) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 52d97f38b5c..d1f54c9909d 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -564,8 +564,7 @@ last ping." Debug text is written to `rcirc-debug-buffer' if `rcirc-debug-flag' is non-nil." (when rcirc-debug-flag - (save-excursion - (set-buffer (get-buffer-create rcirc-debug-buffer)) + (with-current-buffer (get-buffer-create rcirc-debug-buffer) (goto-char (point-max)) (insert (concat "[" |