aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-06 17:09:40 +0000
committerKaroly Lorentey2004-01-06 17:09:40 +0000
commit12e1ee02b6f80a3e06f3ffb98f85e2023102f1e8 (patch)
tree0a3665678bb4ba266d3f6c40af86ecc72f6dccff /lisp
parent0221d2bfcbc9a3571fdbfbf3d8ad464aae4ffd24 (diff)
parent2e3b4a0b359380880d5dad013a3286a6217e2ae2 (diff)
downloademacs-12e1ee02b6f80a3e06f3ffb98f85e2023102f1e8.tar.gz
emacs-12e1ee02b6f80a3e06f3ffb98f85e2023102f1e8.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-19 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-20 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-21 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-46
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 @@
12004-01-05 Karl Berry <karl@gnu.org>
2
3 * emacs-lisp/copyright.el (copyright-regexp): might as well allow
4 / and *, too.
5
62003-12-31 Simon Josefsson <jas@extundo.com>
7
8 * files.el (before-save-hook): Add.
9 (basic-save-buffer): Use before-save-hook.
10
11 * emacs-lisp/copyright.el: Fix comment to recommend
12 before-save-hook instead of write-file-functions.
13
142004-01-05 Richard M. Stallman <rms@gnu.org>
15
16 * finder.el (finder-commentary): Call delete-other-windows.
17
18 * net/ange-ftp.el (ange-ftp-file-attributes):
19 Pass 2 args to ange-ftp-real-file-attributes only if ID-FORMAT non-nil.
20
12004-01-04 Karl Berry <karl@gnu.org> 212004-01-04 Karl Berry <karl@gnu.org>
2 22
3 * emacs-lisp/copyright.el (copyright-regexp): allow the common 23 * 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 @@
27 27
28;; Allows updating the copyright year and above mentioned GPL version manually 28;; Allows updating the copyright year and above mentioned GPL version manually
29;; or when saving a file. 29;; or when saving a file.
30;; Do (add-hook 'write-file-functions 'copyright-update). 30;; Do (add-hook 'before-save-hook 'copyright-update), or use
31;; M-x customize-variable RET before-save-hook RET.
31 32
32;;; Code: 33;;; Code:
33 34
@@ -47,7 +48,7 @@ A value of nil means to search whole buffer."
47(defcustom copyright-regexp 48(defcustom copyright-regexp
48 "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ 49 "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
49\\|[Cc]opyright\\s *:?\\s *[]\\)\ 50\\|[Cc]opyright\\s *:?\\s *[]\\)\
50\\s *\\([1-9]\\([-0-9, ';%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 51\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
51 "*What your copyright notice looks like. 52 "*What your copyright notice looks like.
52The second \\( \\) construct must match the years." 53The second \\( \\) construct must match the years."
53 :group 'copyright 54 :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."
2990(defvar auto-save-hook nil 2990(defvar auto-save-hook nil
2991 "Normal hook run just before auto-saving.") 2991 "Normal hook run just before auto-saving.")
2992 2992
2993(defcustom before-save-hook nil
2994 "Normal hook that is run before a buffer is saved to its file."
2995 :options '(copyright-update)
2996 :type 'hook
2997 :group 'files)
2998
2993(defcustom after-save-hook nil 2999(defcustom after-save-hook nil
2994 "Normal hook that is run after a buffer is saved to its file." 3000 "Normal hook that is run after a buffer is saved to its file."
2995 :options '(executable-make-buffer-file-executable-if-script-p) 3001 :options '(executable-make-buffer-file-executable-if-script-p)
@@ -3012,7 +3018,8 @@ in such cases.")
3012The hooks `write-contents-functions' and `write-file-functions' get a chance 3018The hooks `write-contents-functions' and `write-file-functions' get a chance
3013to do the job of saving; if they do not, then the buffer is saved in 3019to do the job of saving; if they do not, then the buffer is saved in
3014the visited file file in the usual way. 3020the visited file file in the usual way.
3015After saving the buffer, this function runs `after-save-hook'." 3021Before and after saving the buffer, this function runs
3022`before-save-hook' and `after-save-hook', respectively."
3016 (interactive) 3023 (interactive)
3017 (save-current-buffer 3024 (save-current-buffer
3018 ;; In an indirect buffer, save its base buffer instead. 3025 ;; In an indirect buffer, save its base buffer instead.
@@ -3068,6 +3075,7 @@ After saving the buffer, this function runs `after-save-hook'."
3068 (insert ?\n)))) 3075 (insert ?\n))))
3069 ;; Support VC version backups. 3076 ;; Support VC version backups.
3070 (vc-before-save) 3077 (vc-before-save)
3078 (run-hooks 'before-save-hook)
3071 (or (run-hook-with-args-until-success 'write-contents-functions) 3079 (or (run-hook-with-args-until-success 'write-contents-functions)
3072 (run-hook-with-args-until-success 'local-write-file-hooks) 3080 (run-hook-with-args-until-success 'local-write-file-hooks)
3073 (run-hook-with-args-until-success 'write-file-functions) 3081 (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'."
282 (error "Can't find any Commentary section")) 282 (error "Can't find any Commentary section"))
283 ;; This used to use *Finder* but that would clobber the 283 ;; This used to use *Finder* but that would clobber the
284 ;; directory of categories. 284 ;; directory of categories.
285 (delete-other-windows)
285 (pop-to-buffer "*Finder-package*") 286 (pop-to-buffer "*Finder-package*")
286 (setq buffer-read-only nil) 287 (setq buffer-read-only nil)
287 (erase-buffer) 288 (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.")
3468 inode ;10 "inode number". 3468 inode ;10 "inode number".
3469 -1 ;11 device number [v19 only] 3469 -1 ;11 device number [v19 only]
3470 )))) 3470 ))))
3471 (ange-ftp-real-file-attributes file id-format)))) 3471 (if id-format
3472 (ange-ftp-real-file-attributes file id-format)
3473 (ange-ftp-real-file-attributes file)))))
3472 3474
3473(defun ange-ftp-file-newer-than-file-p (f1 f2) 3475(defun ange-ftp-file-newer-than-file-p (f1 f2)
3474 (let ((f1-parsed (ange-ftp-ftp-name f1)) 3476 (let ((f1-parsed (ange-ftp-ftp-name f1))