commit: typo fix
15 years, 5 months
Adrian Aichner
changeset: 4651:a3dd752b0a8d
parent: 4632:b93587f33338
user: AichnerAd@KUCKUCK
date: Mon Apr 27 00:38:29 2009 +0200
files: etc/TUTORIAL.de
description:
typo fix
diff -r b93587f33338 -r a3dd752b0a8d etc/TUTORIAL.de
--- a/etc/TUTORIAL.de Thu Apr 02 15:29:57 2009 +0900
+++ b/etc/TUTORIAL.de Mon Apr 27 00:38:29 2009 +0200
@@ -1544,7 +1544,7 @@
und Hrvoje Niksic haben weitere Korrekturen für XEmacs beigetragen.
Ben Wing hat es später mit FSF 21.0.105 abgestimmt und viele Sektionen
an die heutigen XEmacs-Normen angepasst. Die deutsche Version wurde
-es von Adrian Aichner erstellt und laufend gepflegt.
+von Adrian Aichner erstellt und laufend gepflegt.
Diese Version des Tutorials ist, wie XEmacs selbst, urheberrechtlich
geschützt und erlaubt die Verteilung von Kopien unter bestimmten
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Fix for issue 521
15 years, 5 months
Adrian Aichner
changeset: 4652:f3dddd098242
tag: tip
user: Adrian Aichner <adrian(a)xemacs.org>
date: Sun Jul 12 22:39:44 2009 +0200
files: src/callint.c
description:
Fix for issue 521
diff -r a3dd752b0a8d -r f3dddd098242 src/callint.c
--- a/src/callint.c Mon Apr 27 00:38:29 2009 +0200
+++ b/src/callint.c Sun Jul 12 22:39:44 2009 +0200
@@ -203,9 +203,8 @@
(eq window (active-minibuffer-window)))))
(error "Attempt to select inactive minibuffer window"))
(select window)))))
-`_' (setq zmacs-region-stays t)
-
-*/
+`_' (setq zmacs-region-stays t) *//* FIXME: moving end of previous comment
+to a separate line causes docstring lossage! */
(UNUSED (args)))
{
return Qnil;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [COMMIT] Kill buffer if dir misspelled and user doesn't want to create
15 years, 5 months
Aidan Kehoe
Ar an triú lá déag de mí Iúil, scríobh Rodney Sparapani:
> Wow, very nice and concise too! By the way, is this being applied to
> stable as well? I would vote for that as well if it is not already in.
I don’t know, that’s up to Vin. I wouldn’t rush into it anyway, we should
get a few months’ experience with the change in 21.5 before any application
of it to 21.4.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] #'find-file: set b-f-c-s even on error (cf. non-existent files),
15 years, 5 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
Mats, this will resolve the issues you’re seeing (apart from the
query-coding test failures; I’m wondering what to do about them myself.)
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1247514326 -3600
# Node ID 8905163c49c532b6eea7710619569fed7f826d52
# Parent 3972966a4588d70e94bd50cc7ce3ebb477bb707c
#'find-file: set b-f-c-s even on error (cf. non-existent files),
handle undecided coding-systems passed back from
#'insert-file-contents-internal better.
tests/ChangeLog addition:
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Now that find-file on a nonexistent path gives a modified buffer,
we want to set this kind of buffer to be non-modified here before
killing it.
lisp/ChangeLog addition:
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
Set the buffer coding system even on error; especially important
when dealing with nonexistent files.
If the `coding-system' property of an undecided coding system is
itself undecided, don't use that as a value for
buffer-file-coding-system.
diff -r 3972966a4588 -r 8905163c49c5 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 12 14:20:55 2009 +0100
+++ b/lisp/ChangeLog Mon Jul 13 20:45:26 2009 +0100
@@ -1,3 +1,12 @@
+2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * code-files.el (insert-file-contents):
+ Set the buffer coding system even on error; especially important
+ when dealing with nonexistent files.
+ If the `coding-system' property of an undecided coding system is
+ itself undecided, don't use that as a value for
+ buffer-file-coding-system.
+
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (after-find-file):
diff -r 3972966a4588 -r 8905163c49c5 lisp/code-files.el
--- a/lisp/code-files.el Sun Jul 12 14:20:55 2009 +0100
+++ b/lisp/code-files.el Mon Jul 13 20:45:26 2009 +0100
@@ -439,6 +439,33 @@
'used-codesys))
))
(file-error
+ ;; If we error, which we may if the file does not exist, we still
+ ;; want to set the buffer-file-coding-system if that is
+ ;; appropriate:
+ (when (eq 'undecided (coding-system-type coding-system))
+ (setq used-codesys (coding-system-property coding-system
+ 'coding-system))
+ (if (and used-codesys
+ (not (eq 'undecided (coding-system-type used-codesys))))
+ ;; If this property is available, and not undecided, it should
+ ;; be a coding system that we can use to write a file (as
+ ;; opposed to the true undecided coding system, which trashes
+ ;; non-Latin-1 on writing). It might just be the value of
+ ;; coding-system passed to #'insert-file-contents-internal.
+ (setq coding-system used-codesys)
+ ;; Otherwise, take the value normally specified by the
+ ;; language environment:
+ (setq coding-system (default-value
+ 'buffer-file-coding-system))))
+ (if (local-variable-p 'buffer-file-coding-system
+ (current-buffer))
+ (set-buffer-file-coding-system
+ (subsidiary-coding-system
+ buffer-file-coding-system
+ (coding-system-eol-type coding-system)) t t)
+ (set-buffer-file-coding-system coding-system t t))
+ (setq buffer-file-coding-system-when-loaded
+ coding-system)
(run-hook-with-args 'insert-file-contents-error-hook
filename visit err)
(signal (car err) (cdr err))))
@@ -449,17 +476,19 @@
(unless (zerop (buffer-size))
(warn "%s: autodetection failed: setting to default."
(file-name-nondirectory (buffer-file-name))))
- (setq coding-system
- (or
- ;; If this property is available, it will be a coding
- ;; system that we can use to write a file (as opposed to
- ;; the true undecided coding system, which trashes
- ;; non-Latin-1 on writing). It might just be the value of
- ;; coding-system passed to #'insert-file-contents-internal.
- (coding-system-property coding-system 'coding-system)
- ;; Otherwise, take the value normally specified by the
- ;; language environment:
- (default-value 'buffer-file-coding-system))))
+ (setq used-codesys (coding-system-property coding-system
+ 'coding-system))
+ (if (and used-codesys
+ (not (eq 'undecided (coding-system-type used-codesys))))
+ ;; If this property is available, and not undecided, it should
+ ;; be a coding system that we can use to write a file (as
+ ;; opposed to the true undecided coding system, which trashes
+ ;; non-Latin-1 on writing). It might just be the value of
+ ;; coding-system passed to #'insert-file-contents-internal.
+ (setq coding-system used-codesys)
+ ;; Otherwise, take the value normally specified by the
+ ;; language environment:
+ (setq coding-system (default-value 'buffer-file-coding-system))))
;; call any `post-read-conversion' for the coding system that
;; was used ...
(let ((func
diff -r 3972966a4588 -r 8905163c49c5 tests/ChangeLog
--- a/tests/ChangeLog Sun Jul 12 14:20:55 2009 +0100
+++ b/tests/ChangeLog Mon Jul 13 20:45:26 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el:
+ Now that find-file on a nonexistent path gives a modified buffer,
+ we want to set this kind of buffer to be non-modified here before
+ killing it.
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
diff -r 3972966a4588 -r 8905163c49c5 tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Sun Jul 12 14:20:55 2009 +0100
+++ b/tests/automated/mule-tests.el Mon Jul 13 20:45:26 2009 +0100
@@ -158,6 +158,7 @@
(find-file nonexistent-file-name coding-system)
(Assert (eq (find-coding-system coding-system)
buffer-file-coding-system))
+ (set-buffer-modified-p nil)
(kill-buffer nil)))
(delete-file existing-file-name))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: #'find-file: set b-f-c-s even on error (cf. non-existent files),
15 years, 5 months
Aidan Kehoe
changeset: 4650:8905163c49c5
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Jul 13 20:45:26 2009 +0100
files: lisp/ChangeLog lisp/code-files.el tests/ChangeLog tests/automated/mule-tests.el
description:
#'find-file: set b-f-c-s even on error (cf. non-existent files),
handle undecided coding-systems passed back from
#'insert-file-contents-internal better.
tests/ChangeLog addition:
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Now that find-file on a nonexistent path gives a modified buffer,
we want to set this kind of buffer to be non-modified here before
killing it.
lisp/ChangeLog addition:
2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
Set the buffer coding system even on error; especially important
when dealing with nonexistent files.
If the `coding-system' property of an undecided coding system is
itself undecided, don't use that as a value for
buffer-file-coding-system.
diff -r 3972966a4588 -r 8905163c49c5 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 12 14:20:55 2009 +0100
+++ b/lisp/ChangeLog Mon Jul 13 20:45:26 2009 +0100
@@ -1,3 +1,12 @@
+2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * code-files.el (insert-file-contents):
+ Set the buffer coding system even on error; especially important
+ when dealing with nonexistent files.
+ If the `coding-system' property of an undecided coding system is
+ itself undecided, don't use that as a value for
+ buffer-file-coding-system.
+
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (after-find-file):
diff -r 3972966a4588 -r 8905163c49c5 lisp/code-files.el
--- a/lisp/code-files.el Sun Jul 12 14:20:55 2009 +0100
+++ b/lisp/code-files.el Mon Jul 13 20:45:26 2009 +0100
@@ -439,6 +439,33 @@
'used-codesys))
))
(file-error
+ ;; If we error, which we may if the file does not exist, we still
+ ;; want to set the buffer-file-coding-system if that is
+ ;; appropriate:
+ (when (eq 'undecided (coding-system-type coding-system))
+ (setq used-codesys (coding-system-property coding-system
+ 'coding-system))
+ (if (and used-codesys
+ (not (eq 'undecided (coding-system-type used-codesys))))
+ ;; If this property is available, and not undecided, it should
+ ;; be a coding system that we can use to write a file (as
+ ;; opposed to the true undecided coding system, which trashes
+ ;; non-Latin-1 on writing). It might just be the value of
+ ;; coding-system passed to #'insert-file-contents-internal.
+ (setq coding-system used-codesys)
+ ;; Otherwise, take the value normally specified by the
+ ;; language environment:
+ (setq coding-system (default-value
+ 'buffer-file-coding-system))))
+ (if (local-variable-p 'buffer-file-coding-system
+ (current-buffer))
+ (set-buffer-file-coding-system
+ (subsidiary-coding-system
+ buffer-file-coding-system
+ (coding-system-eol-type coding-system)) t t)
+ (set-buffer-file-coding-system coding-system t t))
+ (setq buffer-file-coding-system-when-loaded
+ coding-system)
(run-hook-with-args 'insert-file-contents-error-hook
filename visit err)
(signal (car err) (cdr err))))
@@ -449,17 +476,19 @@
(unless (zerop (buffer-size))
(warn "%s: autodetection failed: setting to default."
(file-name-nondirectory (buffer-file-name))))
- (setq coding-system
- (or
- ;; If this property is available, it will be a coding
- ;; system that we can use to write a file (as opposed to
- ;; the true undecided coding system, which trashes
- ;; non-Latin-1 on writing). It might just be the value of
- ;; coding-system passed to #'insert-file-contents-internal.
- (coding-system-property coding-system 'coding-system)
- ;; Otherwise, take the value normally specified by the
- ;; language environment:
- (default-value 'buffer-file-coding-system))))
+ (setq used-codesys (coding-system-property coding-system
+ 'coding-system))
+ (if (and used-codesys
+ (not (eq 'undecided (coding-system-type used-codesys))))
+ ;; If this property is available, and not undecided, it should
+ ;; be a coding system that we can use to write a file (as
+ ;; opposed to the true undecided coding system, which trashes
+ ;; non-Latin-1 on writing). It might just be the value of
+ ;; coding-system passed to #'insert-file-contents-internal.
+ (setq coding-system used-codesys)
+ ;; Otherwise, take the value normally specified by the
+ ;; language environment:
+ (setq coding-system (default-value 'buffer-file-coding-system))))
;; call any `post-read-conversion' for the coding system that
;; was used ...
(let ((func
diff -r 3972966a4588 -r 8905163c49c5 tests/ChangeLog
--- a/tests/ChangeLog Sun Jul 12 14:20:55 2009 +0100
+++ b/tests/ChangeLog Mon Jul 13 20:45:26 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el:
+ Now that find-file on a nonexistent path gives a modified buffer,
+ we want to set this kind of buffer to be non-modified here before
+ killing it.
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
diff -r 3972966a4588 -r 8905163c49c5 tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Sun Jul 12 14:20:55 2009 +0100
+++ b/tests/automated/mule-tests.el Mon Jul 13 20:45:26 2009 +0100
@@ -158,6 +158,7 @@
(find-file nonexistent-file-name coding-system)
(Assert (eq (find-coding-system coding-system)
buffer-file-coding-system))
+ (set-buffer-modified-p nil)
(kill-buffer nil)))
(delete-file existing-file-name))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Kill buffer if directory name misspelled and user doesn't want to create it.
15 years, 5 months
Aidan Kehoe
changeset: 4649:3972966a4588
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jul 12 14:20:55 2009 +0100
files: lisp/ChangeLog lisp/files.el
description:
Kill buffer if directory name misspelled and user doesn't want to create it.
Robert Delius Royar, Rodney Sparapani and I want this behaviour, as
far as I can tell; Stephen Turnbull doesn't.
lisp/ChangeLog addition:
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (after-find-file):
If the answer to "The directory containing %s does not exist.
Create?" is no, kill the current buffer, since the user probably
just misspelled the directory name. Thank you Rodney Sparapani!
diff -r 907697569a49 -r 3972966a4588 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/ChangeLog Sun Jul 12 14:20:55 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (after-find-file):
+ If the answer to "The directory containing %s does not exist.
+ Create?" is no, kill the current buffer, since the user probably
+ just misspelled the directory name. Thank you Rodney Sparapani!
+
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
diff -r 907697569a49 -r 3972966a4588 lisp/files.el
--- a/lisp/files.el Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/files.el Sun Jul 12 14:20:55 2009 +0100
@@ -1561,7 +1561,8 @@
(abbreviate-file-name buffer-file-name)))
(make-directory (file-name-directory
buffer-file-name)
- t))
+ t)
+ (kill-buffer (current-buffer)))
(quit
(kill-buffer (current-buffer))
(signal 'quit nil))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Kill buffer if dir misspelled and user doesn't want to create
15 years, 5 months
Aidan Kehoe
APPROVE COMMIT
NOTE; This patch has been committed.
There’s not an astonishing amount of consensus on this, but people won’t
lose data either way.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1247404855 -3600
# Node ID 3972966a4588d70e94bd50cc7ce3ebb477bb707c
# Parent 907697569a49825c445209e4d95649f581cde788
Kill buffer if directory name misspelled and user doesn't want to create it.
Robert Delius Royar, Rodney Sparapani and I want this behaviour, as
far as I can tell; Stephen Turnbull doesn't.
lisp/ChangeLog addition:
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (after-find-file):
If the answer to "The directory containing %s does not exist.
Create?" is no, kill the current buffer, since the user probably
just misspelled the directory name. Thank you Rodney Sparapani!
diff -r 907697569a49 -r 3972966a4588 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/ChangeLog Sun Jul 12 14:20:55 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (after-find-file):
+ If the answer to "The directory containing %s does not exist.
+ Create?" is no, kill the current buffer, since the user probably
+ just misspelled the directory name. Thank you Rodney Sparapani!
+
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
diff -r 907697569a49 -r 3972966a4588 lisp/files.el
--- a/lisp/files.el Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/files.el Sun Jul 12 14:20:55 2009 +0100
@@ -1561,7 +1561,8 @@
(abbreviate-file-name buffer-file-name)))
(make-directory (file-name-directory
buffer-file-name)
- t))
+ t)
+ (kill-buffer (current-buffer)))
(quit
(kill-buffer (current-buffer))
(signal 'quit nil))))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Mark buffers modified in #'find-file if nonexistent file; fix other bugs.
15 years, 5 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
Cf. issue 147 and the related thread, of which
http://mid.gmane.org/18848.1418.826402.657446@parhasard.net is the
only message to show up in Gmane.
I said yesterday that I hoped to commit something that would fix the
problems with wild cards and specifying coding systems in #'find-file and
related functions; I had misremembered, the change I committed yesterday was
sufficient for that.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1247403669 -3600
# Node ID 907697569a49825c445209e4d95649f581cde788
# Parent e4ed58cb0e5b779d7ab5e2939e5a1b20b2acad93
Mark buffers modified in #'find-file if nonexistent file; fix other bugs.
lisp/ChangeLog addition:
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
New macro, used to mark buffers created within #'find-file (and
related) modified if the associated file doesn't exist.
(find-alternate-file-other-window):
Correct this, pass CODESYS to find-file-other-window.
(find-file-read-only):
Correct behaviour of this function in the presence of wildcards.
(find-file):
(find-file-other-window):
(find-file-other-frame):
(find-file-read-only-other-window):
(find-file-read-only-other-frame):
(find-alternate-file):
Simplify these functions, use #'find-file-create-switch-thunk'
instead of explicit #'switch-to-buffer calls.
diff -r e4ed58cb0e5b -r 907697569a49 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jul 11 16:33:35 2009 +0100
+++ b/lisp/ChangeLog Sun Jul 12 14:01:09 2009 +0100
@@ -1,3 +1,21 @@
+2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (find-file-create-switch-thunk):
+ New macro, used to mark buffers created within #'find-file (and
+ related) modified if the associated file doesn't exist.
+ (find-alternate-file-other-window):
+ Correct this, pass CODESYS to find-file-other-window.
+ (find-file-read-only):
+ Correct behaviour of this function in the presence of wildcards.
+ (find-file):
+ (find-file-other-window):
+ (find-file-other-frame):
+ (find-file-read-only-other-window):
+ (find-file-read-only-other-frame):
+ (find-alternate-file):
+ Simplify these functions, use #'find-file-create-switch-thunk'
+ instead of explicit #'switch-to-buffer calls.
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
diff -r e4ed58cb0e5b -r 907697569a49 lisp/files.el
--- a/lisp/files.el Sat Jul 11 16:33:35 2009 +0100
+++ b/lisp/files.el Sun Jul 12 14:01:09 2009 +0100
@@ -879,6 +879,30 @@
(not (funcall buffers-tab-selection-function
curbuf (car (buffer-list)))))))))
+(defmacro find-file-create-switch-thunk (switch-function)
+ "Mark buffer modified if needed, then call SWITCH-FUNCTION.
+
+The buffer will be marked modified if the file associated with the buffer
+does not exist. This means that \\[find-file] on a non-existent file will
+create a modified buffer, making \\[save-buffer] sufficient to create the
+file.
+
+SWITCH-FUNCTION should be `switch-to-buffer' or a related function. This
+function (that is, `find-file-create-switch-thunk') is implemented as a macro
+because we don't have built-in lexical scope, a closure created with
+`lexical-let' will always run as interpreted code. Though functions created
+by this macro are unlikely to be called in performance-critical contexts.
+
+This function may be called from functions related to `find-file', as well
+as `find-file' itself."
+ `(function
+ (lambda (buffer)
+ (unless (file-exists-p (buffer-file-name buffer))
+ ;; XEmacs: nonexistent file--qualifies as a modification to the
+ ;; buffer.
+ (set-buffer-modified-p t buffer))
+ (,switch-function buffer))))
+
(defun find-file (filename &optional codesys wildcards)
"Edit file FILENAME.
Switch to a buffer visiting file FILENAME, creating one if none already
@@ -912,25 +936,13 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let* ((coding-system-for-read (get-coding-system codesys))
- (value (find-file-noselect filename nil nil wildcards))
- (bufname (if (listp value) (car (nreverse value)) value)))
- ;; If a user explicitly specified the coding system with a prefix
- ;; argument when opening a nonexistent file, insert-file-contents
- ;; hasn't preserved that coding system as the local
- ;; buffer-file-coding-system. Do that ourselves.
- (unless (and bufname
- (file-exists-p (buffer-file-name bufname))
- (local-variable-p 'buffer-file-coding-system bufname))
- (save-excursion
- (set-buffer bufname)
- (setq buffer-file-coding-system coding-system-for-read)))
- (switch-to-buffer bufname))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (mapcar 'switch-to-buffer (nreverse value))
- (switch-to-buffer value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (thunk (find-file-create-switch-thunk switch-to-buffer)))
+ (if (listp value)
+ (mapcar thunk (nreverse value))
+ (funcall thunk value))))
(defun find-file-other-window (filename &optional codesys wildcards)
"Edit file FILENAME, in another window.
@@ -942,23 +954,17 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-window (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-window value))))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-window (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-window value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (list (and (listp value) (nreverse value)))
+ (other-window-thunk (find-file-create-switch-thunk
+ switch-to-buffer-other-window)))
+ (if list
+ (cons
+ (funcall other-window-thunk (car list))
+ (mapcar (find-file-create-switch-thunk switch-to-buffer) (cdr list)))
+ (funcall other-window-thunk value))))
(defun find-file-other-frame (filename &optional codesys wildcards)
"Edit file FILENAME, in a newly-created frame.
@@ -969,23 +975,20 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-frame (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-frame value))))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-frame (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-frame value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (list (and (listp value) (nreverse value)))
+ (other-frame-thunk (find-file-create-switch-thunk
+ switch-to-buffer-other-frame)))
+ (if list
+ (cons
+ (funcall other-frame-thunk (car list))
+ (mapcar (find-file-create-switch-thunk switch-to-buffer) (cdr list)))
+ (funcall other-frame-thunk value))))
+
+;; No need to keep this macro around in the dumped executable.
+(unintern 'find-file-create-switch-thunk)
(defun find-file-read-only (filename &optional codesys wildcards)
"Edit file FILENAME but don't allow changes.
@@ -998,13 +1001,11 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file filename nil wildcards))
- (find-file filename nil wildcards))
- (setq buffer-read-only t)
- (current-buffer))
+ (let ((value (find-file filename codesys wildcards)))
+ (mapcar #'(lambda (buffer)
+ (set-symbol-value-in-buffer 'buffer-read-only t buffer))
+ (if (listp value) value (list value)))
+ value))
(defun find-file-read-only-other-window (filename &optional codesys wildcards)
"Edit file FILENAME in another window but don't allow changes.
@@ -1017,11 +1018,7 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file-other-window filename))
- (find-file-other-window filename))
+ (find-file-other-window filename codesys wildcards)
(setq buffer-read-only t)
(current-buffer))
@@ -1036,11 +1033,7 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file-other-frame filename))
- (find-file-other-frame filename))
+ (find-file-other-frame filename codesys wildcards)
(setq buffer-read-only t)
(current-buffer))
@@ -1062,7 +1055,7 @@
"Find alternate file: " file-dir nil nil file-name)
(if current-prefix-arg (read-coding-system "Coding-system: "))))))
(if (one-window-p)
- (find-file-other-window filename)
+ (find-file-other-window filename codesys)
(save-selected-window
(other-window 1)
(find-alternate-file filename codesys))))
@@ -1104,11 +1097,7 @@
(unwind-protect
(progn
(unlock-buffer)
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file filename))
- (find-file filename)))
+ (find-file filename codesys))
(cond ((eq obuf (current-buffer))
(setq buffer-file-name ofile)
(setq buffer-file-number onum)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Mark buffers modified in #'find-file if nonexistent file; fix other bugs.
15 years, 5 months
Aidan Kehoe
changeset: 4648:907697569a49
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jul 12 14:01:09 2009 +0100
files: lisp/ChangeLog lisp/files.el
description:
Mark buffers modified in #'find-file if nonexistent file; fix other bugs.
lisp/ChangeLog addition:
2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* files.el (find-file-create-switch-thunk):
New macro, used to mark buffers created within #'find-file (and
related) modified if the associated file doesn't exist.
(find-alternate-file-other-window):
Correct this, pass CODESYS to find-file-other-window.
(find-file-read-only):
Correct behaviour of this function in the presence of wildcards.
(find-file):
(find-file-other-window):
(find-file-other-frame):
(find-file-read-only-other-window):
(find-file-read-only-other-frame):
(find-alternate-file):
Simplify these functions, use #'find-file-create-switch-thunk'
instead of explicit #'switch-to-buffer calls.
diff -r e4ed58cb0e5b -r 907697569a49 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jul 11 16:33:35 2009 +0100
+++ b/lisp/ChangeLog Sun Jul 12 14:01:09 2009 +0100
@@ -1,3 +1,21 @@
+2009-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * files.el (find-file-create-switch-thunk):
+ New macro, used to mark buffers created within #'find-file (and
+ related) modified if the associated file doesn't exist.
+ (find-alternate-file-other-window):
+ Correct this, pass CODESYS to find-file-other-window.
+ (find-file-read-only):
+ Correct behaviour of this function in the presence of wildcards.
+ (find-file):
+ (find-file-other-window):
+ (find-file-other-frame):
+ (find-file-read-only-other-window):
+ (find-file-read-only-other-frame):
+ (find-alternate-file):
+ Simplify these functions, use #'find-file-create-switch-thunk'
+ instead of explicit #'switch-to-buffer calls.
+
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
diff -r e4ed58cb0e5b -r 907697569a49 lisp/files.el
--- a/lisp/files.el Sat Jul 11 16:33:35 2009 +0100
+++ b/lisp/files.el Sun Jul 12 14:01:09 2009 +0100
@@ -879,6 +879,30 @@
(not (funcall buffers-tab-selection-function
curbuf (car (buffer-list)))))))))
+(defmacro find-file-create-switch-thunk (switch-function)
+ "Mark buffer modified if needed, then call SWITCH-FUNCTION.
+
+The buffer will be marked modified if the file associated with the buffer
+does not exist. This means that \\[find-file] on a non-existent file will
+create a modified buffer, making \\[save-buffer] sufficient to create the
+file.
+
+SWITCH-FUNCTION should be `switch-to-buffer' or a related function. This
+function (that is, `find-file-create-switch-thunk') is implemented as a macro
+because we don't have built-in lexical scope, a closure created with
+`lexical-let' will always run as interpreted code. Though functions created
+by this macro are unlikely to be called in performance-critical contexts.
+
+This function may be called from functions related to `find-file', as well
+as `find-file' itself."
+ `(function
+ (lambda (buffer)
+ (unless (file-exists-p (buffer-file-name buffer))
+ ;; XEmacs: nonexistent file--qualifies as a modification to the
+ ;; buffer.
+ (set-buffer-modified-p t buffer))
+ (,switch-function buffer))))
+
(defun find-file (filename &optional codesys wildcards)
"Edit file FILENAME.
Switch to a buffer visiting file FILENAME, creating one if none already
@@ -912,25 +936,13 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let* ((coding-system-for-read (get-coding-system codesys))
- (value (find-file-noselect filename nil nil wildcards))
- (bufname (if (listp value) (car (nreverse value)) value)))
- ;; If a user explicitly specified the coding system with a prefix
- ;; argument when opening a nonexistent file, insert-file-contents
- ;; hasn't preserved that coding system as the local
- ;; buffer-file-coding-system. Do that ourselves.
- (unless (and bufname
- (file-exists-p (buffer-file-name bufname))
- (local-variable-p 'buffer-file-coding-system bufname))
- (save-excursion
- (set-buffer bufname)
- (setq buffer-file-coding-system coding-system-for-read)))
- (switch-to-buffer bufname))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (mapcar 'switch-to-buffer (nreverse value))
- (switch-to-buffer value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (thunk (find-file-create-switch-thunk switch-to-buffer)))
+ (if (listp value)
+ (mapcar thunk (nreverse value))
+ (funcall thunk value))))
(defun find-file-other-window (filename &optional codesys wildcards)
"Edit file FILENAME, in another window.
@@ -942,23 +954,17 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-window (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-window value))))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-window (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-window value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (list (and (listp value) (nreverse value)))
+ (other-window-thunk (find-file-create-switch-thunk
+ switch-to-buffer-other-window)))
+ (if list
+ (cons
+ (funcall other-window-thunk (car list))
+ (mapcar (find-file-create-switch-thunk switch-to-buffer) (cdr list)))
+ (funcall other-window-thunk value))))
(defun find-file-other-frame (filename &optional codesys wildcards)
"Edit file FILENAME, in a newly-created frame.
@@ -969,23 +975,20 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-frame (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-frame value))))
- (let ((value (find-file-noselect filename nil nil wildcards)))
- (if (listp value)
- (progn
- (setq value (nreverse value))
- (switch-to-buffer-other-frame (car value))
- (mapcar 'switch-to-buffer (cdr value)))
- (switch-to-buffer-other-frame value)))))
+ (and codesys (setq codesys (check-coding-system codesys)))
+ (let* ((coding-system-for-read (or codesys coding-system-for-read))
+ (value (find-file-noselect filename nil nil wildcards))
+ (list (and (listp value) (nreverse value)))
+ (other-frame-thunk (find-file-create-switch-thunk
+ switch-to-buffer-other-frame)))
+ (if list
+ (cons
+ (funcall other-frame-thunk (car list))
+ (mapcar (find-file-create-switch-thunk switch-to-buffer) (cdr list)))
+ (funcall other-frame-thunk value))))
+
+;; No need to keep this macro around in the dumped executable.
+(unintern 'find-file-create-switch-thunk)
(defun find-file-read-only (filename &optional codesys wildcards)
"Edit file FILENAME but don't allow changes.
@@ -998,13 +1001,11 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file filename nil wildcards))
- (find-file filename nil wildcards))
- (setq buffer-read-only t)
- (current-buffer))
+ (let ((value (find-file filename codesys wildcards)))
+ (mapcar #'(lambda (buffer)
+ (set-symbol-value-in-buffer 'buffer-read-only t buffer))
+ (if (listp value) value (list value)))
+ value))
(defun find-file-read-only-other-window (filename &optional codesys wildcards)
"Edit file FILENAME in another window but don't allow changes.
@@ -1017,11 +1018,7 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file-other-window filename))
- (find-file-other-window filename))
+ (find-file-other-window filename codesys wildcards)
(setq buffer-read-only t)
(current-buffer))
@@ -1036,11 +1033,7 @@
(and current-prefix-arg
(read-coding-system "Coding system: "))
t))
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file-other-frame filename))
- (find-file-other-frame filename))
+ (find-file-other-frame filename codesys wildcards)
(setq buffer-read-only t)
(current-buffer))
@@ -1062,7 +1055,7 @@
"Find alternate file: " file-dir nil nil file-name)
(if current-prefix-arg (read-coding-system "Coding-system: "))))))
(if (one-window-p)
- (find-file-other-window filename)
+ (find-file-other-window filename codesys)
(save-selected-window
(other-window 1)
(find-alternate-file filename codesys))))
@@ -1104,11 +1097,7 @@
(unwind-protect
(progn
(unlock-buffer)
- (if codesys
- (let ((coding-system-for-read
- (get-coding-system codesys)))
- (find-file filename))
- (find-file filename)))
+ (find-file filename codesys))
(cond ((eq obuf (current-buffer))
(setq buffer-file-name ofile)
(setq buffer-file-number onum)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Fix bugs with #'find-file, 0-length files, & coding-system-for-read specified.
15 years, 5 months
Aidan Kehoe
changeset: 4647:e4ed58cb0e5b
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 11 16:33:35 2009 +0100
files: lisp/ChangeLog lisp/code-files.el src/ChangeLog src/file-coding.c tests/ChangeLog tests/automated/mule-tests.el
description:
Fix bugs with #'find-file, 0-length files, & coding-system-for-read specified.
src/ChangeLog addition:
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c (undecided_canonicalize_after_coding):
If no data have been seen, or if
coding_stream_canonicalize_after_coding gives nil, pass back
str->codesys, which will be of type undecided (the same as the old
behaviour) but will reflect any CODESYS argument passed to
make_coding_input_stream. See also the change in lisp/code-files.el
lisp/ChangeLog addition:
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* code-files.el (insert-file-contents):
Take advantage of more sensible behaviour from
#'insert-file-contents-internal, allowing us to actually follow
the documented coding system behaviour for nonexistent files (that
is, buffer-file-coding-system reflects coding-system-for-read &c.,
not becoming undecided for either zero-length or nonexistent
files).
tests/ChangeLog addition:
2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Check for Richard Zidlicky's bug of
http://mid.gmane.org/20090602194123.GA5163@linux-m68k.org; also
check that supplying CODESYS to #'find-file is respected both for
nonexistent files and zero-length existing files.
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b lisp/ChangeLog
--- a/lisp/ChangeLog Wed Jul 01 16:42:11 2009 -0600
+++ b/lisp/ChangeLog Sat Jul 11 16:33:35 2009 +0100
@@ -1,3 +1,13 @@
+2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * code-files.el (insert-file-contents):
+ Take advantage of more sensible behaviour from
+ #'insert-file-contents-internal, allowing us to actually follow
+ the documented coding system behaviour for nonexistent files (that
+ is, buffer-file-coding-system reflects coding-system-for-read &c.,
+ not becoming undecided for either zero-length or nonexistent
+ files).
+
2009-06-20 It's me FKtPp ;) <m_pupil(a)yahoo.com.cn>
* files.el (cd): Do not #'split-path on nil #'getenv result; Make
sure the cd-path value is a list.
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b lisp/code-files.el
--- a/lisp/code-files.el Wed Jul 01 16:42:11 2009 -0600
+++ b/lisp/code-files.el Sat Jul 11 16:33:35 2009 +0100
@@ -449,7 +449,17 @@
(unless (zerop (buffer-size))
(warn "%s: autodetection failed: setting to default."
(file-name-nondirectory (buffer-file-name))))
- (setq coding-system (default-value 'buffer-file-coding-system)))
+ (setq coding-system
+ (or
+ ;; If this property is available, it will be a coding
+ ;; system that we can use to write a file (as opposed to
+ ;; the true undecided coding system, which trashes
+ ;; non-Latin-1 on writing). It might just be the value of
+ ;; coding-system passed to #'insert-file-contents-internal.
+ (coding-system-property coding-system 'coding-system)
+ ;; Otherwise, take the value normally specified by the
+ ;; language environment:
+ (default-value 'buffer-file-coding-system))))
;; call any `post-read-conversion' for the coding system that
;; was used ...
(let ((func
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b src/ChangeLog
--- a/src/ChangeLog Wed Jul 01 16:42:11 2009 -0600
+++ b/src/ChangeLog Sat Jul 11 16:33:35 2009 +0100
@@ -1,3 +1,12 @@
+2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * file-coding.c (undecided_canonicalize_after_coding):
+ If no data have been seen, or if
+ coding_stream_canonicalize_after_coding gives nil, pass back
+ str->codesys, which will be of type undecided (the same as the old
+ behaviour) but will reflect any CODESYS argument passed to
+ make_coding_input_stream. See also the change in lisp/code-files.el
+
2009-06-09 Jerry James <james(a)xemacs.org>
* glyphs-eimage.c (jpeg_instantiate):
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b src/file-coding.c
--- a/src/file-coding.c Wed Jul 01 16:42:11 2009 -0600
+++ b/src/file-coding.c Sat Jul 11 16:33:35 2009 +0100
@@ -4078,12 +4078,12 @@
return str->codesys;
if (!data->c.initted)
- return Fget_coding_system (Qundecided);
+ return str->codesys;
ret = coding_stream_canonicalize_after_coding
(XLSTREAM (data->c.lstreams[0]));
if (NILP (ret))
- ret = Fget_coding_system (Qundecided);
+ ret = str->codesys;
if (XCODING_SYSTEM_EOL_TYPE (ret) != EOL_AUTODETECT)
return ret;
eolret = coding_stream_canonicalize_after_coding
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b tests/ChangeLog
--- a/tests/ChangeLog Wed Jul 01 16:42:11 2009 -0600
+++ b/tests/ChangeLog Sat Jul 11 16:33:35 2009 +0100
@@ -1,3 +1,11 @@
+2009-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el:
+ Check for Richard Zidlicky's bug of
+ http://mid.gmane.org/20090602194123.GA5163@linux-m68k.org; also
+ check that supplying CODESYS to #'find-file is respected both for
+ nonexistent files and zero-length existing files.
+
2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.29 "garbanzo" is released.
diff -r 6c6bfdb80a0c -r e4ed58cb0e5b tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Wed Jul 01 16:42:11 2009 -0600
+++ b/tests/automated/mule-tests.el Sat Jul 11 16:33:35 2009 +0100
@@ -141,6 +141,26 @@
(kill-buffer nil))
(delete-file test-file-name))
+(let ((existing-file-name
+ (make-temp-file (expand-file-name "k7lCS2Mg" (temp-directory))))
+ (nonexistent-file-name
+ (make-temp-name (temp-directory))))
+ (find-file existing-file-name)
+ (Assert (not (eq 'undecided
+ (coding-system-type buffer-file-coding-system))))
+ (kill-buffer nil)
+ (dolist (coding-system '(utf-8 windows-1251 macintosh big5))
+ (when (find-coding-system coding-system)
+ (find-file existing-file-name coding-system)
+ (Assert (eq (find-coding-system coding-system)
+ buffer-file-coding-system))
+ (kill-buffer nil)
+ (find-file nonexistent-file-name coding-system)
+ (Assert (eq (find-coding-system coding-system)
+ buffer-file-coding-system))
+ (kill-buffer nil)))
+ (delete-file existing-file-name))
+
;;-----------------------------------------------------------------
;; Test string modification functions that modify the length of a char.
;;-----------------------------------------------------------------
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches