From bdaf166cdf3a5bcc00963fe5ca1a91fdd421f2d5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 8 Dec 2008 16:30:43 +0000 Subject: [PATCH] (auto-insert): Use expand-file-name instead of concat. Suggested by Eric Hanchrow . --- lisp/ChangeLog | 59 +++++++++++++++++++++++++++--------------------------- lisp/ChangeLog.12 | 27 +++++++++++-------------- lisp/autoinsert.el | 21 +++++++++---------- 3 files changed, 52 insertions(+), 55 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9895fdbb613..1999679e5f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-12-08 Stefan Monnier + + * autoinsert.el (auto-insert): Use expand-file-name instead of concat. + Suggested by Eric Hanchrow . + 2008-12-06 Chong Yidong * term/xterm.el (terminal-init-xterm): Discard pending input @@ -24,7 +29,7 @@ 2008-12-04 Sam Steingold - * progmodes/compile.el (compilation-read-command): Extracted from + * progmodes/compile.el (compilation-read-command): Extract from compile. (compile): Use it. (recompile): Accept an optional argument to enable editing the @@ -34,8 +39,8 @@ * net/tramp.el (top): Write a message, when loading Tramp. - * net/tramp-cache.el (tramp-dump-connection-properties): Polish - the check, whether to dump the data. + * net/tramp-cache.el (tramp-dump-connection-properties): + Polish the check, whether to dump the data. 2008-12-04 Lute Kamstra @@ -269,8 +274,8 @@ * wdired.el (wdired-finish-edit): If displaying a single file, change dired-directory if that file was renamed. - * emacs-lisp/byte-run.el (macro-declaration-function): Disallow - declare specs with lengths of 3 or more. + * emacs-lisp/byte-run.el (macro-declaration-function): + Disallow declare specs with lengths of 3 or more. * dirtrack.el (dirtrack): Fix error message. @@ -303,11 +308,11 @@ 2008-11-29 Chong Yidong - * complete.el (PC-do-complete-and-exit): Use - minibuffer-confirm-exit-commands. + * complete.el (PC-do-complete-and-exit): + Use minibuffer-confirm-exit-commands. - * minibuffer.el (minibuffer-confirm-exit-commands): Add - PC-complete and PC-complete-word to the list. + * minibuffer.el (minibuffer-confirm-exit-commands): + Add PC-complete and PC-complete-word to the list. 2008-11-29 Juanma Barranquero @@ -376,15 +381,14 @@ * international/characters.el: Set category 'C' to characters #x20000..#x2AFFF, #x2F800..#x2FFFF. - * loadup.el: Set inhibit-load-charset-map to t while preloading - files. + * loadup.el: Set inhibit-load-charset-map to t while preloading files. 2008-11-27 Chong Yidong * tool-bar.el (tool-bar-find-image-cache): Var deleted. (tool-bar-find-image): Function deleted. - (tool-bar-local-item, tool-bar-local-item-from-menu): Use - find-image instead of tool-bar-find-image. + (tool-bar-local-item, tool-bar-local-item-from-menu): + Use find-image instead of tool-bar-find-image. (tool-bar-keymap-cache): New hash table. (tool-bar-make-keymap): Use it. (tool-bar-make-keymap-1): Move body of tool-bar-make-keymap here. @@ -493,11 +497,9 @@ 2008-11-24 Ulf Jasper - * net/newst-treeview.el (newsticker--treeview-current-feed): Doc - string. - (newsticker--treeview-item-show): Renamed arg FEED to - FEED-NAME-SYMBOL. - (newsticker--treeview-tree-update-tag): Removed dead code. + * net/newst-treeview.el (newsticker--treeview-current-feed): Docstring. + (newsticker--treeview-item-show): Rename arg FEED to FEED-NAME-SYMBOL. + (newsticker--treeview-tree-update-tag): Remove dead code. (newsticker-treeview-update): Don't update cache. (newsticker-treeview-quit): Don't save cache. (newsticker-treeview-save): Don't save cache. Use `newsticker-dir'. @@ -512,9 +514,9 @@ (newsticker-stop): Use `newsticker--cache-save'. (newsticker--sentinel-work): Use `newsticker--cache-save-feed'. (newsticker--images-dir): New. - (newsticker--image-get, newsticker--image-sentinel): Use - `newsticker--images-dir'. - (newsticker--cache-save-version1): Backuped version of + (newsticker--image-get, newsticker--image-sentinel): + Use `newsticker--images-dir'. + (newsticker--cache-save-version1): Backup version of `newsticker--cache-save'. (newsticker--cache-update): Create newsticker-dir if necessary. (newsticker--cache-dir): New. @@ -524,24 +526,23 @@ cache data.. (newsticker--cache-read, newsticker--cache-do-read): New. - * net/newst-reader.el (newsticker--image-read): Use - `newsticker--images-dir'. + * net/newst-reader.el (newsticker--image-read): + Use `newsticker--images-dir'. 2008-11-24 Chong Yidong - * files.el (confirm-nonexistent-file-or-buffer): Allow - `after-completion' value to request confirm only after TAB. + * files.el (confirm-nonexistent-file-or-buffer): + Allow `after-completion' value to request confirm only after TAB. (confirm-nonexistent-file-or-buffer): New function. (read-buffer-to-switch, find-file, find-file-other-window) (find-file-other-frame, find-file-read-only) (find-file-read-only-other-window) (find-file-read-only-other-frame): Use it. - (switch-to-buffer-other-window, switch-to-buffer-other-frame): Doc - fix. + (switch-to-buffer-other-window, switch-to-buffer-other-frame): Doc fix. Thanks to Alan Mackenzie for suggesting the new behavior. - * minibuffer.el (minibuffer-complete-and-exit): Change - `confirm-only' value of minibuffer-completion-confirm to + * minibuffer.el (minibuffer-complete-and-exit): + Change `confirm-only' value of minibuffer-completion-confirm to `confirm', and handle a `confirm-after-completion' value. 2008-11-24 Juanma Barranquero diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 959e77b4482..092b46b4f62 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -2109,13 +2109,13 @@ 2007-02-02 Ulf Jasper - * net/newsticker.el (newsticker-version): Changed to "1.10". + * net/newsticker.el (newsticker-version): Change to "1.10". (newsticker--set-customvar): Doc string. (newsticker-new-item-face): Doc string. (newsticker-mode): Initialize `invisibility-spec' with t. - (newsticker-mode-map): Added - `newsticker-mark-all-items-at-point-as-read'. - (newsticker-menu): Added narrow-to-item and narrow-to-feed. + (newsticker-mode-map): + Add `newsticker-mark-all-items-at-point-as-read'. + (newsticker-menu): Add narrow-to-item and narrow-to-feed. (newsticker-w3m-show-inline-images): Do not call `w3m-remove-image'. (newsticker--buffer-after-w3m-insert-image): New advice for @@ -2130,8 +2130,7 @@ `newsticker-mark-item-at-point-as-read'. (newsticker-hide-entry): Use (t) instead of t for invisibility. (newsticker--sentinel): Yet another xml-parser workaround. - (newsticker--decode-iso8601-date): Bugfix for datestrings without - days. + (newsticker--decode-iso8601-date): Bugfix for datestrings without days. (newsticker--buffer-do-insert-text): Fix. (newsticker--buffer-insert-enclosure): Fix. Length might be missing. (newsticker--buffer-make-item-completely-visible): @@ -2361,13 +2360,13 @@ 2007-01-27 Ben North - * outline.el (outline-promote, outline-demote): Doc fix. Rename - the arg CHILDREN -> WHICH. + * outline.el (outline-promote, outline-demote): Doc fix. + Rename the arg CHILDREN -> WHICH. 2007-01-27 Michael Albinus - * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set - default-directory to a sane value when calling start-process. + * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): + Set default-directory to a sane value when calling start-process. 2007-01-27 Eli Zaretskii @@ -2532,13 +2531,12 @@ 2007-01-20 Eric Hanchrow (tiny change) * progmodes/cperl-mode.el (cperl-electric-keywords): Document in - the doc string how to use personal abbrevs without electric - keywords. + the doc string how to use personal abbrevs without electric keywords. 2007-01-20 Alin C. Soare (tiny change) * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - Fixed cursor position when toggle abbreviated display. + Fix cursor position when toggle abbreviated display. 2007-01-20 Nick Roberts @@ -2567,8 +2565,7 @@ 2007-01-18 Bruno Haible (tiny change) - * info.el (Info-default-dirs): Change default info dir to - share/info. + * info.el (Info-default-dirs): Change default info dir to share/info. * paths.el (Info-default-directory-list): Ditto. diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 92a5f9f3f92..b276cc18f99 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -343,19 +343,19 @@ Matches the visited file name against the elements of `auto-insert-alist'." ;; Now, if we found something, do it (and action - (if (stringp action) - (file-readable-p (concat auto-insert-directory action)) - t) - (if auto-insert-query - (or (if (eq auto-insert-query 'function) - (eq this-command 'auto-insert)) - (y-or-n-p (format auto-insert-prompt desc))) - t) + (or (not (stringp action)) + (file-readable-p (expand-file-name + action auto-insert-directory))) + (or (not auto-insert-query) + (if (eq auto-insert-query 'function) + (eq this-command 'auto-insert)) + (y-or-n-p (format auto-insert-prompt desc))) (mapc (lambda (action) (if (stringp action) (if (file-readable-p - (setq action (concat auto-insert-directory action))) + (setq action (expand-file-name + action auto-insert-directory))) (insert-file-contents action)) (save-window-excursion ;; make buffer visible before skeleton or function @@ -393,8 +393,7 @@ or if CONDITION had no actions, after all other CONDITIONs." (vector action (cdr elt))))) (if after (nconc auto-insert-alist (list (cons condition action))) - (setq auto-insert-alist (cons (cons condition action) - auto-insert-alist)))))) + (push (cons condition action) auto-insert-alist))))) ;;;###autoload (define-minor-mode auto-insert-mode -- 2.11.4.GIT