commit: Automated merge with file:/Sources/xemacs-21.5-checked-out
16 years, 11 months
Aidan Kehoe
changeset: 4395:b03b5e362fcff61ac4632834ea16615407c1264b
tag: tip
parent: 4394:cacc942c0d0ff698ddad402df54e0fed35425b09
parent: 4393:f6c39b2d8b6227405501091559be63ca54161c31
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 15 21:35:41 2008 +0100
files:
description:
Automated merge with file:/Sources/xemacs-21.5-checked-out
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/ChangeLog
--- a/lisp/ChangeLog Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/ChangeLog Tue Jan 15 21:35:41 2008 +0100
@@ -1,3 +1,17 @@ 2008-01-04 Michael Sperber <mike@xemac
+2008-01-14 Jerry James <james(a)xemacs.org>
+
+ * font-lock.el (font-lock-add-keywords): Adapt to differences in
+ Emacs and XEmacs compiled font-lock lists.
+ * font-lock.el (font-lock-remove-keywords): Ditto.
+ * font-lock.el (font-lock-set-defaults-1): Make changes specified
+ by font-lock-keywords-alist and font-lock-removed-keywords-alist.
+
+2008-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-output-file-form):
+ Bind print-gensym-alist to nil, as we do within
+ byte-compile-output-docform.
+
2008-01-04 Michael Sperber <mike(a)xemacs.org>
* code-files.el (insert-file-contents):
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/bytecomp.el
--- a/lisp/bytecomp.el Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/bytecomp.el Tue Jan 15 21:35:41 2008 +0100
@@ -1888,7 +1888,8 @@ With argument, insert value in current b
(print-readably t) ; print #[] for bytecode, 'x for (quote x)
(print-gensym (if (and byte-compile-print-gensym
(not byte-compile-emacs19-compatibility))
- '(t) nil)))
+ '(t) nil))
+ print-gensym-alist)
(princ "\n" byte-compile-outbuffer)
(prin1 form byte-compile-outbuffer)
nil)))
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/font-lock.el
--- a/lisp/font-lock.el Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/font-lock.el Tue Jan 15 21:35:41 2008 +0100
@@ -959,7 +959,7 @@ see the variables `c-font-lock-extra-typ
(let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords.
(if was-compiled
- (setq font-lock-keywords (cadr font-lock-keywords)))
+ (setq font-lock-keywords (cdr font-lock-keywords)))
;; Now modify or replace them.
(if (eq how 'set)
(setq font-lock-keywords keywords)
@@ -1069,7 +1069,7 @@ happens, so the major mode can be correc
(let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords.
(if was-compiled
- (setq font-lock-keywords (cadr font-lock-keywords)))
+ (setq font-lock-keywords (cdr font-lock-keywords)))
;; Edit them.
(setq font-lock-keywords (copy-sequence font-lock-keywords))
@@ -2031,7 +2031,10 @@ Each keyword has the form (MATCHER HIGHL
font-lock-defaults
(font-lock-find-font-lock-defaults major-mode)))
(keywords (font-lock-choose-keywords
- (nth 0 defaults) font-lock-maximum-decoration)))
+ (nth 0 defaults) font-lock-maximum-decoration))
+ (local (cdr (assq major-mode font-lock-keywords-alist)))
+ (removed-keywords
+ (cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
;; Keywords?
(setq font-lock-keywords (if (fboundp keywords)
@@ -2096,7 +2099,14 @@ Each keyword has the form (MATCHER HIGHL
;; older way:
;; defaults not specified at all, so use `beginning-of-defun'.
(setq font-lock-beginning-of-syntax-function
- 'beginning-of-defun)))))
+ 'beginning-of-defun)))
+
+ ;; Local fontification?
+ (while local
+ (font-lock-add-keywords nil (car (car local)) (cdr (car local)))
+ (setq local (cdr local)))
+ (when removed-keywords
+ (font-lock-remove-keywords nil removed-keywords))))
(setq font-lock-cache-position (make-marker))
(setq font-lock-defaults-computed t)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Avoid clearing print-gensym-alist inappropriately when printing hash tables.
16 years, 11 months
Aidan Kehoe
changeset: 4394:cacc942c0d0ff698ddad402df54e0fed35425b09
parent: 4391:cbf129b005dff4258c4651fefb80e646940d82f7
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 15 21:35:01 2008 +0100
files: src/ChangeLog src/doprnt.c src/lisp.h src/print.c tests/ChangeLog tests/automated/lisp-tests.el
description:
Avoid clearing print-gensym-alist inappropriately when printing hash tables.
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (thing):
Check that printing a hash table literal doesn't clear
print-gensym-alist.
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* print.c (prin1_to_string): New.
The guts of Fprin1_to_string, without resetting
Vprint_gensym_alist.
(Fprin1_to_string):
Call prin1_to_string, wrapped with RESET_PRINT_GENSYM calls.
* doprnt.c (emacs_doprnt_1):
Call prin1_to_string, not Fprin1_to_string (dos veces). Avoids an
inappropriate reset of print-gensym-alist.
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/ChangeLog
--- a/src/ChangeLog Sat Jan 12 18:04:13 2008 +0100
+++ b/src/ChangeLog Tue Jan 15 21:35:01 2008 +0100
@@ -1,3 +1,14 @@ 2008-01-12 Aidan Kehoe <kehoea@parhasa
+2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * print.c (prin1_to_string): New.
+ The guts of Fprin1_to_string, without resetting
+ Vprint_gensym_alist.
+ (Fprin1_to_string):
+ Call prin1_to_string, wrapped with RESET_PRINT_GENSYM calls.
+ * doprnt.c (emacs_doprnt_1):
+ Call prin1_to_string, not Fprin1_to_string (dos veces). Avoids an
+ inappropriate reset of print-gensym-alist.
+
2008-01-12 Aidan Kehoe <kehoea(a)parhasard.net>
* rangetab.c (Fmap_range_table):
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/doprnt.c
--- a/src/doprnt.c Sat Jan 12 18:04:13 2008 +0100
+++ b/src/doprnt.c Tue Jan 15 21:35:01 2008 +0100
@@ -558,7 +558,7 @@ emacs_doprnt_1 (Lisp_Object stream, cons
{
/* For `S', prin1 the argument and then treat like
a string. */
- ls = Fprin1_to_string (obj, Qnil);
+ ls = prin1_to_string (obj, 0);
}
else if (STRINGP (obj))
ls = obj;
@@ -567,7 +567,7 @@ emacs_doprnt_1 (Lisp_Object stream, cons
else
{
/* convert to string using princ. */
- ls = Fprin1_to_string (obj, Qt);
+ ls = prin1_to_string (obj, 1);
}
string = XSTRING_DATA (ls);
string_len = XSTRING_LENGTH (ls);
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/lisp.h
--- a/src/lisp.h Sat Jan 12 18:04:13 2008 +0100
+++ b/src/lisp.h Tue Jan 15 21:35:01 2008 +0100
@@ -4932,6 +4932,7 @@ EXFUN (Fprinc, 2);
EXFUN (Fprinc, 2);
EXFUN (Fprint, 2);
+Lisp_Object prin1_to_string (Lisp_Object, int);
/* Lower-level ways to output data: */
void default_object_printer (Lisp_Object, Lisp_Object, int);
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/print.c
--- a/src/print.c Sat Jan 12 18:04:13 2008 +0100
+++ b/src/print.c Tue Jan 15 21:35:01 2008 +0100
@@ -867,6 +867,26 @@ Output stream is STREAM, or value of `st
return object;
}
+Lisp_Object
+prin1_to_string (Lisp_Object object, int noescape)
+{
+ /* This function can GC */
+ Lisp_Object result = Qnil;
+ Lisp_Object stream = make_resizing_buffer_output_stream ();
+ Lstream *str = XLSTREAM (stream);
+ /* gcpro OBJECT in case a caller forgot to do so */
+ struct gcpro gcpro1, gcpro2, gcpro3;
+ GCPRO3 (object, stream, result);
+
+ print_internal (object, stream, !noescape);
+ Lstream_flush (str);
+ UNGCPRO;
+ result = make_string (resizing_buffer_stream_ptr (str),
+ Lstream_byte_count (str));
+ Lstream_delete (str);
+ return result;
+}
+
DEFUN ("prin1-to-string", Fprin1_to_string, 1, 2, 0, /*
Return a string containing the printed representation of OBJECT,
any Lisp object. Quoting characters are used when needed to make output
@@ -877,20 +897,11 @@ second argument NOESCAPE is non-nil.
{
/* This function can GC */
Lisp_Object result = Qnil;
- Lisp_Object stream = make_resizing_buffer_output_stream ();
- Lstream *str = XLSTREAM (stream);
- /* gcpro OBJECT in case a caller forgot to do so */
- struct gcpro gcpro1, gcpro2, gcpro3;
- GCPRO3 (object, stream, result);
RESET_PRINT_GENSYM;
- print_internal (object, stream, NILP (noescape));
+ result = prin1_to_string (object, !(EQ(noescape, Qnil)));
RESET_PRINT_GENSYM;
- Lstream_flush (str);
- UNGCPRO;
- result = make_string (resizing_buffer_stream_ptr (str),
- Lstream_byte_count (str));
- Lstream_delete (str);
+
return result;
}
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 tests/ChangeLog
--- a/tests/ChangeLog Sat Jan 12 18:04:13 2008 +0100
+++ b/tests/ChangeLog Tue Jan 15 21:35:01 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-03 Stephen J. Turnbull <stephe
+2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/lisp-tests.el (thing):
+ Check that printing a hash table literal doesn't clear
+ print-gensym-alist.
+
2008-01-03 Stephen J. Turnbull <stephen(a)xemacs.org>
* automated/symbol-tests.el (Symbol documentation): Add tests to
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Sat Jan 12 18:04:13 2008 +0100
+++ b/tests/automated/lisp-tests.el Tue Jan 15 21:35:01 2008 +0100
@@ -1299,3 +1299,17 @@
;; Check all-completions ignore element start with space.
(Assert (not (all-completions "" '((" hidden" . "object")))))
(Assert (all-completions " " '((" hidden" . "object"))))
+
+(let* ((literal-with-uninterned
+ '(first-element
+ [#1=#:G32976 #2=#:G32974 #3=#:G32971 #4=#:G32969 alias
+ #s(hash-table size 256 data (969 ?ù 55 ?7 166 ?¦ ))
+ #5=#:G32970 #6=#:G32972]))
+ (print-readably t)
+ (print-gensym t)
+ (printed-with-uninterned (prin1-to-string literal-with-uninterned))
+ (awkward-regexp "#1=#")
+ (first-match-start (string-match awkward-regexp
+ printed-with-uninterned)))
+ (Assert (null (string-match awkward-regexp printed-with-uninterned
+ (1+ first-match-start)))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: Mule bugs: misidentification (Latin-1 vs. Chinese), revert issues
16 years, 11 months
Michael Sperber
Mats Lidell <matsl(a)xemacs.org> writes:
>>>>>> Michael wrote:
>
> Michael> I touch that file outside of XEmacs and then do M-x
> Michael> revert-buffer RET.
>
> Don't know if this is related but I have this situation in a folder:
> ----------------------------------------------------------------------
> /tmp/TEST:
> totalt 28
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÄÄÄ
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÖÖÖ
> ----------------------------------------------------------------------
>
> Now I open the file 'ÄÄÄ' for editing, (modeline says it i ÄÄÄ) insert
> some chars and save it. This is what I get in dired:
> ----------------------------------------------------------------------
> /tmp/TEST:
> totalt 32
> -rw-r--r-- 1 matsl users 4 23 okt 12.40 ÄÄÄ
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÄÄÄ
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÖÖÖ
> ----------------------------------------------------------------------
>
> In a shell, outside XEmacs, I get:
> ----------------------------------------------------------------------
> spencer:/tmp/TEST% ls -l
> totalt 4
> -rw-r--r-- 1 matsl users 4 23 okt 12.40 ???
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÄÄÄ
> -rw-r--r-- 1 matsl users 0 20 okt 23.28 ÖÖÖ
> ----------------------------------------------------------------------
>
> The file I saved from XEmacs, and is shown as ÄÄÄ in dired is in my
> shell shown as ???. Both XEmacs and the shell uses the same locale
> sv_SE.UTF-8.
>
> If I remove the file ??? in the shell, and update dired, XEmacs is
> smart and gets the names back readable again.
>
> Is this a bug or should it be like this?
I can reproduce the situation on a MULE XEmacs in an UTF-8 locale. (It
also breaks on a non-MULE XEmacs, but in a different way. Fixing it
there is harder.) The reason is that `default-process-coding-system' is
'undecided in the read direction, and UTF-8 fails to get detected. My
suggestion is to align the coding system in `insert-directory' with the
locale's coding system. Works for me.
Maybe the MULE experts could review? I'd appreciate that!
2008-01-13 Michael Sperber <mike(a)xemacs.org>
* files.el (insert-directory): Bind `coding-system-for-read'
according to the current locale where available. (Previously, the
default ended up being undecided, which doesn't work well for
UTF-8-based locales, for example.)
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/lisp/files.el b/lisp/files.el
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4177,6 +4177,12 @@ If WILDCARD, it also runs the shell spec
file switches wildcard full-directory-p)))
(t
(let* ((beg (point))
+ ;; on Unix, assume that ls will output in what the
+ ;; current locale specifies
+ (coding-system-for-read
+ (if (fboundp 'get-coding-system-from-locale)
+ (declare-fboundp (get-coding-system-from-locale (current-locale)))
+ coding-system-from-read))
(result
(if wildcard
;; Run ls in the directory of the file pattern we asked for.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Make font-lock-{add,remove}-keywords actually work.
16 years, 11 months
Jerry James
changeset: 4393:f6c39b2d8b6227405501091559be63ca54161c31
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Mon Jan 14 16:50:32 2008 -0700
files: lisp/ChangeLog lisp/font-lock.el
description:
Make font-lock-{add,remove}-keywords actually work.
2008-01-14 Jerry James <james(a)xemacs.org>
* font-lock.el (font-lock-add-keywords): Adapt to differences in
Emacs and XEmacs compiled font-lock lists.
* font-lock.el (font-lock-remove-keywords): Ditto.
* font-lock.el (font-lock-set-defaults-1): Make changes specified
by font-lock-keywords-alist and font-lock-removed-keywords-alist.
diff -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d -r f6c39b2d8b6227405501091559be63ca54161c31 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Jan 14 15:25:22 2008 +0100
+++ b/lisp/ChangeLog Mon Jan 14 16:50:32 2008 -0700
@@ -1,3 +1,11 @@ 2008-01-14 Aidan Kehoe <kehoea@parhasa
+2008-01-14 Jerry James <james(a)xemacs.org>
+
+ * font-lock.el (font-lock-add-keywords): Adapt to differences in
+ Emacs and XEmacs compiled font-lock lists.
+ * font-lock.el (font-lock-remove-keywords): Ditto.
+ * font-lock.el (font-lock-set-defaults-1): Make changes specified
+ by font-lock-keywords-alist and font-lock-removed-keywords-alist.
+
2008-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-file-form):
diff -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d -r f6c39b2d8b6227405501091559be63ca54161c31 lisp/font-lock.el
--- a/lisp/font-lock.el Mon Jan 14 15:25:22 2008 +0100
+++ b/lisp/font-lock.el Mon Jan 14 16:50:32 2008 -0700
@@ -959,7 +959,7 @@ see the variables `c-font-lock-extra-typ
(let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords.
(if was-compiled
- (setq font-lock-keywords (cadr font-lock-keywords)))
+ (setq font-lock-keywords (cdr font-lock-keywords)))
;; Now modify or replace them.
(if (eq how 'set)
(setq font-lock-keywords keywords)
@@ -1069,7 +1069,7 @@ happens, so the major mode can be correc
(let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords.
(if was-compiled
- (setq font-lock-keywords (cadr font-lock-keywords)))
+ (setq font-lock-keywords (cdr font-lock-keywords)))
;; Edit them.
(setq font-lock-keywords (copy-sequence font-lock-keywords))
@@ -2031,7 +2031,10 @@ Each keyword has the form (MATCHER HIGHL
font-lock-defaults
(font-lock-find-font-lock-defaults major-mode)))
(keywords (font-lock-choose-keywords
- (nth 0 defaults) font-lock-maximum-decoration)))
+ (nth 0 defaults) font-lock-maximum-decoration))
+ (local (cdr (assq major-mode font-lock-keywords-alist)))
+ (removed-keywords
+ (cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
;; Keywords?
(setq font-lock-keywords (if (fboundp keywords)
@@ -2096,7 +2099,14 @@ Each keyword has the form (MATCHER HIGHL
;; older way:
;; defaults not specified at all, so use `beginning-of-defun'.
(setq font-lock-beginning-of-syntax-function
- 'beginning-of-defun)))))
+ 'beginning-of-defun)))
+
+ ;; Local fontification?
+ (while local
+ (font-lock-add-keywords nil (car (car local)) (cdr (car local)))
+ (setq local (cdr local)))
+ (when removed-keywords
+ (font-lock-remove-keywords nil removed-keywords))))
(setq font-lock-cache-position (make-marker))
(setq font-lock-defaults-computed t)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Correct a mapping in latin-ltx.el
16 years, 11 months
Aidan Kehoe
Ideally this should be fixed in GNU Emacs too, which is why I’m cc’ing
bug-gnu-emacs.
APPROVE COMMIT
NOTE: This patch has been committed.
mule-packages/leim/ChangeLog addition:
2008-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* quail/latin-ltx.el ("TeX"):
Correct the mappings for \v{k} and \vk.
XEmacs Packages source patch:
Diff command: cvs -q diff -u
Files affected: mule-packages/leim/quail/latin-ltx.el
===================================================================
RCS
Index: mule-packages/leim/quail/latin-ltx.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/leim/quail/latin-ltx.el,v
retrieving revision 1.1
diff -u -r1.1 latin-ltx.el
--- mule-packages/leim/quail/latin-ltx.el 2006/08/04 19:46:22 1.1
+++ mule-packages/leim/quail/latin-ltx.el 2008/01/14 15:54:04
@@ -269,7 +269,7 @@
("\\v{G}" ?Ǧ) ("\\vG" ?Ǧ)
("\\v{g}" ?ǧ) ("\\vg" ?ǧ)
("\\v{K}" ?Ǩ) ("\\vK" ?Ǩ)
- ("\\v{k}" ?k) ("\\vk" ?k)
+ ("\\v{k}" ?ǩ) ("\\vk" ?ǩ)
("\\v{\\j}" ?ǰ) ("\\vj" ?ǰ)
("\\'{G}" ?Ǵ) ("\\'G" ?Ǵ)
--
¿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: [COMMIT] Keep around gensym correspondence information through entire bytecomp files
16 years, 11 months
Aidan Kehoe
Ar an dara lá de mí na Nollaig, scríobh Stephen J. Turnbull:
> > * bytecomp.el (byte-compile-output-file-form):
> > Bind print-gensym to a cons, to tell the Lisp printer not to clear
> > print-gensym-alist on exit from #'print. This is appropriate
> > because #'byte-compile-output-file-form may be called multiple
> > times for a given output file, and re-using the
> > #1=#:... placeholders in that context is inappropriate.
>
> do you mean "reusing placeholders is APPROPRIATE" here? I think you
> should be a little more explict if not. Do you mean something like
> "continuing to increment the placeholders is appropriate" rather than
> "reusing the placeholders is inappropriate"?
This ChangeLog was unclear and muddled because I was trusting the
implementation of the (eq t print-gensym) behaviour to not be buggy--I
thought the problem was in the byte compiler. That wasn’t it, though; the
behaviour of the Lisp printer when you revert this change and recompile
mule/*.elc is what’s broken. The non-boilerplate code of greek.elc if you do
that looks like this:
(byte-code "[byte codes omitted]" [#1=#:G79030 #2=#:G79075 #3=#:G79053 #4=#:G79031 #5=#:G79029 [lots and lots of constants omitted] #1=#:G79032 upper lower greek latin-1 case-table syntax-table case-fold-search] 12)
This means that somewhere in the guts of the printing of those [lots and
lots of constants], one of the print functions reset print-gensym-alist
where it shouldn’t have. A bit of browsing doesn’t tell me which, but it
should be possible to set a watchpoint on it and work it out. The Cygwin GDB
isn’t being co-operative with me in this right now, though.
We (and GNU) normally don’t see this problem because for defvars, defuns,
defmacros, defconst and autoloads, print-gensym was always bound to a cons,
so the print-gensym-as-t behaviour wasn’t thoroughly tested.
This is actually, slightly to my surprise, independent of the emacs-w3m
problem. The issue with the latter is that readevalloop resets Vread_objects
with each new top level form--see lread.c:1490--so it is impossible to
re-use an uninterned symbol from one call to (byte-code ...) to the next.
One #'custom-declare-variable call using one uninterned symbol followed by
another re-using the same symbol will always break.
> A comment at the point of change would be appropriate, here.
>
> Does this change the behavior of byte-compiled libraries?
--
¿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
commit: bytecomp.el: bind print-gensym-alist to nil even with non-defvar, defun, [...] forms.
16 years, 11 months
Aidan Kehoe
changeset: 4392:e8f448f997ac016c496451fbb54fff6e4b6e4f9d
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Jan 14 15:25:22 2008 +0100
files: lisp/ChangeLog lisp/bytecomp.el
description:
bytecomp.el: bind print-gensym-alist to nil even with non-defvar, defun, [...] forms.
2008-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-file-form):
Bind print-gensym-alist to nil, as we do within
byte-compile-output-docform.
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jan 12 18:04:13 2008 +0100
+++ b/lisp/ChangeLog Mon Jan 14 15:25:22 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-04 Michael Sperber <mike@xemac
+2008-01-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-output-file-form):
+ Bind print-gensym-alist to nil, as we do within
+ byte-compile-output-docform.
+
2008-01-04 Michael Sperber <mike(a)xemacs.org>
* code-files.el (insert-file-contents):
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d lisp/bytecomp.el
--- a/lisp/bytecomp.el Sat Jan 12 18:04:13 2008 +0100
+++ b/lisp/bytecomp.el Mon Jan 14 15:25:22 2008 +0100
@@ -1888,7 +1888,8 @@ With argument, insert value in current b
(print-readably t) ; print #[] for bytecode, 'x for (quote x)
(print-gensym (if (and byte-compile-print-gensym
(not byte-compile-emacs19-compatibility))
- '(t) nil)))
+ '(t) nil))
+ print-gensym-alist)
(princ "\n" byte-compile-outbuffer)
(prin1 form byte-compile-outbuffer)
nil)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[C] Dired 7.16
16 years, 11 months
Michael Sperber
I've just checked in Dired 7.16. Relevant ChangeLog entries:
2008-01-11 Mike Sperber <sperber(a)deinprogramm.de>
* dired.el (dired-mule): Also load dired-mule when (featurep
'file-coding).
2008-01-08 Michael Sperber <sperber(a)deinprogramm.de>
* dired.el (dired-listing-switches): Note that it can contain `h'.
(dired-re-before-filename): Add size suffixes for "ls -h".
(dired-get-file-size): Adjust for above changes.
2008-01-08 Michael Sperber <sperber(a)deinprogramm.de>
* dired-sex.el (dired-parse-ls): Use.
* dired.el (dired-manual-move-to-filename): Use. This avoids a
bug with lines like
"-rw-r--r-- 1 sperber 21 8730 Jan 7 09:25 foo" where
"sperber 21 8730" is recgonized as a date.
* dired.el (dired-re-before-filename): Add.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Fix confusing and incorrect docstring for regexp-opt
16 years, 11 months
Aidan Kehoe
SUPERSEDES 18306.7206.428781.245956(a)parhasard.net
Ar an t-ochtú lá de mí Eanair, scríobh Stephen J. Turnbull:
> APPROVE
>
> but as usual I have my personal preferences. ;-)
>
> Aidan Kehoe writes:
> >
> > 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.
>
> I would write
>
> "Return a regexp which matches exactly those strings in STRINGS.
>
> Each string in STRINGS should be unique. Regexp special characters in
> the elements of STRINGS will not be treated specially in matching;
> they will be escaped as necessary in constructing the regexp."
Okay, done. Thank you.
NOTE: This patch has been committed.
xemacs-packages/xemacs-base/ChangeLog addition:
2008-01-12 Aidan Kehoe <kehoea(a)parhasard.net>
* regexp-opt.el (regexp-opt):
Clarify the treatment of regexp special characters in STRINGS,
taking on board input from Stephen. Thank you Stephen!
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
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.4
diff -u -u -r1.4 regexp-opt.el
--- xemacs-packages/xemacs-base/regexp-opt.el 2008/01/11 23:12:50 1.4
+++ xemacs-packages/xemacs-base/regexp-opt.el 2008/01/12 17:55:30
@@ -88,14 +88,19 @@
;;; Code:
+;; XEmacs; correct the docstring, make it clearer.
;;;###autoload
(defun regexp-opt (strings &optional paren)
- "Return a regexp to match a string in the list 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
-is enclosed by at least one regexp grouping construct.
-The returned regexp is typically more efficient than the equivalent regexp:
+ "Return a regexp which matches exactly those strings in STRINGS.
+Each string in STRINGS should be unique. Regexp special characters in
+the elements of STRINGS will not be treated specially in matching;
+they will be escaped as necessary in 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:
+
(let ((open (if PAREN \"\\\\(\" \"\")) (close (if PAREN \"\\\\)\" \"\")))
(concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close))
@@ -117,7 +122,8 @@
(re (regexp-opt-group sorted-strings open)))
(if words (concat "\\<" re "\\>") re))))
-;; XEmacs; added here. This is in subr.el in GNU.
+;; XEmacs; added here. This is in subr.el in GNU; this implementation is
+;; from their revision 1.541 of 2007-01-04, under GPL 2.
(defun-when-void subregexp-context-p (regexp pos &optional start)
"Return non-nil if POS is in a normal subregexp context in REGEXP.
A subregexp context is one where a sub-regexp can appear.
--
¿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