summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog20
-rw-r--r--lisp/emacs-lisp/copyright.el5
-rw-r--r--lisp/files.el10
-rw-r--r--lisp/finder.el1
-rw-r--r--lisp/net/ange-ftp.el4
5 files changed, 36 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 14963f0ef8c..67e62e7025a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,23 @@
+2004-01-05 Karl Berry <karl@gnu.org>
+
+ * emacs-lisp/copyright.el (copyright-regexp): might as well allow
+ / and *, too.
+
+2003-12-31 Simon Josefsson <jas@extundo.com>
+
+ * files.el (before-save-hook): Add.
+ (basic-save-buffer): Use before-save-hook.
+
+ * emacs-lisp/copyright.el: Fix comment to recommend
+ before-save-hook instead of write-file-functions.
+
+2004-01-05 Richard M. Stallman <rms@gnu.org>
+
+ * finder.el (finder-commentary): Call delete-other-windows.
+
+ * net/ange-ftp.el (ange-ftp-file-attributes):
+ Pass 2 args to ange-ftp-real-file-attributes only if ID-FORMAT non-nil.
+
2004-01-04 Karl Berry <karl@gnu.org>
* emacs-lisp/copyright.el (copyright-regexp): allow the common
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 4532f7e5b77..6a95c60f859 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -27,7 +27,8 @@
;; Allows updating the copyright year and above mentioned GPL version manually
;; or when saving a file.
-;; Do (add-hook 'write-file-functions 'copyright-update).
+;; Do (add-hook 'before-save-hook 'copyright-update), or use
+;; M-x customize-variable RET before-save-hook RET.
;;; Code:
@@ -47,7 +48,7 @@ A value of nil means to search whole buffer."
(defcustom copyright-regexp
"\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
\\|[Cc]opyright\\s *:?\\s *[]\\)\
-\\s *\\([1-9]\\([-0-9, ';%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
+\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"*What your copyright notice looks like.
The second \\( \\) construct must match the years."
:group 'copyright
diff --git a/lisp/files.el b/lisp/files.el
index ec58906e485..e74ef0bcbc1 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2990,6 +2990,12 @@ the last real save, but optional arg FORCE non-nil means delete anyway."
(defvar auto-save-hook nil
"Normal hook run just before auto-saving.")
+(defcustom before-save-hook nil
+ "Normal hook that is run before a buffer is saved to its file."
+ :options '(copyright-update)
+ :type 'hook
+ :group 'files)
+
(defcustom after-save-hook nil
"Normal hook that is run after a buffer is saved to its file."
:options '(executable-make-buffer-file-executable-if-script-p)
@@ -3012,7 +3018,8 @@ in such cases.")
The hooks `write-contents-functions' and `write-file-functions' get a chance
to do the job of saving; if they do not, then the buffer is saved in
the visited file file in the usual way.
-After saving the buffer, this function runs `after-save-hook'."
+Before and after saving the buffer, this function runs
+`before-save-hook' and `after-save-hook', respectively."
(interactive)
(save-current-buffer
;; In an indirect buffer, save its base buffer instead.
@@ -3068,6 +3075,7 @@ After saving the buffer, this function runs `after-save-hook'."
(insert ?\n))))
;; Support VC version backups.
(vc-before-save)
+ (run-hooks 'before-save-hook)
(or (run-hook-with-args-until-success 'write-contents-functions)
(run-hook-with-args-until-success 'local-write-file-hooks)
(run-hook-with-args-until-success 'write-file-functions)
diff --git a/lisp/finder.el b/lisp/finder.el
index 2958f36c3d9..0bd001752fe 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -282,6 +282,7 @@ FILE should be in a form suitable for passing to `locate-library'."
(error "Can't find any Commentary section"))
;; This used to use *Finder* but that would clobber the
;; directory of categories.
+ (delete-other-windows)
(pop-to-buffer "*Finder-package*")
(setq buffer-read-only nil)
(erase-buffer)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 0277bd0aabc..8e1068a5bed 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3468,7 +3468,9 @@ system TYPE.")
inode ;10 "inode number".
-1 ;11 device number [v19 only]
))))
- (ange-ftp-real-file-attributes file id-format))))
+ (if id-format
+ (ange-ftp-real-file-attributes file id-format)
+ (ange-ftp-real-file-attributes file)))))
(defun ange-ftp-file-newer-than-file-p (f1 f2)
(let ((f1-parsed (ange-ftp-ftp-name f1))