aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-07-04 21:51:32 +0000
committerKaroly Lorentey2004-07-04 21:51:32 +0000
commitd0cf63f7695c5d5886a3631ea3c03e82d52ca7c2 (patch)
tree4d50eceb105a3868b8a040ba0666195a7fe71869
parentd7e4838fdf4ad2d3ec267bbcd84846abad6bb570 (diff)
parent2a1a35c60c3acad58ed135fa52efcaceb0ff9091 (diff)
downloademacs-d0cf63f7695c5d5886a3631ea3c03e82d52ca7c2.tar.gz
emacs-d0cf63f7695c5d5886a3631ea3c03e82d52ca7c2.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-437 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-438 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-209
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog46
-rw-r--r--lisp/iimage.el25
-rw-r--r--lisp/progmodes/gdb-ui.el66
-rw-r--r--lisp/progmodes/grep.el11
-rw-r--r--lisp/progmodes/python.el21
-rw-r--r--lisp/replace.el23
-rw-r--r--lisp/textmodes/enriched.el55
-rw-r--r--lispref/ChangeLog10
-rw-r--r--lispref/files.texi39
-rw-r--r--src/ChangeLog5
-rw-r--r--src/msdos.c4
12 files changed, 214 insertions, 97 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ba9eb3121e6..c14c03cb52a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1846,6 +1846,8 @@ subprocesses inherit.
1846 1846
1847** Grep has been decoupled from compilation mode setup. 1847** Grep has been decoupled from compilation mode setup.
1848 1848
1849*** There's a new separate package grep.el.
1850
1849*** Grep commands now have their own submenu and customization group. 1851*** Grep commands now have their own submenu and customization group.
1850 1852
1851*** The new variables `grep-window-height', `grep-auto-highlight', and 1853*** The new variables `grep-window-height', `grep-auto-highlight', and
@@ -2222,6 +2224,10 @@ arg is non-nil.
2222modification times. Magic file name handlers can handle this 2224modification times. Magic file name handlers can handle this
2223operation. 2225operation.
2224 2226
2227** file-remote-p now returns an identifier for the remote system,
2228if the file is indeed remote. (Before, the return value was t in
2229this case.)
2230
2225** The display space :width and :align-to text properties are now 2231** The display space :width and :align-to text properties are now
2226supported on text terminals. 2232supported on text terminals.
2227 2233
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c273d6956c9..7dc899bd605 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,44 @@
12004-07-03 Eli Zaretskii <eliz@gnu.org>
2
3 * progmodes/grep.el (grep-compute-defaults, grep-command)
4 (grep-program, find-program, grep-find-use-xargs, grep-history)
5 (grep-find-history, grep-tag-default, grep-find-command)
6 (grep-regexp-alist, grep-process-setup, grep-compute-defaults):
7 Add autoload cookies, for unbundled packages that load `compile'
8 and expect all grep-related symbols to become defined.
9
102004-07-03 KOSEKI Yoshinori <kose@meadowy.org>
11
12 * iimage.el (turn-on-iimage-mode, iimage-mode): Add autoload
13 cookies.
14 (iimage-mode-image-search-path): New user option to search the
15 image file.
16 (iimage-locate-file): New funcion. Emacs21.3 or earlier does not
17 have locate-file.
18 (iimage-mode-buffer): Use it.
19
202004-07-03 Nick Roberts <nickrob@gnu.org>
21
22 * progmodes/gdb-ui.el (gdb-goto-breakpoint): String match more
23 carefully.
24 (gdb-delete-breakpoint, gdb-toggle-breakpoint): Handle gdbmi.
25
262004-07-03 Juri Linkov <juri@jurta.org>
27
28 * replace.el (query-replace-read-args): Swallow space after 'foo,
29 not after (quote foo). Match space only immediately after symbol,
30 not anywhere in the whole string.
31
322004-07-02 Richard M. Stallman <rms@gnu.org>
33
34 * replace.el (query-replace-read-args): Swallow space after
35 symbols, not after closeparens. But avoid error if string ends there.
36
37 * progmodes/python.el (python-beginning-of-statement):
38 Exit the loop if backward-up-list gets error.
39
40 * textmodes/enriched.el (enriched-encode): Bind inhibit-read-only.
41
12004-07-02 Andre Spiegel <spiegel@gnu.org> 422004-07-02 Andre Spiegel <spiegel@gnu.org>
2 43
3 * vc-rcs.el (vc-rcs-checkout-model): Look at the version headers 44 * vc-rcs.el (vc-rcs-checkout-model): Look at the version headers
@@ -45,6 +86,11 @@
45 86
46 * emacs-lisp/pp.el (pp-buffer): Add autoload. 87 * emacs-lisp/pp.el (pp-buffer): Add autoload.
47 88
892004-06-28 Richard M. Stallman <rms@gnu.org>
90
91 * font-lock.el (font-lock-fontify-syntactic-keywords-region):
92 More changes to go with previous change in font-lock.el.
93
482004-06-26 David Kastrup <dak@gnu.org> 942004-06-26 David Kastrup <dak@gnu.org>
49 95
50 * replace.el (perform-replace): Highlight the match even in 96 * replace.el (perform-replace): Highlight the match even in
diff --git a/lisp/iimage.el b/lisp/iimage.el
index d138498ca3a..9b183ebb01d 100644
--- a/lisp/iimage.el
+++ b/lisp/iimage.el
@@ -25,12 +25,13 @@
25 25
26;;; Commentary: 26;;; Commentary:
27 27
28;; Iimage is a minor mode that display a images, when image-filename 28;; Iimage is a minor mode that displays images, when image-filename
29;; exists in buffer. 29;; exists in the buffer.
30;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html 30;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html
31;; 31;;
32;; Add to your `~/.emacs': 32;; Add to your `~/.emacs':
33;; (autoload 'iimage-mode "iimage" "SUpport Inline image minor mode." t) 33;; (autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
34;; (autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
34;; 35;;
35;; ** Display images in *Info* buffer. 36;; ** Display images in *Info* buffer.
36;; 37;;
@@ -50,7 +51,7 @@
50(eval-when-compile 51(eval-when-compile
51 (require 'image-file)) 52 (require 'image-file))
52 53
53(defconst iimage-version "1.0") 54(defconst iimage-version "1.1")
54(defvar iimage-mode nil) 55(defvar iimage-mode nil)
55(defvar iimage-mode-map nil) 56(defvar iimage-mode-map nil)
56 57
@@ -89,6 +90,10 @@ image filename regex exsamples:
89 foo.JPG 90 foo.JPG
90") 91")
91 92
93(defvar iimage-mode-image-search-path nil
94"*List of directories to search for image files for iimage-mode.")
95
96;;;###autoload
92(defun turn-on-iimage-mode () 97(defun turn-on-iimage-mode ()
93"Unconditionally turn on iimage mode." 98"Unconditionally turn on iimage mode."
94 (interactive) 99 (interactive)
@@ -99,6 +104,12 @@ image filename regex exsamples:
99 (interactive) 104 (interactive)
100 (iimage-mode 0)) 105 (iimage-mode 0))
101 106
107;; Emacs21.3 or earlier does not heve locate-file.
108(if (fboundp 'locate-file)
109 (defalias 'iimage-locate-file 'locate-file)
110 (defun iimage-locate-file (filename path)
111 (locate-library filename t path)))
112
102(defun iimage-mode-buffer (arg) 113(defun iimage-mode-buffer (arg)
103"Display/Undisplay Images. 114"Display/Undisplay Images.
104With numeric ARG, display the images if and only if ARG is positive." 115With numeric ARG, display the images if and only if ARG is positive."
@@ -113,8 +124,9 @@ With numeric ARG, display the images if and only if ARG is positive."
113 (dolist (pair iimage-mode-image-regex-alist) 124 (dolist (pair iimage-mode-image-regex-alist)
114 (while (re-search-forward (car pair) nil t) 125 (while (re-search-forward (car pair) nil t)
115 (if (and (setq file (match-string (cdr pair))) 126 (if (and (setq file (match-string (cdr pair)))
116 (setq file (expand-file-name file default-directory)) 127 (setq file (iimage-locate-file file
117 (file-exists-p file)) 128 (cons default-directory
129 iimage-mode-image-search-path))))
118 (if ing 130 (if ing
119 (add-text-properties (match-beginning 0) (match-end 0) 131 (add-text-properties (match-beginning 0) (match-end 0)
120 (list 'display (create-image file))) 132 (list 'display (create-image file)))
@@ -122,6 +134,7 @@ With numeric ARG, display the images if and only if ARG is positive."
122 '(display))))))) 134 '(display)))))))
123 (set-buffer-modified-p modp))) 135 (set-buffer-modified-p modp)))
124 136
137;;;###autoload
125(define-minor-mode iimage-mode 138(define-minor-mode iimage-mode
126 "Toggle inline image minor mode." 139 "Toggle inline image minor mode."
127 nil " iImg" iimage-mode-map 140 nil " iImg" iimage-mode-map
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 1e2ef00580e..1972074fdb1 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1202,48 +1202,52 @@ static char *magick[] = {
1202 (interactive) 1202 (interactive)
1203 (save-excursion 1203 (save-excursion
1204 (beginning-of-line 1) 1204 (beginning-of-line 1)
1205 (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) 1205 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1206 (error "Not recognized as break/watchpoint line") 1206 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
1207 (gdb-enqueue-input 1207 (looking-at
1208 (list 1208 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
1209 (concat 1209 (gdb-enqueue-input
1210 (if (eq ?y (char-after (match-beginning 2))) 1210 (list
1211 (concat gdb-server-prefix "disable ") 1211 (concat gdb-server-prefix
1212 (concat gdb-server-prefix "enable ")) 1212 (if (eq ?y (char-after (match-beginning 2)))
1213 (match-string 1) "\n") 1213 "disable "
1214 'ignore))))) 1214 "enable ")
1215 (match-string 1) "\n") 'ignore))
1216 (error "Not recognized as break/watchpoint line"))))
1215 1217
1216(defun gdb-delete-breakpoint () 1218(defun gdb-delete-breakpoint ()
1217 "Delete the breakpoint at current line." 1219 "Delete the breakpoint at current line."
1218 (interactive) 1220 (interactive)
1219 (beginning-of-line 1) 1221 (beginning-of-line 1)
1220 (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) 1222 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1221 (error "Not recognized as break/watchpoint line") 1223 (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")
1222 (gdb-enqueue-input 1224 (looking-at
1223 (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)))) 1225 "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+"))
1226 (gdb-enqueue-input
1227 (list
1228 (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
1229 (error "Not recognized as break/watchpoint line")))
1224 1230
1225(defun gdb-goto-breakpoint () 1231(defun gdb-goto-breakpoint ()
1226 "Display the breakpoint location specified at current line." 1232 "Display the breakpoint location specified at current line."
1227 (interactive) 1233 (interactive)
1228 (save-excursion 1234 (save-excursion
1229 (beginning-of-line 1) 1235 (beginning-of-line 1)
1230 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) 1236 (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
1231 (progn 1237 (looking-at ".*in\\s-+\\S-+\\s-+at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
1232 (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t) 1238 (looking-at
1233 (looking-at "\\(\\S-*\\):\\([0-9]+\\)")) 1239 "[0-9]+\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))
1234 (looking-at 1240 (let ((line (match-string 2))
1235 "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))) 1241 (file (match-string 1)))
1236 (if (match-string 2) 1242 (save-selected-window
1237 (let ((line (match-string 2)) 1243 (let* ((buf (find-file-noselect (if (file-exists-p file)
1238 (file (match-string 1))) 1244 file
1239 (save-selected-window 1245 (expand-file-name file gdb-cdir))))
1240 (let* ((buf (find-file-noselect (if (file-exists-p file) 1246 (window (gdb-display-buffer buf)))
1241 file 1247 (with-current-buffer buf
1242 (expand-file-name file gdb-cdir)))) 1248 (goto-line (string-to-number line))
1243 (window (gdb-display-buffer buf))) 1249 (set-window-point window (point))))))
1244 (with-current-buffer buf 1250 (error "Not recognized as break/watchpoint line"))))
1245 (goto-line (string-to-number line))
1246 (set-window-point window (point))))))))
1247 1251
1248(defun gdb-mouse-goto-breakpoint (event) 1252(defun gdb-mouse-goto-breakpoint (event)
1249 "Display the breakpoint location that you click on." 1253 "Display the breakpoint location that you click on."
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 1916bde9ea1..a871380d06f 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -74,6 +74,7 @@ than the begining."
74 :version "21.4" 74 :version "21.4"
75 :group 'grep) 75 :group 'grep)
76 76
77;;;###autoload
77(defcustom grep-command nil 78(defcustom grep-command nil
78 "The default grep command for \\[grep]. 79 "The default grep command for \\[grep].
79If the grep program used supports an option to always include file names 80If the grep program used supports an option to always include file names
@@ -100,6 +101,7 @@ call that function before using this variable in your program."
100 (other :tag "Not Set" auto-detect)) 101 (other :tag "Not Set" auto-detect))
101 :group 'grep) 102 :group 'grep)
102 103
104;;;###autoload
103(defcustom grep-find-command nil 105(defcustom grep-find-command nil
104 "The default find command for \\[grep-find]. 106 "The default find command for \\[grep-find].
105The default value of this variable is set up by `grep-compute-defaults'; 107The default value of this variable is set up by `grep-compute-defaults';
@@ -223,6 +225,7 @@ or when it is used with \\[grep-next-match].
223Notice that using \\[next-error] or \\[compile-goto-error] modifies 225Notice that using \\[next-error] or \\[compile-goto-error] modifies
224`complation-last-buffer' rather than `grep-last-buffer'.") 226`complation-last-buffer' rather than `grep-last-buffer'.")
225 227
228;;;###autoload
226(defvar grep-regexp-alist 229(defvar grep-regexp-alist
227 '(("^\\(.+?\\)[:( \t]+\ 230 '(("^\\(.+?\\)[:( \t]+\
228\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ 231\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
@@ -258,6 +261,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
258 "Additional things to highlight in grep output. 261 "Additional things to highlight in grep output.
259This gets tacked on the end of the generated expressions.") 262This gets tacked on the end of the generated expressions.")
260 263
264;;;###autoload
261(defvar grep-program 265(defvar grep-program
262 ;; Currently zgrep has trouble. It runs egrep instead of grep, 266 ;; Currently zgrep has trouble. It runs egrep instead of grep,
263 ;; and it doesn't pass along long options right. 267 ;; and it doesn't pass along long options right.
@@ -272,10 +276,12 @@ This gets tacked on the end of the generated expressions.")
272 "The default grep program for `grep-command' and `grep-find-command'. 276 "The default grep program for `grep-command' and `grep-find-command'.
273This variable's value takes effect when `grep-compute-defaults' is called.") 277This variable's value takes effect when `grep-compute-defaults' is called.")
274 278
279;;;###autoload
275(defvar find-program "find" 280(defvar find-program "find"
276 "The default find program for `grep-find-command'. 281 "The default find program for `grep-find-command'.
277This variable's value takes effect when `grep-compute-defaults' is called.") 282This variable's value takes effect when `grep-compute-defaults' is called.")
278 283
284;;;###autoload
279(defvar grep-find-use-xargs nil 285(defvar grep-find-use-xargs nil
280 "Whether \\[grep-find] uses the `xargs' utility by default. 286 "Whether \\[grep-find] uses the `xargs' utility by default.
281 287
@@ -285,9 +291,12 @@ if not nil and not `gnu', it uses `find -print' and `xargs'.
285This variable's value takes effect when `grep-compute-defaults' is called.") 291This variable's value takes effect when `grep-compute-defaults' is called.")
286 292
287;; History of grep commands. 293;; History of grep commands.
294;;;###autoload
288(defvar grep-history nil) 295(defvar grep-history nil)
296;;;###autoload
289(defvar grep-find-history nil) 297(defvar grep-find-history nil)
290 298
299;;;###autoload
291(defun grep-process-setup () 300(defun grep-process-setup ()
292 "Setup compilation variables and buffer for `grep'. 301 "Setup compilation variables and buffer for `grep'.
293Set up `compilation-exit-message-function' and run `grep-setup-hook'." 302Set up `compilation-exit-message-function' and run `grep-setup-hook'."
@@ -303,6 +312,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
303 (cons msg code)))) 312 (cons msg code))))
304 (run-hooks 'grep-setup-hook)) 313 (run-hooks 'grep-setup-hook))
305 314
315;;;###autoload
306(defun grep-compute-defaults () 316(defun grep-compute-defaults ()
307 (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) 317 (unless (or (not grep-use-null-device) (eq grep-use-null-device t))
308 (setq grep-use-null-device 318 (setq grep-use-null-device
@@ -448,6 +458,7 @@ temporarily highlight in visited source lines."
448 grep-regexp-alist)) 458 grep-regexp-alist))
449 459
450;; This is a copy of find-tag-default from etags.el. 460;; This is a copy of find-tag-default from etags.el.
461;;;###autoload
451(defun grep-tag-default () 462(defun grep-tag-default ()
452 (save-excursion 463 (save-excursion
453 (while (looking-at "\\sw\\|\\s_") 464 (while (looking-at "\\sw\\|\\s_")
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 274480a36de..9be2c7599b8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -710,16 +710,17 @@ Accounts for continuation lines, multi-line strings, and multi-line bracketed
710expressions." 710expressions."
711 (beginning-of-line) 711 (beginning-of-line)
712 (python-beginning-of-string) 712 (python-beginning-of-string)
713 (while (python-continuation-line-p) 713 (catch 'foo
714 (beginning-of-line) 714 (while (python-continuation-line-p)
715 (if (python-backslash-continuation-line-p) 715 (beginning-of-line)
716 (while (python-backslash-continuation-line-p) 716 (if (python-backslash-continuation-line-p)
717 (forward-line -1)) 717 (while (python-backslash-continuation-line-p)
718 (python-beginning-of-string) 718 (forward-line -1))
719 ;; Skip forward out of nested brackets. 719 (python-beginning-of-string)
720 (condition-case () ; beware invalid syntax 720 ;; Skip forward out of nested brackets.
721 (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t) 721 (condition-case () ; beware invalid syntax
722 (error (end-of-line))))) 722 (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t)
723 (error (throw 'foo nil))))))
723 (back-to-indentation)) 724 (back-to-indentation))
724 725
725(defun python-end-of-statement () 726(defun python-end-of-statement ()
diff --git a/lisp/replace.el b/lisp/replace.el
index cac4470c9cd..4c381c658e5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -118,14 +118,19 @@ strings or patterns."
118 ((eq char ?\,) 118 ((eq char ?\,)
119 (setq pos (read-from-string to)) 119 (setq pos (read-from-string to))
120 (push `(replace-quote ,(car pos)) list) 120 (push `(replace-quote ,(car pos)) list)
121 (setq to (substring 121 (let ((end
122 to (+ (cdr pos) 122 ;; Swallow a space after a symbol
123 ;; Swallow a space after a symbol 123 ;; if there is a space.
124 ;; if there is a space. 124 (if (and (or (symbolp (car pos))
125 (if (string-match 125 ;; Swallow a space after 'foo
126 "^[^])\"] " 126 ;; but not after (quote foo).
127 (substring to (1- (cdr pos)))) 127 (and (eq (car-safe (car pos)) 'quote)
128 1 0)))))) 128 (not (= ?\( (aref to 0)))))
129 (eq (string-match " " to (cdr pos))
130 (cdr pos)))
131 (1+ (cdr pos))
132 (cdr pos))))
133 (setq to (substring to end)))))
129 (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))) 134 (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)))
130 (setq to (nreverse (delete "" (cons to list))))) 135 (setq to (nreverse (delete "" (cons to list)))))
131 (replace-match-string-symbols to) 136 (replace-match-string-symbols to)
@@ -208,7 +213,7 @@ In interactive calls, the replacement text can contain `\\,'
208followed by a Lisp expression. Each 213followed by a Lisp expression. Each
209replacement evaluates that expression to compute the replacement 214replacement evaluates that expression to compute the replacement
210string. Inside of that expression, `\\&' is a string denoting the 215string. Inside of that expression, `\\&' is a string denoting the
211whole match as a sting, `\\N' for a partial match, `\\#&' and `\\#N' 216whole match as a string, `\\N' for a partial match, `\\#&' and `\\#N'
212for the whole or a partial match converted to a number with 217for the whole or a partial match converted to a number with
213`string-to-number', and `\\#' itself for the number of replacements 218`string-to-number', and `\\#' itself for the number of replacements
214done so far (starting with zero). 219done so far (starting with zero).
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index 05eaef06ce6..531fe7d95df 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -282,33 +282,34 @@ the region, and the START and END of each region."
282;;;###autoload 282;;;###autoload
283(defun enriched-encode (from to orig-buf) 283(defun enriched-encode (from to orig-buf)
284 (if enriched-verbose (message "Enriched: encoding document...")) 284 (if enriched-verbose (message "Enriched: encoding document..."))
285 (save-restriction 285 (let ((inhibit-read-only t))
286 (narrow-to-region from to) 286 (save-restriction
287 (delete-to-left-margin) 287 (narrow-to-region from to)
288 (unjustify-region) 288 (delete-to-left-margin)
289 (goto-char from) 289 (unjustify-region)
290 (format-replace-strings '(("<" . "<<"))) 290 (goto-char from)
291 (format-insert-annotations 291 (format-replace-strings '(("<" . "<<")))
292 (format-annotate-region from (point-max) enriched-translations 292 (format-insert-annotations
293 'enriched-make-annotation enriched-ignore)) 293 (format-annotate-region from (point-max) enriched-translations
294 (goto-char from) 294 'enriched-make-annotation enriched-ignore))
295 (insert (if (stringp enriched-initial-annotation) 295 (goto-char from)
296 enriched-initial-annotation 296 (insert (if (stringp enriched-initial-annotation)
297 (save-excursion 297 enriched-initial-annotation
298 ;; Eval this in the buffer we are annotating. This 298 (save-excursion
299 ;; fixes a bug which was saving incorrect File-Width 299 ;; Eval this in the buffer we are annotating. This
300 ;; information, since we were looking at local 300 ;; fixes a bug which was saving incorrect File-Width
301 ;; variables in the wrong buffer. 301 ;; information, since we were looking at local
302 (if orig-buf (set-buffer orig-buf)) 302 ;; variables in the wrong buffer.
303 (funcall enriched-initial-annotation)))) 303 (if orig-buf (set-buffer orig-buf))
304 (enriched-map-property-regions 'hard 304 (funcall enriched-initial-annotation))))
305 (lambda (v b e) 305 (enriched-map-property-regions 'hard
306 (if (and v (= ?\n (char-after b))) 306 (lambda (v b e)
307 (progn (goto-char b) (insert "\n")))) 307 (if (and v (= ?\n (char-after b)))
308 (point) nil) 308 (progn (goto-char b) (insert "\n"))))
309 (if enriched-verbose (message nil)) 309 (point) nil)
310 ;; Return new end. 310 (if enriched-verbose (message nil))
311 (point-max))) 311 ;; Return new end.
312 (point-max))))
312 313
313(defun enriched-make-annotation (internal-ann positive) 314(defun enriched-make-annotation (internal-ann positive)
314 "Format an annotation INTERNAL-ANN. 315 "Format an annotation INTERNAL-ANN.
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index ff73949f771..dfb558463fe 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,13 @@
12004-07-02 Richard M. Stallman <rms@gnu.org>
2
3 * files.texi (Saving Buffers): Cleanup write-contents-function.
4 (Magic File Names): Cleanup file-remote-p.
5
62004-07-02 Kai Grossjohann <kai@emptydomain.de>
7
8 * files.texi (Magic File Names): `file-remote-p' returns an
9 identifier of the remote system, not just t.
10
12004-07-02 David Kastrup <dak@gnu.org> 112004-07-02 David Kastrup <dak@gnu.org>
2 12
3 * searching.texi (Entire Match Data): Add explanation about new 13 * searching.texi (Entire Match Data): Add explanation about new
diff --git a/lispref/files.texi b/lispref/files.texi
index 10d6c808625..4fe2d8567d3 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -415,17 +415,17 @@ Even though this is not a normal hook, you can use @code{add-hook} and
415 415
416@c Emacs 19 feature 416@c Emacs 19 feature
417@defvar write-contents-functions 417@defvar write-contents-functions
418This works just like @code{write-file-functions}, but it is intended for 418This works just like @code{write-file-functions}, but it is intended
419hooks that pertain to the contents of the file, as opposed to hooks that 419for hooks that pertain to the buffer's contents, not to the particular
420pertain to the file's name or location. Such hooks are usually set up by 420visited file or its location. Such hooks are usually set up by major
421major modes, as buffer-local bindings for this variable. If any of the 421modes, as buffer-local bindings for this variable. This variable
422functions in this hook returns non-@code{nil}, the file is considered 422automatically becomes buffer-local whenever it is set; switching to a
423already written and the rest are not called and neither are the functions 423new major mode always resets this variable, but calling
424in @code{write-file-functions}. 424@code{set-visited-file-name} does not.
425 425
426This variable automatically becomes buffer-local whenever it is set; 426If any of the functions in this hook returns non-@code{nil}, the file
427switching to a new major mode always resets this variable, but 427is considered already written and the rest are not called and neither
428calling @code{set-visited-file-name} does not. 428are the functions in @code{write-file-functions}.
429@end defvar 429@end defvar
430 430
431@defopt before-save-hook 431@defopt before-save-hook
@@ -2646,7 +2646,22 @@ of the local copy file.
2646@end defun 2646@end defun
2647 2647
2648@defun file-remote-p filename 2648@defun file-remote-p filename
2649This function returns @code{t} if @var{filename} is a remote file. 2649This function tests whether @var{filename} is a remote file. If
2650@var{filename} is local (not remote), the return value is @code{nil}.
2651If @var{filename} is indeed remote, the return value is a string that
2652identifies the remote system.
2653
2654This identifier string may include a host name, a user name, and
2655characters designating the method used to access the remote system.
2656For example, the remote identifier string for the filename
2657@code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}.
2658
2659If @code{file-remote-p} returns the same identifier for two different
2660filenames, that means they are stored on the same file system and can
2661be accessed locally with respect to each other. This means, for
2662example, that it is possible to start a remote process accessing both
2663files at the same time. Implementors of file handlers need to ensure
2664this principle is valid.
2650@end defun 2665@end defun
2651 2666
2652@defun unhandled-file-name-directory filename 2667@defun unhandled-file-name-directory filename
diff --git a/src/ChangeLog b/src/ChangeLog
index a1fa10e753c..6ba3196d4e7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12004-07-03 Eli Zaretskii <eliz@gnu.org>
2
3 * msdos.c (dos_rawgetc): Use make_number to produce Lisp objects
4 for event.x and event.y.
5
12004-07-01 Kenichi Handa <handa@m17n.org> 62004-07-01 Kenichi Handa <handa@m17n.org>
2 7
3 * w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly 8 * w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly
diff --git a/src/msdos.c b/src/msdos.c
index da7fab89c7e..c9fbecf5cb2 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3456,8 +3456,8 @@ dos_rawgetc ()
3456 event.code = button_num; 3456 event.code = button_num;
3457 event.modifiers = dos_get_modifiers (0) 3457 event.modifiers = dos_get_modifiers (0)
3458 | (press ? down_modifier : up_modifier); 3458 | (press ? down_modifier : up_modifier);
3459 event.x = x; 3459 event.x = make_number (x);
3460 event.y = y; 3460 event.y = make_number (y);
3461 event.frame_or_window = selected_frame; 3461 event.frame_or_window = selected_frame;
3462 event.arg = Qnil; 3462 event.arg = Qnil;
3463 event.timestamp = event_timestamp (); 3463 event.timestamp = event_timestamp ();