mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-17 10:06:13 +00:00
(url-debug): Use with-current-buffer.
This commit is contained in:
parent
abbcaa0544
commit
a2fd14621d
@ -1,28 +1,31 @@
|
|||||||
;;; url-util.el --- Miscellaneous helper routines for URL library
|
;;; url-util.el --- Miscellaneous helper routines for URL library
|
||||||
|
|
||||||
|
;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc.
|
||||||
|
;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
||||||
|
|
||||||
;; Author: Bill Perry <wmperry@gnu.org>
|
;; Author: Bill Perry <wmperry@gnu.org>
|
||||||
;; Keywords: comm, data, processes
|
;; Keywords: comm, data, processes
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; This file is part of GNU Emacs.
|
||||||
;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
;;
|
||||||
;;; Copyright (c) 1996, 97, 98, 99, 2001 Free Software Foundation, Inc.
|
;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||||
;;;
|
;; it under the terms of the GNU General Public License as published by
|
||||||
;;; This file is part of GNU Emacs.
|
;; the Free Software Foundation; either version 2, or (at your option)
|
||||||
;;;
|
;; any later version.
|
||||||
;;; GNU Emacs is free software; you can redistribute it and/or modify
|
;;
|
||||||
;;; it under the terms of the GNU General Public License as published by
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||||
;;; the Free Software Foundation; either version 2, or (at your option)
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
;;; any later version.
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
;;;
|
;; GNU General Public License for more details.
|
||||||
;;; GNU Emacs is distributed in the hope that it will be useful,
|
;;
|
||||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; You should have received a copy of the GNU General Public License
|
||||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||||
;;; GNU General Public License for more details.
|
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
;;;
|
;; Boston, MA 02111-1307, USA.
|
||||||
;;; You should have received a copy of the GNU General Public License
|
|
||||||
;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
;;; Commentary:
|
||||||
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
;;; Boston, MA 02111-1307, USA.
|
;;; Code:
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
(require 'url-parse)
|
(require 'url-parse)
|
||||||
(autoload 'timezone-parse-date "timezone")
|
(autoload 'timezone-parse-date "timezone")
|
||||||
@ -63,8 +66,7 @@ If a list, it is a list of the types of messages to be logged."
|
|||||||
(if (or (eq url-debug t)
|
(if (or (eq url-debug t)
|
||||||
(numberp url-debug)
|
(numberp url-debug)
|
||||||
(and (listp url-debug) (memq tag url-debug)))
|
(and (listp url-debug) (memq tag url-debug)))
|
||||||
(save-excursion
|
(with-current-buffer (get-buffer-create "*URL-DEBUG*")
|
||||||
(set-buffer (get-buffer-create "*URL-DEBUG*"))
|
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(insert (symbol-name tag) " -> " (apply 'format args) "\n")
|
(insert (symbol-name tag) " -> " (apply 'format args) "\n")
|
||||||
(if (numberp url-debug)
|
(if (numberp url-debug)
|
||||||
@ -173,7 +175,7 @@ Strips out default port numbers, etc."
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun url-lazy-message (&rest args)
|
(defun url-lazy-message (&rest args)
|
||||||
"Just like `message', but is a no-op if called more than once a second.
|
"Just like `message', but is a no-op if called more than once a second.
|
||||||
Will not do anything if url-show-status is nil."
|
Will not do anything if `url-show-status' is nil."
|
||||||
(if (or (null url-show-status)
|
(if (or (null url-show-status)
|
||||||
(active-minibuffer-window)
|
(active-minibuffer-window)
|
||||||
(= url-lazy-message-time
|
(= url-lazy-message-time
|
||||||
@ -502,4 +504,5 @@ Has a preference for looking backward when not directly on a symbol."
|
|||||||
|
|
||||||
(provide 'url-util)
|
(provide 'url-util)
|
||||||
|
|
||||||
;;; arch-tag: 24352abc-5a5a-412e-90cd-313b26bed5c9
|
;; arch-tag: 24352abc-5a5a-412e-90cd-313b26bed5c9
|
||||||
|
;;; url-util.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user