carbon2-commit: Correct the make-temp-name docstring.
16 years, 11 months
Aidan Kehoe
changeset: 4396:1e04b9c8125bd4bcd89d56b366d3990bc1032adf
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jan 03 22:36:04 2008 +0100
files: src/ChangeLog src/fileio.c
description:
Correct the make-temp-name docstring.
Take the opportunity to correct the format of ChangeLog.
2008-01-03 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fmake_temp_name): Correct the comment to cross
reference to make-temp-file, and not to this function.
diff -r 12ff8dc2b57efb9adce6e948572be056d629c5ee -r 1e04b9c8125bd4bcd89d56b366d3990bc1032adf src/ChangeLog
--- a/src/ChangeLog Thu Jan 03 12:45:44 2008 +0100
+++ b/src/ChangeLog Thu Jan 03 22:36:04 2008 +0100
@@ -1,3 +1,8 @@ 2008-01-03 Stephen J. Turnbull <stephe
+2008-01-03 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (Fmake_temp_name): Correct the comment to cross
+ reference to make-temp-file, and not to this function.
+
2008-01-03 Stephen J. Turnbull <stephen(a)xemacs.org>
* doc.c (Fbuilt_in_symbol_file): Improve style.
@@ -10,7 +15,6 @@ 2008-01-02 Aidan Kehoe <kehoea@parhasa
* console-gtk.c (gtk_perhaps_init_unseen_key_defaults):
Correct the initialisation of the hash table, on the model of the
MSW and TTY builds.
-
2008-01-02 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r 12ff8dc2b57efb9adce6e948572be056d629c5ee -r 1e04b9c8125bd4bcd89d56b366d3990bc1032adf src/fileio.c
--- a/src/fileio.c Thu Jan 03 12:45:44 2008 +0100
+++ b/src/fileio.c Thu Jan 03 22:36:04 2008 +0100
@@ -628,7 +628,7 @@ be an absolute file name.
This function is analagous to mktemp(3) under POSIX, and as with it, there
exists a race condition between the test for the existence of the new file
-and its creation. See `make-temp-name' for a function which avoids this
+and its creation. See `make-temp-file' for a function which avoids this
race condition by specifying the appropriate flags to `write-region'.
*/
(prefix))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Create the containing directory for the custom and init files if necessary.
16 years, 11 months
Aidan Kehoe
changeset: 4395:12ff8dc2b57efb9adce6e948572be056d629c5ee
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jan 03 12:45:44 2008 +0100
files: lisp/ChangeLog lisp/cus-edit.el lisp/menubar-items.el
description:
Create the containing directory for the custom and init files if necessary.
2008-01-03 Aidan Kehoe <kehoea(a)parhasard.net>
* cus-edit.el (custom-save-all):
If the directory containing the custom file doesn't exist, try to
create it. Fixes Nick's Crabtree's bug of
5fb265820712140145w512fa3bbh355cf76f7e2cf792(a)mail.gmail.com ;
thank you Nick.
* menubar-items.el (default-menubar):
In the code to edit the user's init file, try to create the
containing directory if it doesn't exist.
diff -r 3906442b491b42211630c8b8cd8a8cc05060ce4a -r 12ff8dc2b57efb9adce6e948572be056d629c5ee lisp/ChangeLog
--- a/lisp/ChangeLog Thu Jan 03 01:33:59 2008 -0800
+++ b/lisp/ChangeLog Thu Jan 03 12:45:44 2008 +0100
@@ -1,3 +1,14 @@ 2008-01-02 Aidan Kehoe <kehoea@parhasa
+2008-01-03 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cus-edit.el (custom-save-all):
+ If the directory containing the custom file doesn't exist, try to
+ create it. Fixes Nick's Crabtree's bug of
+ 5fb265820712140145w512fa3bbh355cf76f7e2cf792(a)mail.gmail.com ;
+ thank you Nick.
+ * menubar-items.el (default-menubar):
+ In the code to edit the user's init file, try to create the
+ containing directory if it doesn't exist.
+
2008-01-02 Aidan Kehoe <kehoea(a)parhasard.net>
* gtk-init.el (init-post-gtk-win):
diff -r 3906442b491b42211630c8b8cd8a8cc05060ce4a -r 12ff8dc2b57efb9adce6e948572be056d629c5ee lisp/cus-edit.el
--- a/lisp/cus-edit.el Thu Jan 03 01:33:59 2008 -0800
+++ b/lisp/cus-edit.el Thu Jan 03 12:45:44 2008 +0100
@@ -3766,7 +3766,13 @@ Hashes several heavily used functions fo
(custom-save-variables)
(custom-save-faces)
(let ((find-file-hooks nil)
- (auto-mode-alist))
+ (auto-mode-alist)
+ custom-file-directory)
+ (unless (file-directory-p (setq custom-file-directory
+ (file-name-directory custom-file)))
+ (message "Creating %s... " custom-file-directory)
+ (make-directory custom-file-directory t)
+ (message "Creating %s... done." custom-file-directory))
(with-current-buffer (find-file-noselect custom-file)
(save-buffer)))))
diff -r 3906442b491b42211630c8b8cd8a8cc05060ce4a -r 12ff8dc2b57efb9adce6e948572be056d629c5ee lisp/menubar-items.el
--- a/lisp/menubar-items.el Thu Jan 03 01:33:59 2008 -0800
+++ b/lisp/menubar-items.el Thu Jan 03 12:45:44 2008 +0100
@@ -1441,10 +1441,16 @@ Write your filter like this:
["Edit I%_nit File"
;; #### there should be something that holds the name that the init
;; file should be created as, when it's not present.
- (let ((el-file (or user-init-file "~/.xemacs/init.el")))
+ (let ((el-file (or user-init-file "~/.xemacs/init.el"))
+ el-file-directory)
(if (string-match "\\.elc$" el-file)
(setq el-file
(substring user-init-file 0 (1- (length el-file)))))
+ (unless (file-directory-p
+ (setq el-file-directory (file-name-directory el-file)))
+ (message "Creating %s... " el-file-directory)
+ (make-directory el-file-directory t)
+ (message "Creating %s... done." el-file-directory))
(find-file el-file)
(or (eq major-mode 'emacs-lisp-mode)
(emacs-lisp-mode)))]
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Improve style and add tests for 'built-in-symbol-file'.
16 years, 11 months
Aidan Kehoe
changeset: 4394:3906442b491b42211630c8b8cd8a8cc05060ce4a
parent: 4392:461fdb92f3b61866f7787d1922376603c9cc4c96
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Thu Jan 03 01:33:59 2008 -0800
files: src/ChangeLog src/doc.c tests/ChangeLog tests/automated/symbol-tests.el
description:
Improve style and add tests for 'built-in-symbol-file'.
diff -r 461fdb92f3b61866f7787d1922376603c9cc4c96 -r 3906442b491b42211630c8b8cd8a8cc05060ce4a src/ChangeLog
--- a/src/ChangeLog Wed Jan 02 22:11:03 2008 +0100
+++ b/src/ChangeLog Thu Jan 03 01:33:59 2008 -0800
@@ -1,3 +1,7 @@ 2008-01-02 Aidan Kehoe <kehoea@parhasa
+2008-01-03 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * doc.c (Fbuilt_in_symbol_file): Improve style.
+
2008-01-02 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (main_1):
diff -r 461fdb92f3b61866f7787d1922376603c9cc4c96 -r 3906442b491b42211630c8b8cd8a8cc05060ce4a src/doc.c
--- a/src/doc.c Wed Jan 02 22:11:03 2008 +0100
+++ b/src/doc.c Thu Jan 03 01:33:59 2008 -0800
@@ -519,8 +519,7 @@ If TYPE is `defvar', then variable defin
fun = Findirect_function (symbol);
if (SUBRP (fun) || (CONSP(fun) && (EQ (Qmacro, Fcar_safe (fun)))
- && !NILP(fun = Fcdr_safe (fun))
- && (SUBRP (fun))))
+ && (fun = Fcdr_safe (fun), SUBRP (fun))))
{
if (XSUBR (fun)->doc == 0)
return Qnil;
diff -r 461fdb92f3b61866f7787d1922376603c9cc4c96 -r 3906442b491b42211630c8b8cd8a8cc05060ce4a tests/ChangeLog
--- a/tests/ChangeLog Wed Jan 02 22:11:03 2008 +0100
+++ b/tests/ChangeLog Thu Jan 03 01:33:59 2008 -0800
@@ -1,3 +1,8 @@ 2007-12-29 Stephen J. Turnbull <stephe
+2008-01-03 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * automated/symbol-tests.el (Symbol documentation): Add tests to
+ check documentation extraction.
+
2007-12-29 Stephen J. Turnbull <stephen(a)xemacs.org>
* automated/test-harness.el (test-harness-test-compiled):
diff -r 461fdb92f3b61866f7787d1922376603c9cc4c96 -r 3906442b491b42211630c8b8cd8a8cc05060ce4a tests/automated/symbol-tests.el
--- a/tests/automated/symbol-tests.el Wed Jan 02 22:11:03 2008 +0100
+++ b/tests/automated/symbol-tests.el Thu Jan 03 01:33:59 2008 -0800
@@ -332,3 +332,23 @@
; (Assert (equal (catch 'test-tag
; (set mysym 'foo))
; `(,mysym (foo) make-local nil nil))))
+
+;; ----------------------------------------------------------------
+;; Symbol documentation
+;; ----------------------------------------------------------------
+
+;; built-in variable documentation
+(Assert (string= (built-in-symbol-file 'internal-doc-file-name)
+ "doc.c"))
+
+;; built-in function documentation
+(Assert (string= (built-in-symbol-file 'built-in-symbol-file)
+ "doc.c"))
+
+;; built-in macro documentation
+(Assert (string= (built-in-symbol-file 'when)
+ "eval.c"))
+
+;; #### we should handle symbols defined in Lisp, dumped, autoloaded,
+;; and required, too.
+
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Check that __STDC_VERSION__ is defined before examining it.
16 years, 11 months
Aidan Kehoe
changeset: 4389:4c5cd87620e4cf6f8f3101f5ed972f774d2df4c6
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jan 09 00:53:02 2008 +0100
files: src/ChangeLog src/config.h.in
description:
Check that __STDC_VERSION__ is defined before examining it.
2008-01-09 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
Check that __STDC_VERSION__ is defined before examining its
value. Eliminates a Cygwin warning.
diff -r 1a14c304cb8ead170dfb5edbbbf341724629f2d1 -r 4c5cd87620e4cf6f8f3101f5ed972f774d2df4c6 src/ChangeLog
--- a/src/ChangeLog Wed Jan 09 00:28:17 2008 +0100
+++ b/src/ChangeLog Wed Jan 09 00:53:02 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-08 Aidan Kehoe <kehoea@parhasa
+2008-01-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * config.h.in:
+ Check that __STDC_VERSION__ is defined before examining its
+ value. Eliminates a Cygwin warning.
+
2008-01-08 Aidan Kehoe <kehoea(a)parhasard.net>
* text.h (MAX_XETCHAR_SIZE): Remove, eliminating a redefinition
diff -r 1a14c304cb8ead170dfb5edbbbf341724629f2d1 -r 4c5cd87620e4cf6f8f3101f5ed972f774d2df4c6 src/config.h.in
--- a/src/config.h.in Wed Jan 09 00:28:17 2008 +0100
+++ b/src/config.h.in Wed Jan 09 00:53:02 2008 +0100
@@ -1086,8 +1086,8 @@ extern "C" {
Use `inline static' to define inline functions in .c files.
See the Internals manual for examples and more information. */
-#if __STDC_VERSION__ >= 199901L || defined (__cplusplus) || \
- ! defined (__GNUC__) || ! defined(emacs)
+#if (defined ( __STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs)
# define INLINE_HEADER inline static
#elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS)
# define INLINE_HEADER inline
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Don't use PATH_MAX_EXTERNAL, non-Win32.
16 years, 11 months
Aidan Kehoe
changeset: 4388:1a14c304cb8ead170dfb5edbbbf341724629f2d1
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jan 09 00:28:17 2008 +0100
files: src/ChangeLog src/dumper.c src/text.h
description:
Don't use PATH_MAX_EXTERNAL, non-Win32.
2008-01-08 Aidan Kehoe <kehoea(a)parhasard.net>
* text.h (MAX_XETCHAR_SIZE): Remove, eliminating a redefinition
warning on Win32.
* dumper.c (pdump_load):
Don't use PATH_MAX_EXTERNAL, instead allocate enough for the path
+ DUMP_SLACK (space for .dmp and version information), already
used on Win32 and #defined to be 100.
diff -r 9aa16aa434b6c7378354c60985dc2218ceb60db0 -r 1a14c304cb8ead170dfb5edbbbf341724629f2d1 src/ChangeLog
--- a/src/ChangeLog Tue Jan 08 12:47:42 2008 -0700
+++ b/src/ChangeLog Wed Jan 09 00:28:17 2008 +0100
@@ -1,3 +1,12 @@ 2008-01-08 Jerry James <james(a)xemacs.o
+2008-01-08 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * text.h (MAX_XETCHAR_SIZE): Remove, eliminating a redefinition
+ warning on Win32.
+ * dumper.c (pdump_load):
+ Don't use PATH_MAX_EXTERNAL, instead allocate enough for the path
+ + DUMP_SLACK (space for .dmp and version information), already
+ used on Win32 and #defined to be 100.
+
2008-01-08 Jerry James <james(a)xemacs.org>
* config.h.in (INLINE_HEADER): adapt to C99 inline semantics.
diff -r 9aa16aa434b6c7378354c60985dc2218ceb60db0 -r 1a14c304cb8ead170dfb5edbbbf341724629f2d1 src/dumper.c
--- a/src/dumper.c Tue Jan 08 12:47:42 2008 -0700
+++ b/src/dumper.c Wed Jan 09 00:28:17 2008 +0100
@@ -2630,6 +2630,8 @@ pdump_file_try (Wexttext *exe_path)
return 0;
}
+#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */
+
int
pdump_load (const Wexttext *argv0)
{
@@ -2637,7 +2639,6 @@ pdump_load (const Wexttext *argv0)
Wexttext *exe_path = NULL;
int bufsize = 4096;
int cchpathsize;
-#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */
/* Copied from mswindows_get_module_file_name (). Not clear if it's
kosher to malloc() yet. */
@@ -2659,7 +2660,7 @@ pdump_load (const Wexttext *argv0)
wext_strcpy (exe_path, wexe);
}
#else /* !WIN32_NATIVE */
- Wexttext exe_path[PATH_MAX_EXTERNAL];
+ Wexttext *exe_path;
Wexttext *w;
const Wexttext *dir, *p;
@@ -2694,13 +2695,17 @@ pdump_load (const Wexttext *argv0)
{
/* invocation-name includes a directory component -- presumably it
is relative to cwd, not $PATH. */
+ exe_path = alloca_array (Wexttext, 1 + wext_strlen (dir) + DUMP_SLACK);
wext_strcpy (exe_path, dir);
}
else
{
const Wexttext *path = wext_getenv ("PATH"); /* not egetenv --
- not yet init. */
+ not yet init. */
const Wexttext *name = p;
+ exe_path = alloca_array (Wexttext,
+ 1 + DUMP_SLACK + max (wext_strlen (name),
+ wext_strlen (path)));
for (;;)
{
p = path;
diff -r 9aa16aa434b6c7378354c60985dc2218ceb60db0 -r 1a14c304cb8ead170dfb5edbbbf341724629f2d1 src/text.h
--- a/src/text.h Tue Jan 08 12:47:42 2008 -0700
+++ b/src/text.h Wed Jan 09 00:28:17 2008 +0100
@@ -2988,7 +2988,6 @@ int wcsncmp_ascii (const wchar_t *s1, co
/* Extra indirection needed in case of manifest constant as arg */
#define WEXTSTRING_1(arg) L##arg
#define WEXTSTRING(arg) WEXTSTRING_1(arg)
-#define MAX_XETCHAR_SIZE sizeof (WCHAR)
#define wext_strlen wcslen
#define wext_strcmp wcscmp
#define wext_strncmp wcsncmp
@@ -3014,7 +3013,6 @@ int XCDECL wext_retry_open (const Wextte
#else
#define WEXTTEXT_ZTERM_SIZE sizeof (char)
#define WEXTSTRING(arg) arg
-#define MAX_XETCHAR_SIZE sizeof (char)
#define wext_strlen strlen
#define wext_strcmp strcmp
#define wext_strncmp strncmp
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Adapt INLINE_HEADER to the C99 inline semantics.
16 years, 11 months
Jerry James
changeset: 4387:9aa16aa434b6c7378354c60985dc2218ceb60db0
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Tue Jan 08 12:47:42 2008 -0700
files: src/ChangeLog src/config.h.in
description:
Adapt INLINE_HEADER to the C99 inline semantics.
2008-01-08 Jerry James <james(a)xemacs.org>
* config.h.in (INLINE_HEADER): adapt to C99 inline semantics.
diff -r 4363b75330cacd4d74c95aa361d90a967a58f0fe -r 9aa16aa434b6c7378354c60985dc2218ceb60db0 src/ChangeLog
--- a/src/ChangeLog Mon Jan 07 12:07:55 2008 -0700
+++ b/src/ChangeLog Tue Jan 08 12:47:42 2008 -0700
@@ -1,3 +1,7 @@ 2008-01-07 Jerry James <james(a)xemacs.o
+2008-01-08 Jerry James <james(a)xemacs.org>
+
+ * config.h.in (INLINE_HEADER): adapt to C99 inline semantics.
+
2008-01-07 Jerry James <james(a)xemacs.org>
* xemacs.def.in.in: Clarify the copyright and license.
diff -r 4363b75330cacd4d74c95aa361d90a967a58f0fe -r 9aa16aa434b6c7378354c60985dc2218ceb60db0 src/config.h.in
--- a/src/config.h.in Mon Jan 07 12:07:55 2008 -0700
+++ b/src/config.h.in Tue Jan 08 12:47:42 2008 -0700
@@ -1086,7 +1086,8 @@ extern "C" {
Use `inline static' to define inline functions in .c files.
See the Internals manual for examples and more information. */
-#if defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs)
+#if __STDC_VERSION__ >= 199901L || defined (__cplusplus) || \
+ ! defined (__GNUC__) || ! defined(emacs)
# define INLINE_HEADER inline static
#elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS)
# define INLINE_HEADER inline
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Clarify the copyright and license of src/xemacs.def.in.in.
16 years, 11 months
Jerry James
changeset: 4386:4363b75330cacd4d74c95aa361d90a967a58f0fe
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Mon Jan 07 12:07:55 2008 -0700
files: src/ChangeLog src/xemacs.def.in.in
description:
Clarify the copyright and license of src/xemacs.def.in.in.
2008-01-07 Jerry James <james(a)xemacs.org>
* xemacs.def.in.in: Clarify the copyright and license.
diff -r 7a8c613ee2836d4803753fca5731d45222a92449 -r 4363b75330cacd4d74c95aa361d90a967a58f0fe src/ChangeLog
--- a/src/ChangeLog Sat Jan 05 16:19:37 2008 +0100
+++ b/src/ChangeLog Mon Jan 07 12:07:55 2008 -0700
@@ -1,3 +1,7 @@ 2008-01-03 Aidan Kehoe <kehoea@parhasa
+2008-01-07 Jerry James <james(a)xemacs.org>
+
+ * xemacs.def.in.in: Clarify the copyright and license.
+
2008-01-03 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fmake_temp_name): Correct the comment to cross
diff -r 7a8c613ee2836d4803753fca5731d45222a92449 -r 4363b75330cacd4d74c95aa361d90a967a58f0fe src/xemacs.def.in.in
--- a/src/xemacs.def.in.in Sat Jan 05 16:19:37 2008 +0100
+++ b/src/xemacs.def.in.in Mon Jan 07 12:07:55 2008 -0700
@@ -1,4 +1,23 @@
-/* Put the usual header here */
+/* The module API: core symbols that are visible to modules.
+ Copyright (C) 2008 Jerry James
+
+This file is part of XEmacs.
+
+XEmacs is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+XEmacs is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
/* The symbol to import/export is on the left. If the symbol is not
meant to be used directly, but a macro or inline function in the
API expands to a form containing the symbol, then the macro or
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Fix confusing and incorrect docstring for regexp-opt
16 years, 11 months
Aidan Kehoe
Yes, my version is a bit long-winded. I think it’s clearer than the old
version, though; in a strict sense the old version was incorrect, too,
because every string that doesn’t use regexp special characters is a regexp.
2008-01-07 Aidan Kehoe <kehoea(a)parhasard.net>
* regexp-opt.el (regexp-opt):
Clarify the treatment of regexp special characters in STRINGS.
XEmacs Packages source patch:
Diff command: cvs -q diff -u
Files affected: xemacs-packages/xemacs-base/regexp-opt.el
===================================================================
RCS
Index: xemacs-packages/xemacs-base/regexp-opt.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/regexp-opt.el,v
retrieving revision 1.3
diff -u -r1.3 regexp-opt.el
--- xemacs-packages/xemacs-base/regexp-opt.el 2003/10/29 16:31:46 1.3
+++ xemacs-packages/xemacs-base/regexp-opt.el 2008/01/07 12:27:44
@@ -94,8 +94,12 @@
;;;###autoload
(defun regexp-opt (strings &optional paren)
"Return a regexp to match a string in STRINGS.
-Each string should be unique in STRINGS and should not contain any regexps,
-quoted or not. If optional PAREN is non-nil, ensure that the returned regexp
+Each string should be unique in STRINGS. Regexp special characters in the
+elements of STRINGS will not be treated as special characters; that is to
+say, `regexp-opt' will call `regexp-quote' on the elements of STRINGS before
+constructing the regexp.
+
+If optional PAREN is non-nil, ensure that the returned regexp
is enclosed by at least one regexp grouping construct.
The returned regexp is typically more efficient than the equivalent regexp:
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, 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
Re: How to suppress environment variable expansion by find-file?
16 years, 11 months
Michael Sperber
"Adrian Aichner" <adrian(a)xemacs.org> writes:
> Right, Skip!
>
> By sheer coincidence I have partially tracked down a variation on the
> theme today.
>
> I access files on administrative shares under windows, or should I
> say, I used to :-)
>
> Paths of the pattern
> \\COMPUTER\DRIVE$\FILE
> trigger the same problem.
>
> I can do dired, using
> \\COMPUTER\DRIVE$$
> which evaluates to
> \\COMPUTER\DRIVE$
> but opening FILE will evaluate C$ once more and fall over.
>
> The difference is that insert-file-contents in 21.5 epands the file
> argument using substitute-in-file-name, which the 21.4 variant did not
> use to.
>
> Michael Sperber should know more about this.
>
> Mike?
Yo. It was me. Sorry. I just copied the call to
`substitute-in-file-name' from somewhere else, and I believe it's just
as incorrect there. So how about this?
2008-01-04 Michael Sperber <mike(a)xemacs.org>
* code-files.el (insert-file-contents):
(load): Don't call `substitute-in-file-name' on the file name.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/lisp/code-files.el b/lisp/code-files.el
--- a/lisp/code-files.el
+++ b/lisp/code-files.el
@@ -235,10 +235,10 @@ object (the entry specified a coding sys
;(defun convert-mbox-coding-system (filename visit start end) ...)
-(defun load (file &optional noerror nomessage nosuffix)
- "Execute a file of Lisp code named FILE, or load a binary module.
-First tries to find a Lisp FILE with .elc appended, then with .el, then with
- FILE unmodified. If unsuccessful, tries to find a binary module FILE with
+(defun load (filename &optional noerror nomessage nosuffix)
+ "Execute a file of Lisp code named FILENAME, or load a binary module.
+First tries to find a Lisp file FILENAME with .elc appended, then with .el, then with
+ FILENAME unmodified. If unsuccessful, tries to find a binary module FILE with
the elements of `module-extensions' appended, one at a time.
Searches directories in load-path for Lisp files, and in `module-load-path'
for binary modules.
@@ -250,9 +250,8 @@ If optional fourth arg NOSUFFIX is non-n
.elc, .el, or elements of `module-extensions' to the specified name FILE.
Return t if file exists."
(declare (special load-modules-quietly))
- (let* ((filename (substitute-in-file-name file))
- (handler (find-file-name-handler filename 'load))
- (path nil))
+ (let ((handler (find-file-name-handler filename 'load))
+ (path nil))
(if handler
(funcall handler 'load filename noerror nomessage nosuffix)
;; First try to load a Lisp file
@@ -262,10 +261,10 @@ Return t if file exists."
'(".elc" ".el" "")))))
;; now use the internal load to actually load the file.
(load-internal
- file noerror nomessage nosuffix
+ filename noerror nomessage nosuffix
(let ((elc ; use string= instead of string-match to keep match-data.
- (equalp ".elc" (substring path -4))))
- (or (and (not elc) coding-system-for-read) ;prefer for source file
+ (equalp ".elc" (substring path -4))))
+ (or (and (not elc) coding-system-for-read) ;prefer for source file
;; find magic-cookie
(let ((codesys
(find-coding-system-magic-cookie-in-file path)))
@@ -401,8 +400,7 @@ See also `insert-file-contents-access-ho
See also `insert-file-contents-access-hook',
`insert-file-contents-pre-hook', `insert-file-contents-error-hook',
and `insert-file-contents-post-hook'."
- (let* ((expanded (substitute-in-file-name filename))
- (handler (find-file-name-handler expanded 'insert-file-contents)))
+ (let ((handler (find-file-name-handler filename 'insert-file-contents)))
(if handler
(funcall handler 'insert-file-contents filename visit start end replace)
(let (return-val coding-system used-codesys)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches