Hi,
This patch adds support for the non-sequence display tables of XEmacs 21.5,
without any run-time overhead on GNU. A patch that’s equivalent in
functionality for that version has been integrated into the XEmacs package
repository; this conflicts with that, though--sorry Mike!--and is more
compatible with GNU. I’ve tested this (somewhat superficially) with XEmacs
21.5, 21.4 and GNU.
Please advise me if this is the wrong list to submit this to. I have papers
on file with the FSF for Gnus and for GNU Emacs as a whole, so that
shouldn’t be an issue.
Bye,
Aidan
ChangeLog addition:
2008-05-22 Aidan Kehoe <kehoea(a)parhasard.net>
* gnus-util.el (gnus-put-display-table): New.
(gnus-get-display-table): New.
Macros that expand to an #'aset call under GNU, and to a runtime choice
under XEmacs.
* gnus-sum.el (gnus-summary-set-display-table):
Use #'gnus-{put,get}-display-table, gnus-set-display-table for the
display table, instead of #'aset.
* gnus-xmas.el (gnus-xmas-summary-set-display-table):
Use #'gnus-{put,get}-display-table, gnus-set-display-table for the
display table.
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.226
diff -u -r7.226 gnus-sum.el
--- lisp/gnus-sum.el 19 May 2008 08:47:42 -0000 7.226
+++ lisp/gnus-sum.el 21 May 2008 22:54:32 -0000
@@ -3417,13 +3417,13 @@
(i 32))
;; Nix out all the control chars...
(while (>= (setq i (1- i)) 0)
- (aset table i [??]))
+ (gnus-put-display-table i [??] table))
;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
- (aset table ?\n nil)
- (aset table ?\r nil)
+ (gnus-put-display-table ?\n nil table)
+ (gnus-put-display-table ?\r nil table)
;; We keep TAB as well.
- (aset table ?\t nil)
+ (gnus-put-display-table ?\t nil table)
;; We nix out any glyphs 127 through 255, or 127 through 159 in
;; Emacs 23 (unicode), that are not set already.
(let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
@@ -3431,8 +3431,8 @@
256)))
(while (>= (setq i (1- i)) 127)
;; Only modify if the entry is nil.
- (unless (aref table i)
- (aset table i [??]))))
+ (unless (get-display-table i table)
+ (put-display-table i [??] table))))
(setq buffer-display-table table)))
(defun gnus-summary-set-article-display-arrow (pos)
Index: lisp/gnus-util.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-util.el,v
retrieving revision 7.80
diff -u -r7.80 gnus-util.el
--- lisp/gnus-util.el 19 May 2008 08:47:42 -0000 7.80
+++ lisp/gnus-util.el 21 May 2008 22:54:32 -0000
@@ -1798,6 +1798,27 @@
;; that intends to handle the quit signal next time.
(eval '(ignore nil))))))
+(defmacro gnus-put-display-table (range value display-table)
+ "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
+ (if (featurep 'xemacs)
+ (progn
+ `(if (fboundp 'put-display-table)
+ (put-display-table ,range ,value ,display-table)
+ (if (sequencep ,display-table)
+ (aset ,display-table ,range ,value)
+ (put-char-table ,range ,value ,display-table))))
+ `(aset ,display-table ,range ,value)))
+
+(defmacro gnus-get-display-table (character display-table)
+ "Find value for CHARACTER in DISPLAY-TABLE. "
+ (if (featurep 'xemacs)
+ `(if (fboundp 'get-display-table)
+ (get-display-table ,character ,display-table)
+ (if (sequencep ,display-table)
+ (aref ,display-table ,character)
+ (get-char-table ,character ,display-table)))
+ `(aref ,display-table ,char-table)))
+
(provide 'gnus-util)
;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
Index: lisp/gnus-xmas.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-xmas.el,v
retrieving revision 7.25
diff -u -r7.25 gnus-xmas.el
--- lisp/gnus-xmas.el 10 Mar 2008 00:53:11 -0000 7.25
+++ lisp/gnus-xmas.el 21 May 2008 22:54:32 -0000
@@ -39,6 +39,7 @@
(defvar menu-bar-mode (featurep 'menubar))
(require 'messagexmas)
(require 'wid-edit)
+(require 'gnus-util)
(defgroup gnus-xmas nil
"XEmacsoid support for Gnus"
@@ -173,18 +174,18 @@
(i 32))
;; Nix out all the control chars...
(while (>= (setq i (1- i)) 0)
- (aset table i [??]))
+ (gnus-put-display-table i [??] table))
;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
- (aset table ?\n nil)
- (aset table ?\r nil)
+ (gnus-put-display-table ?\n nil table)
+ (gnus-put-display-table ?\r nil table)
;; We keep TAB as well.
- (aset table ?\t nil)
+ (gnus-put-display-table ?\t nil table)
;; We nix out any glyphs over 126 below ctl-arrow.
(let ((i (if (integerp ctl-arrow) ctl-arrow 160)))
(while (>= (setq i (1- i)) 127)
- (unless (aref table i)
- (aset table i [??]))))
+ (unless (gnus-get-display-table i table)
+ (gnus-put-display-table i [??] table))))
;; Can't use `set-specifier' because of a bug in 19.14 and earlier
(add-spec-to-specifier current-display-table table (current-buffer) nil)))
--
¿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
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1211381714 -7200
# Node ID 71ed788e426a73ebf645b5e1b3f747a76c21f5f9
# Parent 2805dd83a47588e02914012aa1154264f9b2b5f7
Document Win32 symlink behaviour; adjust tests to take it into a/c.
src/ChangeLog addition:
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fmake_symbolic_link):
Document behaviour when the underlying OS doesn't support symbolic
links.
tests/ChangeLog addition:
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el (featurep):
Make sure that working symlinks are available before testing
their functionality.
Also, don't bomb out on deleting the other temporary files if
deleting the first threw an error.
diff -r 2805dd83a475 -r 71ed788e426a src/ChangeLog
--- a/src/ChangeLog Wed May 21 15:40:06 2008 +0200
+++ b/src/ChangeLog Wed May 21 16:55:14 2008 +0200
@@ -1,3 +1,9 @@ 2008-05-13 Aidan Kehoe <kehoea@parhasa
+2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (Fmake_symbolic_link):
+ Document behaviour when the underlying OS doesn't support symbolic
+ links.
+
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
diff -r 2805dd83a475 -r 71ed788e426a src/fileio.c
--- a/src/fileio.c Wed May 21 15:40:06 2008 +0200
+++ b/src/fileio.c Wed May 21 16:55:14 2008 +0200
@@ -2199,6 +2199,10 @@ unless optional third argument OK-IF-ALR
unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
A number as third arg means request confirmation if LINKNAME already exists.
This happens for interactive use with M-x.
+
+On platforms where symbolic links are not available, any file handlers will
+be run, but the check for the existence of LINKNAME will not be done, and
+the symbolic link will not be created.
*/
(filename, linkname, ok_if_already_exists))
{
diff -r 2805dd83a475 -r 71ed788e426a tests/ChangeLog
--- a/tests/ChangeLog Wed May 21 15:40:06 2008 +0200
+++ b/tests/ChangeLog Wed May 21 16:55:14 2008 +0200
@@ -1,3 +1,11 @@ 2008-02-14 Aidan Kehoe <kehoea@parhasa
+2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el (featurep):
+ Make sure that working symlinks are available before testing
+ their functionality.
+ Also, don't bomb out on deleting the other temporary files if
+ deleting the first threw an error.
+
2008-02-14 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/case-tests.el (let):
diff -r 2805dd83a475 -r 71ed788e426a tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Wed May 21 15:40:06 2008 +0200
+++ b/tests/automated/mule-tests.el Wed May 21 16:55:14 2008 +0200
@@ -372,19 +372,32 @@ This is a naive implementation in Lisp.
;; used scaron as the Latin-2 character, and make-temp-name errored
;; on OS X. LATIN CAPITAL LETTER D WITH STROKE does not decompose.
(name1 (make-temp-name prefix))
- (name2 (make-temp-name prefix)))
- ;; This is how you suppress output from `message', called by `write-region'
+ (name2 (make-temp-name prefix))
+ (name3 (make-temp-name prefix))
+ working-symlinks)
(Assert (not (equal name1 name2)))
(Assert (not (file-exists-p name1)))
+ ;; This is how you suppress output from `message', called by `write-region'
(Silence-Message
(write-region (point-min) (point-max) name1))
(Assert (file-exists-p name1))
- (when (fboundp 'make-symbolic-link)
+ (Silence-Message
+ (write-region (point-min) (point-max) name3))
+ (Assert (file-exists-p name3))
+ (condition-case nil
+ (make-symbolic-link name1 name3)
+ (file-already-exists
+ ;; If we actually have functioning symlinks, we end up here, since
+ ;; name3 already exists and OK-IF-ALREADY-EXISTS was not specified.
+ (setq working-symlinks t)))
+ (when working-symlinks
(make-symbolic-link name1 name2)
(Assert (file-exists-p name2))
(Assert (equal (file-truename name2) name1))
(Assert (equal (file-truename name1) name1)))
- (ignore-file-errors (delete-file name1) (delete-file name2)))
+ (ignore-file-errors (delete-file name1))
+ (ignore-file-errors (delete-file name2))
+ (ignore-file-errors (delete-file name3)))
;; Add many more file operation tests here...
--
¿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
changeset: 4466:969a957a44ac299b06666f55479fe459c0588d9f
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed May 21 21:07:26 2008 +0200
files: man/ChangeLog man/internals/internals.texi
description:
Prevent #'batch-texinfo-format choking on man/internals/internals.texi
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* internals/internals.texi (Ben's README):
Add a couple of @itemize / @end itemize pairs, to prevent
#'batch-texinfo-format choking on the input.
diff -r 732b87cfabf21f6d1bad716db6ea58624f8f556e -r 969a957a44ac299b06666f55479fe459c0588d9f man/ChangeLog
--- a/man/ChangeLog Wed May 21 16:55:14 2008 +0200
+++ b/man/ChangeLog Wed May 21 21:07:26 2008 +0200
@@ -1,3 +1,9 @@ 2008-01-20 Aidan Kehoe <kehoea@parhasa
+2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * internals/internals.texi (Ben's README):
+ Add a couple of @itemize / @end itemize pairs, to prevent
+ #'batch-texinfo-format choking on the input.
+
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* xemacs/cmdargs.texi (Command Switches):
diff -r 732b87cfabf21f6d1bad716db6ea58624f8f556e -r 969a957a44ac299b06666f55479fe459c0588d9f man/internals/internals.texi
--- a/man/internals/internals.texi Wed May 21 16:55:14 2008 +0200
+++ b/man/internals/internals.texi Wed May 21 21:07:26 2008 +0200
@@ -16767,6 +16767,7 @@ reading and writing Unicode files. mult
systems:
@enumerate
+ @itemize
@item
they would be character->character and operate next to the
internal data; this means that coding systems need to be able
@@ -16803,6 +16804,7 @@ reading and writing Unicode files. mult
important: we need a way of specifying how detecting works
when we have more than one coding system. we might need more
than a single priority list. need to think about this.
+ @end itemize
@end enumerate
@item
@@ -16821,6 +16823,7 @@ reading and writing Unicode files. mult
text when it's written out. We need two levels
@enumerate
+ @itemize
@item
first, a "safe-charset" level that checks before any actual
encoding to see if all characters in the document can safely
@@ -16852,6 +16855,7 @@ reading and writing Unicode files. mult
@item
same thing (error checking, list of alternatives, etc.) needs
to happen when reading! all of this will be a lot of work!
+ @end itemize
@end enumerate
@end itemize
@end itemize
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
changeset: 4465:732b87cfabf21f6d1bad716db6ea58624f8f556e
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed May 21 16:55:14 2008 +0200
files: src/ChangeLog src/fileio.c tests/ChangeLog tests/automated/mule-tests.el
description:
Document Win32 symlink behaviour; adjust tests to take it into a/c.
src/ChangeLog addition:
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fmake_symbolic_link):
Document behaviour when the underlying OS doesn't support symbolic
links.
tests/ChangeLog addition:
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el (featurep):
Make sure that working symlinks are available before testing
their functionality.
Also, don't bomb out on deleting the other temporary files if
deleting the first threw an error.
diff -r 61aff09a758969c7690c17763a5f4fb9e6594662 -r 732b87cfabf21f6d1bad716db6ea58624f8f556e src/ChangeLog
--- a/src/ChangeLog Thu May 15 07:46:41 2008 -0400
+++ b/src/ChangeLog Wed May 21 16:55:14 2008 +0200
@@ -1,3 +1,9 @@ 2008-05-13 Aidan Kehoe <kehoea@parhasa
+2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (Fmake_symbolic_link):
+ Document behaviour when the underlying OS doesn't support symbolic
+ links.
+
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
diff -r 61aff09a758969c7690c17763a5f4fb9e6594662 -r 732b87cfabf21f6d1bad716db6ea58624f8f556e src/fileio.c
--- a/src/fileio.c Thu May 15 07:46:41 2008 -0400
+++ b/src/fileio.c Wed May 21 16:55:14 2008 +0200
@@ -2199,6 +2199,10 @@ unless optional third argument OK-IF-ALR
unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
A number as third arg means request confirmation if LINKNAME already exists.
This happens for interactive use with M-x.
+
+On platforms where symbolic links are not available, any file handlers will
+be run, but the check for the existence of LINKNAME will not be done, and
+the symbolic link will not be created.
*/
(filename, linkname, ok_if_already_exists))
{
diff -r 61aff09a758969c7690c17763a5f4fb9e6594662 -r 732b87cfabf21f6d1bad716db6ea58624f8f556e tests/ChangeLog
--- a/tests/ChangeLog Thu May 15 07:46:41 2008 -0400
+++ b/tests/ChangeLog Wed May 21 16:55:14 2008 +0200
@@ -1,3 +1,11 @@ 2008-02-14 Aidan Kehoe <kehoea@parhasa
+2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el (featurep):
+ Make sure that working symlinks are available before testing
+ their functionality.
+ Also, don't bomb out on deleting the other temporary files if
+ deleting the first threw an error.
+
2008-02-14 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/case-tests.el (let):
diff -r 61aff09a758969c7690c17763a5f4fb9e6594662 -r 732b87cfabf21f6d1bad716db6ea58624f8f556e tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Thu May 15 07:46:41 2008 -0400
+++ b/tests/automated/mule-tests.el Wed May 21 16:55:14 2008 +0200
@@ -372,19 +372,32 @@ This is a naive implementation in Lisp.
;; used scaron as the Latin-2 character, and make-temp-name errored
;; on OS X. LATIN CAPITAL LETTER D WITH STROKE does not decompose.
(name1 (make-temp-name prefix))
- (name2 (make-temp-name prefix)))
- ;; This is how you suppress output from `message', called by `write-region'
+ (name2 (make-temp-name prefix))
+ (name3 (make-temp-name prefix))
+ working-symlinks)
(Assert (not (equal name1 name2)))
(Assert (not (file-exists-p name1)))
+ ;; This is how you suppress output from `message', called by `write-region'
(Silence-Message
(write-region (point-min) (point-max) name1))
(Assert (file-exists-p name1))
- (when (fboundp 'make-symbolic-link)
+ (Silence-Message
+ (write-region (point-min) (point-max) name3))
+ (Assert (file-exists-p name3))
+ (condition-case nil
+ (make-symbolic-link name1 name3)
+ (file-already-exists
+ ;; If we actually have functioning symlinks, we end up here, since
+ ;; name3 already exists and OK-IF-ALREADY-EXISTS was not specified.
+ (setq working-symlinks t)))
+ (when working-symlinks
(make-symbolic-link name1 name2)
(Assert (file-exists-p name2))
(Assert (equal (file-truename name2) name1))
(Assert (equal (file-truename name1) name1)))
- (ignore-file-errors (delete-file name1) (delete-file name2)))
+ (ignore-file-errors (delete-file name1))
+ (ignore-file-errors (delete-file name2))
+ (ignore-file-errors (delete-file name3)))
;; Add many more file operation tests here...
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Reiner Steib writes:
> On Mon, May 19 2008, Mats Lidell wrote:
>
> > Took a glance at it during the weekend and found that the latest and
> > greatest of cua.el is in Emacs 22 with C-code level support and
> > all.
>
> The latest is in the Emacs CVS trunk (aka Emacs 23), I'd say.
Kim Storm has been pretty inactive; unless there are
Unicode-branch-related changes, it's likely they are essentially the
same.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
On Mon, May 19 2008, Mats Lidell wrote:
> Took a glance at it during the weekend and found that the latest and
> greatest of cua.el is in Emacs 22 with C-code level support and
> all.
The latest is in the Emacs CVS trunk (aka Emacs 23), I'd say.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Robert wrote:
Robert> No, the installer should ask the user if he wants to activate
Robert> these 'spiffy windows adoptions'.
Robert> Putting them in by default will just annoy people like me who
Robert> prefer the XEmacs bindings (I know, I can edit init.el, but I
Robert> don't want anything touching that file *at all*).
Well it hasn't have to be done by default. At initial startup the user
could be queried.
Maybe it should be like this. If you run the installer the appropriate
setup is performed at install-time for that user. For a new user on
the machine the same setup is performed but at initial activation.
I think of what you get when XEmacs sees your old .emacs-file and
suggests migrating it to the .xemacs-structure. You could in a similar
fashion ask the user if he wants a windows setup.
Yours
--
%% Mats
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Robert Pluim writes:
> Putting them in by default will just annoy people like me who prefer the
> XEmacs bindings (I know, I can edit init.el, but I don't want anything
> touching that file *at all*).
About the letter of what you've written, I think about ten people will
veto any attempt to write anything into init.el or custom.el.
Regarding the spirit, wasn't it Mark Twain who said, "Always do right,
it will gratify some people and astonish the rest"? I see a half-
baked parallel to "Fix the defaults, it will cause your application to
be unnoticed by most people and annoy the rest".
The thing is, if we do this dastardly deed, you and Aidan (I'm
thinking of his autodetect mixed-mode use suggestion) will have to fix
your configurations once (and to the extent it's ./configure-time
stuff you might have to write a script or .BAT file). If we don't do
it, real Windows and Mac users that (in theory) we could attract to
XEmacs just plain won't ever warm up to XEmacs. I kinda think that
latter is more important.
What we really need to keep the burden on you bearable is a way to
create custom themes that would reset everything to the old defaults.
This could be based on a per-defcustom :default-changed-version
keyword, a per-defcustom :previous-defaults-alist keyword, and a user
variable `user-defaults-version'. Then when you upgrade, you are
presented with a notification that your user-defaults-version is older
than the current one, and that defaults have changed. You'd get three
options: accept all new defaults (do nothing), customize changed
(which would give a customize-group-like list of all the defcustoms
whose defaults have changed since your user-defaults-version), or keep
old defaults (in which case XEmacs would automatically customize those
variables whose defaults have changed to the most recent default prior
to your user-defaults-version in the :previous-defaults-alist).
WDOT?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches