commit: Correct an ancient typo workaround, thank you Julian Bradfield!
15 years, 4 months
Aidan Kehoe
changeset: 4675:9a1a59b4b75d
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Aug 14 19:14:51 2009 +0100
files: lisp/ChangeLog lisp/minibuf.el
description:
Correct an ancient typo workaround, thank you Julian Bradfield!
lisp/ChangeLog addition:
2009-08-14 Aidan Kehoe <kehoea(a)parhasard.net>
* minibuf.el (read-from-minibuffer):
Use buffer (format " *Minibuf-%d*" (minibuffer-depth)), regardless
of depth.
diff -r e95ddfd6a409 -r 9a1a59b4b75d lisp/ChangeLog
--- a/lisp/ChangeLog Mon Aug 03 10:30:47 2009 +0200
+++ b/lisp/ChangeLog Fri Aug 14 19:14:51 2009 +0100
@@ -1,3 +1,9 @@
+2009-08-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * minibuf.el (read-from-minibuffer):
+ Use buffer (format " *Minibuf-%d*" (minibuffer-depth)), regardless
+ of depth.
+
2009-08-10 Aidan Kehoe <kehoea(a)parhasard.net>
* help.el (function-arglist, function-documentation):
diff -r e95ddfd6a409 -r 9a1a59b4b75d lisp/minibuf.el
--- a/lisp/minibuf.el Mon Aug 03 10:30:47 2009 +0200
+++ b/lisp/minibuf.el Fri Aug 14 19:14:51 2009 +0100
@@ -405,10 +405,8 @@
(owindow (selected-window))
(oframe (selected-frame))
(window (minibuffer-window))
- (buffer (if (eq (minibuffer-depth) 0)
- (window-buffer window)
- (get-buffer-create (format " *Minibuf-%d"
- (minibuffer-depth)))))
+ (buffer (get-buffer-create (format " *Minibuf-%d*"
+ (minibuffer-depth))))
(frame (window-frame window))
(mconfig (if (eq frame (selected-frame))
nil (current-window-configuration frame)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] mule-packages/lisp/leim/quail.el, Julian Bradfield
15 years, 4 months
Aidan Kehoe
Ar an ceathrú lá déag de mí Lúnasa, scríobh Julian Bradfield:
> This patch translates an unnoticed FSF-ism to XEmacs.
> This is partly responsible for the failure of quail to work in the
> minibuffer.
APPROVE COMMIT
NOTE: This patch has been committed.
mule-packages/leim/ChangeLog addition:
2009-08-14 Aidan Kehoe <kehoea(a)parhasard.net>
* quail.el (quail-show-guidance-buf):
Use #'frame-lowest-window, not #'window-at, when working out what
the lowest window is. Thank you Julian Bradfield!
[...]
--
¿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
Re: [PATCH] Transform #'values calls to #'list calls under 21.4, ilisp-snd.el
15 years, 4 months
Aidan Kehoe
Ar an ceathrú lá déag de mí Lúnasa, scríobh Stephen J. Turnbull:
> > > Doing this with an eval-when-compile is kind of evil, since it makes
> > > the semantics of compiled code different from interpreted code.
> >
> > Hmm? Not in a significant way;
>
> Eh? Interpreted code *won't work correctly in 21.5* as I understand
> it. No? Or is that only in the case of the "needed patches" you
> refer to above?
1) Interpreted code that uses the multiple-values functions consistently
will continue to work in as far as it ever did in 21.4, and will work
correctly in 21.5-with-multiple-values.
2) Code compiled by 21.4, that uses the multiple-values functions, and
without patch http://mid.gmane.org/19070.60359.500812.167386@parhasard.net,
will have subtle problems when run in 21.5 with the multiple-values patch.
This is because it assumes that #'values is an alias for #'list, and that
#'values-list is an alias for #'identity, and that these aliases are
available at runtime. Most of the package changes just remove the third
assumption, and the forms that deal with multiple values (the expansion of
#'multiple-value-bind, most relevantly) continue to get presented with
lists.
3) Code compiled by 21.4 and executed by it, that uses the multiple-values
functions, will work correctly in as far as it ever did.
4) Code compiled by 21.5-with-multiple-values and executed by it, that uses
the multiple-values functions, will work correctly.
5) Code compiled by 21.5-with-multiple-values and executed by 21.4, that uses
the multiple-values functions, will throw an error at the start of the file.
6) Code compiled by 21.5-without-multiple-values, that uses the
multiple-values functions, will work as far as it ever did.
(Also, by “telling people” I meant telling the beta testers encountering the
subtle problems in 2) how to address them, not talking with Vin or Norbert.)
--
¿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
Re: [PATCH] Transform #'values calls to #'list calls under 21.4, ilisp-snd.el
15 years, 4 months
Aidan Kehoe
Ar an ceathrú lá déag de mí Lúnasa, scríobh Stephen J. Turnbull:
> Aidan Kehoe writes:
>
> > 2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
> >
> > * ilisp-snd.el:
> > Transform #'values calls to #'list calls at compile time if the
> > current XEmacs doesn't support true multiple values.
>
> Wouldn't it be better to do this in the 21.4 byte-compiler? (I'm
> referring to the whole sequence of package patches.)
Right, that’s what
http://mid.gmane.org/19070.60359.500812.167386@parhasard.net does.
However, Norbert’s quicker about making modified packages available than Vin
is about making modified 21.4 versions available (something which is as it
should be), and I’m more comfortable telling people who encounter the
incompatibility to install a package from the beta/experimental directory
than to wait until there’s a 21.4 release and there are new .tar.gz files
for all the affected packages.
Some of the package patches are distinct, though. They are examples where
multiple-value-bind was never conceptually correct (that is, there wasn’t a
corresponding #'values call, just one to #'list or something analogous), and
#'destructuring-bind or a non-erroring analogue is better code in those
contexts.
> The only code we really care about here, I think, is the code we put into
> the packages. Users who want to share across versions will just have to
> upgrade their 21.4.
That reminds me; the multiple-values patch makes #'throw into a special
form, since it needs to examine its arguments into a way that functions
don’t (#'throw is also a special form, sorry, special operator in Common
Lisp, for the same reason.) It also has a special bytecode for throw. Now,
code compiled by 21.5 with the multiple-values patch that uses the
multiple-values functionality will refuse to run on 21.4; which is fair
enough, as far as I can see. Code that uses #'throw (that is, most code), is
also affected, though there is a separate check at the beginning of every
file; I wonder is it reasonable to add a minimal patch to 21.4 to support
the throw bytecode.
> Doing this with an eval-when-compile is kind of evil, since it makes
> the semantics of compiled code different from interpreted code.
Hmm? Not in a significant way; it’s just that the alias now takes effect at
compile time, not runtime, something we know worked fine in 21.5 for years.
--
¿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
[PATCH] Transform #'values calls to #'list calls under 21.4, ilisp-snd.el
15 years, 4 months
Aidan Kehoe
xemacs-packages/ilisp/ChangeLog addition:
2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
* ilisp-snd.el:
Transform #'values calls to #'list calls at compile time if the
current XEmacs doesn't support true multiple values.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/ilisp/ilisp-snd.el
Index: xemacs-packages/ilisp/ilisp-snd.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ilisp/ilisp-snd.el,v
retrieving revision 1.5
diff -u -r1.5 ilisp-snd.el
--- xemacs-packages/ilisp/ilisp-snd.el 2002/06/03 23:37:03 1.5
+++ xemacs-packages/ilisp/ilisp-snd.el 2009/08/13 15:25:36
@@ -19,6 +19,12 @@
;;;
;;; 19990824 Marco Antoniotti
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values:
+(eval-when-compile (when (eq 'list (symbol-function 'values))
+ (define-compiler-macro values (&rest args)
+ `(list ,@args))))
+
(defvar *ILISP-default-package* "COMMON-LISP-USER")
(defun ilisp-add-set-package-hook () ; Was: add-set-package-hook
--
¿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
[PATCH] Don't call #'values from compiled code under 21.4, MH-E
15 years, 4 months
Aidan Kehoe
Hi Mike,
I need this for a C patch I intend to commit soon; see
http://mid.gmane.org/19073.42189.496305.702986@parhasard.net .
Best,
Aidan
xemacs-packages/mh-e/ChangeLog addition:
2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
* mh-e.el:
* mh-index.el:
* mh-seq.el:
Have compiled 21.4 code also work on XEmacs binaries with real
support for multiple values, by avoiding runtime calls to
#'values:
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/mh-e/mh-seq.el xemacs-packages/mh-e/mh-index.el xemacs-packages/mh-e/mh-e.el
Index: xemacs-packages/mh-e/mh-e.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mh-e/mh-e.el,v
retrieving revision 1.7
diff -u -r1.7 mh-e.el
--- xemacs-packages/mh-e/mh-e.el 2003/09/02 23:39:26 1.7
+++ xemacs-packages/mh-e/mh-e.el 2009/08/13 16:40:11
@@ -99,6 +99,12 @@
(if mh-xemacs-flag
(require 'mh-xemacs-compat))
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values:
+(eval-when-compile (when (eq 'list (symbol-function 'values))
+ (define-compiler-macro values (&rest args)
+ `(list ,@args))))
+
;; Shush the byte-compiler
(defvar font-lock-auto-fontify)
(defvar font-lock-defaults)
Index: xemacs-packages/mh-e/mh-index.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mh-e/mh-index.el,v
retrieving revision 1.5
diff -u -r1.5 mh-index.el
--- xemacs-packages/mh-e/mh-index.el 2003/09/02 23:39:26 1.5
+++ xemacs-packages/mh-e/mh-index.el 2009/08/13 16:40:12
@@ -53,6 +53,12 @@
(autoload 'widget-convert-button "wid-edit")
(autoload 'executable-find "executable")
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values:
+(eval-when-compile (when (eq 'list (symbol-function 'values))
+ (define-compiler-macro values (&rest args)
+ `(list ,@args))))
+
;; Support different indexing programs
(defvar mh-indexer-choices
'((swish++
Index: xemacs-packages/mh-e/mh-seq.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mh-e/mh-seq.el,v
retrieving revision 1.6
diff -u -r1.6 mh-seq.el
--- xemacs-packages/mh-e/mh-seq.el 2003/09/02 23:39:26 1.6
+++ xemacs-packages/mh-e/mh-seq.el 2009/08/13 16:40:12
@@ -73,6 +73,12 @@
(require 'cl)
(require 'mh-e)
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values:
+(eval-when-compile (when (eq 'list (symbol-function 'values))
+ (define-compiler-macro values (&rest args)
+ `(list ,@args))))
+
;; Shush the byte-compiler
(defvar tool-bar-mode)
--
¿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
[PATCH] Don't call #'values-list from compiled code calls under 21.4, XWEM
15 years, 4 months
Aidan Kehoe
Hi Zajcev,
I intend to commit some changes to 21.5 soon that won’t work without this
change. As a bonus, the bytecode is slightly nicer under SXEmacs and XEmacs
21.4:-) .
Bye,
Aidan
xemacs-packages/xwem/ChangeLog addition:
2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
* lisp/xwem-battery.el:
* lisp/xwem-clients.el:
Don't call values-list from compiled code if compiling without
C-level multiple value support, avoiding problems when such
compiled code is called in an XEmacs with C-level multiple value
support.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/xwem/lisp/xwem-clients.el xemacs-packages/xwem/lisp/xwem-battery.el
Index: xemacs-packages/xwem/lisp/xwem-battery.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xwem/lisp/xwem-battery.el,v
retrieving revision 1.2
diff -u -r1.2 xwem-battery.el
--- xemacs-packages/xwem/lisp/xwem-battery.el 2005/04/04 19:54:10 1.2
+++ xemacs-packages/xwem/lisp/xwem-battery.el 2009/08/13 16:34:15
@@ -64,6 +64,11 @@
(require 'xwem-load)
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values-list:
+(eval-when-compile (when (eq 'identity (symbol-function 'values-list))
+ (define-compiler-macro values-list (arg) arg)))
+
;;; Customisation
(defgroup xwem-batt nil
"Group to customise APM battery monitor."
Index: xemacs-packages/xwem/lisp/xwem-clients.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xwem/lisp/xwem-clients.el,v
retrieving revision 1.15
diff -u -r1.15 xwem-clients.el
--- xemacs-packages/xwem/lisp/xwem-clients.el 2005/04/04 19:54:10 1.15
+++ xemacs-packages/xwem/lisp/xwem-clients.el 2009/08/13 16:34:16
@@ -97,6 +97,11 @@
(defvar xwem-frame-ev-mask)
)
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values-list:
+(eval-when-compile (when (eq 'identity (symbol-function 'values-list))
+ (define-compiler-macro values-list (arg) arg)))
+
(require 'xwem-load)
(require 'xwem-manage)
(require 'xwem-misc)
--
¿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
[PATCH] Don't use #'multiple-value-bind on lists, mmm-mode.elc
15 years, 4 months
Aidan Kehoe
Hi Marcus,
This is necessary for mmm-mode to work in XEmacs with C-level multiple-value
support, something I hope to commit soon. See
http://mid.gmane.org/19073.42189.496305.702986@parhasard.net .
Best,
Aidan
xemacs-packages/mmm-mode/ChangeLog addition:
2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
* mmm-cmds.el:
* mmm-cmds.el (mmm-destructuring-bind): New.
Macro that corresponds to `destructuring-bind', but that does not
error if the structures do not match.
* mmm-cmds.el (mmm-insert-by-key):
Use it, instead of `multiple-value-bind', to avoid unwanted
interactions with actual working multiple-value implementations.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/mmm-mode/mmm-cmds.el
Index: xemacs-packages/mmm-mode/mmm-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mmm-mode/mmm-cmds.el,v
retrieving revision 1.3
diff -u -r1.3 mmm-cmds.el
--- xemacs-packages/mmm-mode/mmm-cmds.el 2008/12/22 14:02:24 1.3
+++ xemacs-packages/mmm-mode/mmm-cmds.el 2009/08/13 16:25:57
@@ -42,6 +42,10 @@
"Execute `body'."
`(progn ,@body))))
+(defmacro mmm-destructuring-bind (args expr &rest body)
+ "Like `destructuring-bind', but don't error if ARGS don't fit EXPR."
+ `(loop for ,args = ,expr return (progn ,@body)))
+
;; APPLYING CLASSES
;;{{{ Applying Predefined Classes
@@ -272,7 +276,7 @@
symbols such as shift, control, etc. and BASIC-KEY is a character code
or a symbol such as tab, return, etc. Note that if there are no
MODIFIERS, the dotted list becomes simply BASIC-KEY."
- (multiple-value-bind (class skel str) (mmm-get-insertion-spec key)
+ (mmm-destructuring-bind (class skel str) (mmm-get-insertion-spec key)
(when skel
(let ((after-change-functions nil)
(old-undo buffer-undo-list) undo)
@@ -280,7 +284,7 @@
;; have to do it.
(if mmm-xemacs (setq skeleton-positions nil))
(skeleton-proxy-new skel str arg)
- (destructuring-bind (back end beg front) skeleton-positions
+ (mmm-destructuring-bind (back end beg front) skeleton-positions
;; TODO: Find a way to trap invalid-parent signals from
;; make-region and undo the skeleton insertion.
(let ((match-submode (plist-get class :match-submode))
--
¿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] Transform #'values calls to #'list calls under 21.4, overlay.el
15 years, 4 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
xemacs-packages/fsf-compat/ChangeLog addition:
2009-08-13 Aidan Kehoe <kehoea(a)parhasard.net>
* overlay.el:
Transform #'values calls to #'list calls under 21.4, overlay.el
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/fsf-compat/overlay.el
Index: xemacs-packages/fsf-compat/overlay.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/fsf-compat/overlay.el,v
retrieving revision 1.4
diff -u -r1.4 overlay.el
--- xemacs-packages/fsf-compat/overlay.el 2008/04/11 19:22:41 1.4
+++ xemacs-packages/fsf-compat/overlay.el 2009/08/13 15:20:53
@@ -64,6 +64,12 @@
;;; Code:
+;; Have compiled 21.4 code also work on XEmacs binaries with real support
+;; for multiple values, by avoiding runtime calls to #'values:
+(eval-when-compile (when (eq 'list (symbol-function 'values))
+ (define-compiler-macro values (&rest args)
+ `(list ,@args))))
+
(defun overlayp (object)
"Return t if OBJECT is an overlay."
(and (extentp object)
--
¿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