1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-14 16:50:58 +00:00

(top-level): Don't require cl when compiling.

(url-history-setup-save-timer, url-history-save-history):
Use condition-case rather than ignore-errors.
This commit is contained in:
Glenn Morris 2007-12-02 18:05:36 +00:00
parent ed7cf49acf
commit d87fefad37

View File

@ -28,7 +28,6 @@
;; This can get a recursive require. ;; This can get a recursive require.
;;(require 'url) ;;(require 'url)
(eval-when-compile (require 'cl))
(require 'url-parse) (require 'url-parse)
(autoload 'url-do-setup "url") (autoload 'url-do-setup "url")
@ -83,8 +82,9 @@ to run the `url-history-setup-save-timer' function manually."
(defun url-history-setup-save-timer () (defun url-history-setup-save-timer ()
"Reset the history list timer." "Reset the history list timer."
(interactive) (interactive)
(ignore-errors (condition-case nil
(cancel-timer url-history-timer)) (cancel-timer url-history-timer)
(error nil))
(setq url-history-timer nil) (setq url-history-timer nil)
(if (and (eq url-history-track t) url-history-save-interval) (if (and (eq url-history-track t) url-history-save-interval)
(setq url-history-timer (run-at-time url-history-save-interval (setq url-history-timer (run-at-time url-history-save-interval
@ -120,7 +120,9 @@ user for what type to save as."
(interactive) (interactive)
(or fname (setq fname (expand-file-name url-history-file))) (or fname (setq fname (expand-file-name url-history-file)))
(unless (file-directory-p (file-name-directory fname)) (unless (file-directory-p (file-name-directory fname))
(ignore-errors (make-directory (file-name-directory fname)))) (condition-case nil
(make-directory (file-name-directory fname))
(error nil)))
(cond (cond
((not url-history-changed-since-last-save) nil) ((not url-history-changed-since-last-save) nil)
((not (file-writable-p fname)) ((not (file-writable-p fname))