Re: [R21.4] Fix escape-quoted quoting of specials in C1 controls
13 years, 8 months
Vin Shelton
On Sat, Mar 6, 2010 at 10:22 AM, Stephen J. Turnbull <stephen(a)xemacs.org> wrote:
> RECOMMEND 21.4
>
> This is a port of Ben's patch to 21.5.
>
> Includes a quickie tests/automated test. (Fails before patch, passes
> after.)
>
> diff -r 70c8d51df66c src/ChangeLog
> --- a/src/ChangeLog Fri Jan 01 18:46:38 2010 -0500
> +++ b/src/ChangeLog Sun Mar 07 00:06:57 2010 +0900
> @@ -1,3 +1,10 @@
> +2010-03-05 Ben Wing <ben(a)xemacs.org>
> +
> + * mule-coding.c (iso2022_encode):
> + Horrible bug: `escape-quoted' was failing to escape-quote special
> + characters in the 0x80 - 0x9F range. Who knows what breakage ensued?
> + Ported from 21.5.
APPROVE COMMIT 21.4
Thanks for the patch, Stephen.
- Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC21.5R21.4] FAQ about duplicated auto-autoloads
13 years, 8 months
Stephen J. Turnbull
APPROVE COMMIT 21.5 RECOMMEND 21.4
If there is another 21.4 release, of course.
See also issue760 on the tracker.
diff -r f560f6608937 man/ChangeLog
--- a/man/ChangeLog Wed Mar 30 15:07:15 2011 -0600
+++ b/man/ChangeLog Sat Apr 02 17:26:54 2011 +0900
@@ -1,3 +1,12 @@
+2011-04-02 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xemacs-faq.texi (Q2.5.7):
+ New node on troubleshooting duplicate auto-autoloads.
+ (Top):
+ (Installation):
+ (Q2.5.6):
+ Update menus and node links for Q2.5.7.
+
2011-03-24 Jerry James <james(a)xemacs.org>
* internals/internals.texi (Creating a Window-System Type):
diff -r f560f6608937 man/xemacs-faq.texi
--- a/man/xemacs-faq.texi Wed Mar 30 15:07:15 2011 -0600
+++ b/man/xemacs-faq.texi Sat Apr 02 17:26:54 2011 +0900
@@ -327,6 +327,7 @@
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
+* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
3 Editing Functions
@@ -3149,6 +3150,7 @@
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
+* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
@end menu
@unnumberedsec 2.0: Installation (General)
@@ -4567,7 +4569,7 @@
EOF
@end example
-@node Q2.5.6, , Q2.5.5, Installation
+@node Q2.5.6, Q2.5.7, Q2.5.5, Installation
@unnumberedsubsec Q2.5.6: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
Yes.
@@ -4617,6 +4619,54 @@
works around the "no useful stdio" problem by creating its own console
window as necessary to display messages in.)
+@node Q2.5.7, , Q2.5.6, Installation
+@unnumberedsubsec Q2.5.7: XEmacs issues messages about ``auto-autoloads already loaded.''
+
+On Sat, 05 Mar 2011 11:54:47 -0500, in Message-ID:
+<4D726AD7.7020303@(a)gmail.com> on xemacs-beta, Raymond Toy reported:
+
+@quotation
+[N]ow every time I start xemacs, I get 100+ error messages stating that
+the auto-autoload for every package has already been loaded.
+@end quotation
+
+This occurs if you have duplicate packages installed on your load-path.
+To detect exactly which paths are duplicated, use @kbd{M-x
+list-load-path-shadows}. If you have a small number of duplicated
+libraries, it is probably one or more packages available both in the
+XEmacs distribution and in third-party distributions. If you prefer the
+third-party version, use @kbd{M-x list-packages} to get the package
+management UI, and uninstall the particular packages. Removal of third
+party packages must be done manually, if you wish to keep the version
+distributed by XEmacs.
+
+When you have many duplicate packages, a common cause is that XEmacs
+finds @emph{package root directories} that are duplicates of each other.
+This can occur in some automounter configurations, or when the roots
+share some subtrees via symlinks. In this case, you will get a warning
+for @emph{all} of the packages you have installed. Although this is
+basically a site configuration problem, please report these cases.
+XEmacs is already aware of many automounter artifacts, and automatically
+adjusts for them. Code is being added to try to detect symlinks. We
+may not be able to handle every case, but we'd like to know about them,
+and where possible incorporate workarounds.
+
+Package root directories are specified at configuration time via the
+@code{--prefix}, @code{--exec-prefix}, and the @samp{--with-*-packages}
+options; at runtime relative to the XEmacs binary (@file{../share} and
+@file{..} (for run-in-place)); and at runtime via the
+@samp{EMACS*PACKAGES} environment variables. Unless you have special
+needs, it is best to install XEmacs and the packages (configuring with
+@code{--with-prefix=$prefix} for XEmacs and by untarring the SUMOs in
+@file{@code{$prefix}/share/xemacs/}.
+
+Note that older versions of XEmacs (21.1, 21.4, and early releases of
+21.5) by default expect the packages to be installed under
+@file{@code{$prefix}/lib} rather than @file{@code{$prefix}/share}. See
+the documentation for @file{configure} for how to point XEmacs at
+@file{@code{$prefix}/share/xemacs/} if that is preferred, or older
+XEmacsen need to share packages with recent versions.
+
@node Editing, Display, Installation, Top
@unnumbered 3 Editing Functions
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit: #'cadr, #'caddr, #'cadddr; document some equivalences.
13 years, 8 months
Aidan Kehoe
changeset: 5392:25c10648ffba
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Apr 02 16:18:07 2011 +0100
files: lisp/ChangeLog lisp/cl.el
description:
#'cadr, #'caddr, #'cadddr; document some equivalences.
lisp/ChangeLog addition:
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* cl.el (cadr, caddr, cadddr):
Document some equivalences for these functions.
diff -r f9dc75bdbdc4 -r 25c10648ffba lisp/ChangeLog
--- a/lisp/ChangeLog Sat Apr 02 16:13:20 2011 +0100
+++ b/lisp/ChangeLog Sat Apr 02 16:18:07 2011 +0100
@@ -1,3 +1,8 @@
+2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl.el (cadr, caddr, cadddr):
+ Document some equivalences for these functions.
+
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-preface): New.
diff -r f9dc75bdbdc4 -r 25c10648ffba lisp/cl.el
--- a/lisp/cl.el Sat Apr 02 16:13:20 2011 +0100
+++ b/lisp/cl.el Sat Apr 02 16:18:07 2011 +0100
@@ -425,7 +425,7 @@
(car (car x)))
(defun cadr (x)
- "Return the `car' of the `cdr' of X."
+ "Return the `car' of the `cdr' of X. Equivalent to `(second X)'."
(car (cdr x)))
(defun cdar (x)
@@ -449,7 +449,8 @@
(car (cdr (car x))))
(defun caddr (x)
- "Return the `car' of the `cdr' of the `cdr' of X."
+ "Return the `car' of the `cdr' of the `cdr' of X.
+Equivalent to `(third X)'."
(car (cdr (cdr x))))
(defun cdaar (x)
@@ -497,7 +498,8 @@
(car (cdr (cdr (car x)))))
(defun cadddr (x)
- "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X."
+ "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X.
+Equivalent to `(fourth X)'."
(car (cdr (cdr (cdr x)))))
(defun cdaaar (x)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[COMMIT] #'cadr, #'caddr, #'cadddr; document some equivalences.
13 years, 8 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1301757487 -3600
# Node ID 25c10648ffbaeaa8cacb9de0e60622664288eccd
# Parent f9dc75bdbdc4f757f86183ecf2b6eac8fe135919
#'cadr, #'caddr, #'cadddr; document some equivalences.
lisp/ChangeLog addition:
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* cl.el (cadr, caddr, cadddr):
Document some equivalences for these functions.
diff -r f9dc75bdbdc4 -r 25c10648ffba lisp/ChangeLog
--- a/lisp/ChangeLog Sat Apr 02 16:13:20 2011 +0100
+++ b/lisp/ChangeLog Sat Apr 02 16:18:07 2011 +0100
@@ -1,3 +1,8 @@
+2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl.el (cadr, caddr, cadddr):
+ Document some equivalences for these functions.
+
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-preface): New.
diff -r f9dc75bdbdc4 -r 25c10648ffba lisp/cl.el
--- a/lisp/cl.el Sat Apr 02 16:13:20 2011 +0100
+++ b/lisp/cl.el Sat Apr 02 16:18:07 2011 +0100
@@ -425,7 +425,7 @@
(car (car x)))
(defun cadr (x)
- "Return the `car' of the `cdr' of X."
+ "Return the `car' of the `cdr' of X. Equivalent to `(second X)'."
(car (cdr x)))
(defun cdar (x)
@@ -449,7 +449,8 @@
(car (cdr (car x))))
(defun caddr (x)
- "Return the `car' of the `cdr' of the `cdr' of X."
+ "Return the `car' of the `cdr' of the `cdr' of X.
+Equivalent to `(third X)'."
(car (cdr (cdr x))))
(defun cdaar (x)
@@ -497,7 +498,8 @@
(car (cdr (cdr (car x)))))
(defun cadddr (x)
- "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X."
+ "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X.
+Equivalent to `(fourth X)'."
(car (cdr (cdr (cdr x)))))
(defun cdaaar (x)
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[COMMIT] Implement #'load-time-value less hackishly, by modifying the byte compiler.
13 years, 8 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1301757200 -3600
# Node ID f9dc75bdbdc4f757f86183ecf2b6eac8fe135919
# Parent 593d9f73a7e817ea765f164c0bd08853b4e02660
Implement #'load-time-value less hackishly, by modifying the byte compiler.
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-preface): New.
* bytecomp.el (byte-compile-output-file-form):
* bytecomp.el (byte-compile-output-docform):
* bytecomp.el (byte-compile-file-form):
* bytecomp.el (byte-compile-file-form-defmumble):
* bytecomp.el (symbol-value):
* bytecomp.el (byte-compile-symbol-value): New.
* cl-macs.el (load-time-value):
No longer implement load-time-value by very hackishly redefining
#'byte-compile-file-form-defmumble, instead make the appropriate
changes in #'byte-compile-file-form-defmumble and
#'byte-compile-file-form instead. We also add a specific byte-compile
method for #'symbol-value, using the add-properties-to-a-gensym
approach that worked for #'block and #'return-from.
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/ChangeLog Sat Apr 02 16:13:20 2011 +0100
@@ -1,3 +1,20 @@
+2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-output-preface): New.
+ * bytecomp.el (byte-compile-output-file-form):
+ * bytecomp.el (byte-compile-output-docform):
+ * bytecomp.el (byte-compile-file-form):
+ * bytecomp.el (byte-compile-file-form-defmumble):
+ * bytecomp.el (symbol-value):
+ * bytecomp.el (byte-compile-symbol-value): New.
+ * cl-macs.el (load-time-value):
+ No longer implement load-time-value by very hackishly redefining
+ #'byte-compile-file-form-defmumble, instead make the appropriate
+ changes in #'byte-compile-file-form-defmumble and
+ #'byte-compile-file-form instead. We also add a specific byte-compile
+ method for #'symbol-value, using the add-properties-to-a-gensym
+ approach that worked for #'block and #'return-from.
+
2011-03-29 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-extra.el (cl-finite-do, cl-float-limits):
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/bytecomp.el
--- a/lisp/bytecomp.el Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/bytecomp.el Sat Apr 02 16:13:20 2011 +0100
@@ -455,6 +455,9 @@
"Alist of variables bound in the context of the current form,
that is, the current lexical environment. This list lives partly
on the specbind stack. The cdr of each cell is an integer bitmask.")
+(defvar byte-compile-output-preface nil
+ "Form to output before current by `byte-compile-output-file-form'
+This is used for implementing `load-time-value'.")
(defvar byte-compile-force-escape-quoted nil
"If t, `byte-compile-maybe-reset-coding' always chooses `escape-quoted'
@@ -1977,8 +1980,12 @@
(not byte-compile-emacs19-compatibility))
'(t) nil))
print-gensym-alist)
+ (when byte-compile-output-preface
+ (princ "\n(progn " byte-compile-outbuffer)
+ (prin1 byte-compile-output-preface byte-compile-outbuffer))
(princ "\n" byte-compile-outbuffer)
(prin1 form byte-compile-outbuffer)
+ (when byte-compile-output-preface (princ ")" byte-compile-outbuffer))
nil)))
(defun byte-compile-output-docform (preface name info form specindex quoted)
@@ -2016,12 +2023,6 @@
(> (length (nth (nth 1 info) form)) 0)
(char= (aref (nth (nth 1 info) form) 0) ?*))
(setq position (- position)))))
-
- (if preface
- (progn
- (insert preface)
- (prin1 name byte-compile-outbuffer)))
- (insert (car info))
(let ((print-escape-newlines t)
(print-readably t) ; print #[] for bytecode, 'x for (quote x)
;; Use a cons cell to say that we want
@@ -2032,6 +2033,15 @@
'(t) nil))
print-gensym-alist
(index 0))
+ (when byte-compile-output-preface
+ (princ "\n(progn " byte-compile-outbuffer)
+ (prin1 byte-compile-output-preface byte-compile-outbuffer))
+ (byte-compile-flush-pending)
+ (if preface
+ (progn
+ (insert preface)
+ (prin1 name byte-compile-outbuffer)))
+ (insert (car info))
(prin1 (car form) byte-compile-outbuffer)
(while (setq form (cdr form))
(setq index (1+ index))
@@ -2058,7 +2068,9 @@
(goto-char (point-max)))))
(t
(prin1 (car form) byte-compile-outbuffer)))))
- (insert (nth 2 info))))))
+ (insert (nth 2 info))
+ (when byte-compile-output-preface
+ (princ ")" byte-compile-outbuffer))))))
nil)
(defvar for-effect) ; ## Kludge! This should be an arg, not a special.
@@ -2094,6 +2106,7 @@
(defun byte-compile-file-form (form)
(let ((byte-compile-current-form nil) ; close over this for warnings.
+ (byte-compile-output-preface nil)
handler)
(cond
((not (consp form))
@@ -2329,11 +2342,11 @@
(code (byte-compile-byte-code-maker new-one))
(docform-info
(cond ((atom code) ; compiled-function-p
- (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]")))
+ (if macrop '(" '(macro . #[" 4 "]))") '(" #[" 4 "])")))
((eq (car code) 'quote)
(setq code new-one)
- (if macrop '(" '(macro " 2 ")") '(" '(" 2 ")")))
- ((if macrop '(" (cons 'macro (" 5 "))") '(" (" 5 ")"))))))
+ (if macrop '(" '(macro " 2 "))") '(" '(" 2 "))")))
+ ((if macrop '(" (cons 'macro (" 5 ")))") '(" (" 5 "))"))))))
(if this-one
(setcdr this-one new-one)
(set this-kind
@@ -2360,18 +2373,16 @@
;; printed to the file.
(if (consp code)
code
- (nconc (list
- (compiled-function-arglist code)
- (compiled-function-instructions code)
- (compiled-function-constants code)
- (compiled-function-stack-depth code)
- (compiled-function-doc-string code))
+ (list* (compiled-function-arglist code)
+ (compiled-function-instructions code)
+ (compiled-function-constants code)
+ (compiled-function-stack-depth code)
+ (compiled-function-doc-string code)
(if (commandp code)
(list (nth 1 (compiled-function-interactive code))))))
(and (atom code) byte-compile-dynamic
1)
nil))
- (princ ")" byte-compile-outbuffer)
nil)))
;; Print Lisp object EXP in the output file, inside a comment,
@@ -3143,7 +3154,7 @@
(byte-defop-compiler car 1)
(byte-defop-compiler cdr 1)
(byte-defop-compiler length 1)
-(byte-defop-compiler symbol-value 1)
+(byte-defop-compiler symbol-value)
(byte-defop-compiler symbol-function 1)
(byte-defop-compiler (1+ byte-add1) 1)
(byte-defop-compiler (1- byte-sub1) 1)
@@ -4314,6 +4325,29 @@
(byte-compile-body (cdr (cdr form)))
(byte-compile-out 'byte-temp-output-buffer-show 0))
+(defun byte-compile-symbol-value (form)
+ (symbol-macrolet ((not-present '#:not-present))
+ (let ((cl-load-time-value-form not-present)
+ (byte-compile-bound-variables byte-compile-bound-variables) gensym)
+ (and (consp (cadr form))
+ (eq 'quote (caadr form))
+ (setq gensym (cadadr form))
+ (symbolp gensym)
+ (setq cl-load-time-value-form
+ (get gensym 'cl-load-time-value-form not-present)))
+ (unless (eq cl-load-time-value-form not-present)
+ (setq byte-compile-bound-variables
+ (acons gensym byte-compile-global-bit
+ byte-compile-bound-variables)
+ byte-compile-output-preface
+ (byte-compile-top-level
+ (if byte-compile-output-preface
+ `(progn (setq ,gensym ,cl-load-time-value-form)
+ ,byte-compile-output-preface)
+ `(setq ,gensym ,cl-load-time-value-form))
+ t 'file)))
+ (byte-compile-one-arg form))))
+
(defun byte-compile-multiple-value-call (form)
(if (< (length form) 2)
(progn
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/cl-macs.el
--- a/lisp/cl-macs.el Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/cl-macs.el Sat Apr 02 16:13:20 2011 +0100
@@ -621,25 +621,15 @@
(defmacro load-time-value (form &optional read-only)
"Like `progn', but evaluates the body at load time.
The result of the body appears to the compiler as a quoted constant."
- (if (cl-compiling-file)
- (let* ((temp (gentemp "--cl-load-time--"))
- (set (list 'set (list 'quote temp) form)))
- (if (and (fboundp 'byte-compile-file-form-defmumble)
- (boundp 'this-kind) (boundp 'that-one))
- (fset 'byte-compile-file-form
- (list 'lambda '(form)
- (list 'fset '(quote byte-compile-file-form)
- (list 'quote
- (symbol-function 'byte-compile-file-form)))
- (list 'byte-compile-file-form (list 'quote set))
- '(byte-compile-file-form form)))
- ;; XEmacs change
- (print set (symbol-value ;;'outbuffer
- 'byte-compile-output-buffer
- )))
- (list 'symbol-value (list 'quote temp)))
- (list 'quote (eval form))))
-
+ (let ((gensym (gensym)))
+ ;; The body of this macro really should be (cons 'progn form), with the
+ ;; hairier stuff in a shadowed version in
+ ;; byte-compile-initial-macro-environment. That doesn't work because
+ ;; cl-macs.el doesn't respect byte-compile-macro-environment, which is
+ ;; something we should change.
+ (put gensym 'cl-load-time-value-form form)
+ (set gensym (eval form))
+ `(symbol-value ',gensym)))
;;; Conditional control structures.
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit: Implement #'load-time-value less hackishly, by modifying the byte compiler.
13 years, 8 months
Aidan Kehoe
changeset: 5391:f9dc75bdbdc4
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Apr 02 16:13:20 2011 +0100
files: lisp/ChangeLog lisp/bytecomp.el lisp/cl-macs.el
description:
Implement #'load-time-value less hackishly, by modifying the byte compiler.
2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-preface): New.
* bytecomp.el (byte-compile-output-file-form):
* bytecomp.el (byte-compile-output-docform):
* bytecomp.el (byte-compile-file-form):
* bytecomp.el (byte-compile-file-form-defmumble):
* bytecomp.el (symbol-value):
* bytecomp.el (byte-compile-symbol-value): New.
* cl-macs.el (load-time-value):
No longer implement load-time-value by very hackishly redefining
#'byte-compile-file-form-defmumble, instead make the appropriate
changes in #'byte-compile-file-form-defmumble and
#'byte-compile-file-form instead. We also add a specific byte-compile
method for #'symbol-value, using the add-properties-to-a-gensym
approach that worked for #'block and #'return-from.
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/ChangeLog Sat Apr 02 16:13:20 2011 +0100
@@ -1,3 +1,20 @@
+2011-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-output-preface): New.
+ * bytecomp.el (byte-compile-output-file-form):
+ * bytecomp.el (byte-compile-output-docform):
+ * bytecomp.el (byte-compile-file-form):
+ * bytecomp.el (byte-compile-file-form-defmumble):
+ * bytecomp.el (symbol-value):
+ * bytecomp.el (byte-compile-symbol-value): New.
+ * cl-macs.el (load-time-value):
+ No longer implement load-time-value by very hackishly redefining
+ #'byte-compile-file-form-defmumble, instead make the appropriate
+ changes in #'byte-compile-file-form-defmumble and
+ #'byte-compile-file-form instead. We also add a specific byte-compile
+ method for #'symbol-value, using the add-properties-to-a-gensym
+ approach that worked for #'block and #'return-from.
+
2011-03-29 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-extra.el (cl-finite-do, cl-float-limits):
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/bytecomp.el
--- a/lisp/bytecomp.el Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/bytecomp.el Sat Apr 02 16:13:20 2011 +0100
@@ -455,6 +455,9 @@
"Alist of variables bound in the context of the current form,
that is, the current lexical environment. This list lives partly
on the specbind stack. The cdr of each cell is an integer bitmask.")
+(defvar byte-compile-output-preface nil
+ "Form to output before current by `byte-compile-output-file-form'
+This is used for implementing `load-time-value'.")
(defvar byte-compile-force-escape-quoted nil
"If t, `byte-compile-maybe-reset-coding' always chooses `escape-quoted'
@@ -1977,8 +1980,12 @@
(not byte-compile-emacs19-compatibility))
'(t) nil))
print-gensym-alist)
+ (when byte-compile-output-preface
+ (princ "\n(progn " byte-compile-outbuffer)
+ (prin1 byte-compile-output-preface byte-compile-outbuffer))
(princ "\n" byte-compile-outbuffer)
(prin1 form byte-compile-outbuffer)
+ (when byte-compile-output-preface (princ ")" byte-compile-outbuffer))
nil)))
(defun byte-compile-output-docform (preface name info form specindex quoted)
@@ -2016,12 +2023,6 @@
(> (length (nth (nth 1 info) form)) 0)
(char= (aref (nth (nth 1 info) form) 0) ?*))
(setq position (- position)))))
-
- (if preface
- (progn
- (insert preface)
- (prin1 name byte-compile-outbuffer)))
- (insert (car info))
(let ((print-escape-newlines t)
(print-readably t) ; print #[] for bytecode, 'x for (quote x)
;; Use a cons cell to say that we want
@@ -2032,6 +2033,15 @@
'(t) nil))
print-gensym-alist
(index 0))
+ (when byte-compile-output-preface
+ (princ "\n(progn " byte-compile-outbuffer)
+ (prin1 byte-compile-output-preface byte-compile-outbuffer))
+ (byte-compile-flush-pending)
+ (if preface
+ (progn
+ (insert preface)
+ (prin1 name byte-compile-outbuffer)))
+ (insert (car info))
(prin1 (car form) byte-compile-outbuffer)
(while (setq form (cdr form))
(setq index (1+ index))
@@ -2058,7 +2068,9 @@
(goto-char (point-max)))))
(t
(prin1 (car form) byte-compile-outbuffer)))))
- (insert (nth 2 info))))))
+ (insert (nth 2 info))
+ (when byte-compile-output-preface
+ (princ ")" byte-compile-outbuffer))))))
nil)
(defvar for-effect) ; ## Kludge! This should be an arg, not a special.
@@ -2094,6 +2106,7 @@
(defun byte-compile-file-form (form)
(let ((byte-compile-current-form nil) ; close over this for warnings.
+ (byte-compile-output-preface nil)
handler)
(cond
((not (consp form))
@@ -2329,11 +2342,11 @@
(code (byte-compile-byte-code-maker new-one))
(docform-info
(cond ((atom code) ; compiled-function-p
- (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]")))
+ (if macrop '(" '(macro . #[" 4 "]))") '(" #[" 4 "])")))
((eq (car code) 'quote)
(setq code new-one)
- (if macrop '(" '(macro " 2 ")") '(" '(" 2 ")")))
- ((if macrop '(" (cons 'macro (" 5 "))") '(" (" 5 ")"))))))
+ (if macrop '(" '(macro " 2 "))") '(" '(" 2 "))")))
+ ((if macrop '(" (cons 'macro (" 5 ")))") '(" (" 5 "))"))))))
(if this-one
(setcdr this-one new-one)
(set this-kind
@@ -2360,18 +2373,16 @@
;; printed to the file.
(if (consp code)
code
- (nconc (list
- (compiled-function-arglist code)
- (compiled-function-instructions code)
- (compiled-function-constants code)
- (compiled-function-stack-depth code)
- (compiled-function-doc-string code))
+ (list* (compiled-function-arglist code)
+ (compiled-function-instructions code)
+ (compiled-function-constants code)
+ (compiled-function-stack-depth code)
+ (compiled-function-doc-string code)
(if (commandp code)
(list (nth 1 (compiled-function-interactive code))))))
(and (atom code) byte-compile-dynamic
1)
nil))
- (princ ")" byte-compile-outbuffer)
nil)))
;; Print Lisp object EXP in the output file, inside a comment,
@@ -3143,7 +3154,7 @@
(byte-defop-compiler car 1)
(byte-defop-compiler cdr 1)
(byte-defop-compiler length 1)
-(byte-defop-compiler symbol-value 1)
+(byte-defop-compiler symbol-value)
(byte-defop-compiler symbol-function 1)
(byte-defop-compiler (1+ byte-add1) 1)
(byte-defop-compiler (1- byte-sub1) 1)
@@ -4314,6 +4325,29 @@
(byte-compile-body (cdr (cdr form)))
(byte-compile-out 'byte-temp-output-buffer-show 0))
+(defun byte-compile-symbol-value (form)
+ (symbol-macrolet ((not-present '#:not-present))
+ (let ((cl-load-time-value-form not-present)
+ (byte-compile-bound-variables byte-compile-bound-variables) gensym)
+ (and (consp (cadr form))
+ (eq 'quote (caadr form))
+ (setq gensym (cadadr form))
+ (symbolp gensym)
+ (setq cl-load-time-value-form
+ (get gensym 'cl-load-time-value-form not-present)))
+ (unless (eq cl-load-time-value-form not-present)
+ (setq byte-compile-bound-variables
+ (acons gensym byte-compile-global-bit
+ byte-compile-bound-variables)
+ byte-compile-output-preface
+ (byte-compile-top-level
+ (if byte-compile-output-preface
+ `(progn (setq ,gensym ,cl-load-time-value-form)
+ ,byte-compile-output-preface)
+ `(setq ,gensym ,cl-load-time-value-form))
+ t 'file)))
+ (byte-compile-one-arg form))))
+
(defun byte-compile-multiple-value-call (form)
(if (< (length form) 2)
(progn
diff -r 593d9f73a7e8 -r f9dc75bdbdc4 lisp/cl-macs.el
--- a/lisp/cl-macs.el Sat Apr 02 17:04:38 2011 +0900
+++ b/lisp/cl-macs.el Sat Apr 02 16:13:20 2011 +0100
@@ -621,25 +621,15 @@
(defmacro load-time-value (form &optional read-only)
"Like `progn', but evaluates the body at load time.
The result of the body appears to the compiler as a quoted constant."
- (if (cl-compiling-file)
- (let* ((temp (gentemp "--cl-load-time--"))
- (set (list 'set (list 'quote temp) form)))
- (if (and (fboundp 'byte-compile-file-form-defmumble)
- (boundp 'this-kind) (boundp 'that-one))
- (fset 'byte-compile-file-form
- (list 'lambda '(form)
- (list 'fset '(quote byte-compile-file-form)
- (list 'quote
- (symbol-function 'byte-compile-file-form)))
- (list 'byte-compile-file-form (list 'quote set))
- '(byte-compile-file-form form)))
- ;; XEmacs change
- (print set (symbol-value ;;'outbuffer
- 'byte-compile-output-buffer
- )))
- (list 'symbol-value (list 'quote temp)))
- (list 'quote (eval form))))
-
+ (let ((gensym (gensym)))
+ ;; The body of this macro really should be (cons 'progn form), with the
+ ;; hairier stuff in a shadowed version in
+ ;; byte-compile-initial-macro-environment. That doesn't work because
+ ;; cl-macs.el doesn't respect byte-compile-macro-environment, which is
+ ;; something we should change.
+ (put gensym 'cl-load-time-value-form form)
+ (set gensym (eval form))
+ `(symbol-value ',gensym)))
;;; Conditional control structures.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit: New FAQ Q2.5.7 on troubleshooting duplicate auto-autoloads.
13 years, 8 months
Stephen J. Turnbull
changeset: 5390:593d9f73a7e8
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Apr 02 17:04:38 2011 +0900
files: man/ChangeLog man/xemacs-faq.texi
description:
New FAQ Q2.5.7 on troubleshooting duplicate auto-autoloads.
Nodes Top, Installation, Q2.5.6: Update menus and node links for Q2.5.7.
diff -r f560f6608937 -r 593d9f73a7e8 man/ChangeLog
--- a/man/ChangeLog Wed Mar 30 15:07:15 2011 -0600
+++ b/man/ChangeLog Sat Apr 02 17:04:38 2011 +0900
@@ -1,3 +1,12 @@
+2011-04-02 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xemacs-faq.texi (Q2.5.7):
+ New node on troubleshooting duplicate auto-autoloads.
+ (Top):
+ (Installation):
+ (Q2.5.6):
+ Update menus and node links for Q2.5.7.
+
2011-03-24 Jerry James <james(a)xemacs.org>
* internals/internals.texi (Creating a Window-System Type):
diff -r f560f6608937 -r 593d9f73a7e8 man/xemacs-faq.texi
--- a/man/xemacs-faq.texi Wed Mar 30 15:07:15 2011 -0600
+++ b/man/xemacs-faq.texi Sat Apr 02 17:04:38 2011 +0900
@@ -327,6 +327,7 @@
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
+* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
3 Editing Functions
@@ -3149,6 +3150,7 @@
* Q2.5.4:: Startup warnings about deducing proper fonts?
* Q2.5.5:: Warnings from incorrect key modifiers.
* Q2.5.6:: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
+* Q2.5.7:: XEmacs issues messages about ``auto-autoloads already loaded.''
@end menu
@unnumberedsec 2.0: Installation (General)
@@ -4567,7 +4569,7 @@
EOF
@end example
-@node Q2.5.6, , Q2.5.5, Installation
+@node Q2.5.6, Q2.5.7, Q2.5.5, Installation
@unnumberedsubsec Q2.5.6: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
Yes.
@@ -4616,6 +4618,54 @@
just creates and immediately hides a console when necessary, and
works around the "no useful stdio" problem by creating its own console
window as necessary to display messages in.)
+
+@node Q2.5.7, , Q2.5.6, Installation
+@unnumberedsubsec Q2.5.7: XEmacs issues messages about ``auto-autoloads already loaded.''
+
+On Sat, 05 Mar 2011 11:54:47 -0500, in Message-ID:
+<4D726AD7.7020303@(a)gmail.com> on xemacs-beta, Raymond Toy reported:
+
+@quotation
+[N]ow every time I start xemacs, I get 100+ error messages stating that
+the auto-autoload for every package has already been loaded.
+@end quotation
+
+This occurs if you have duplicate packages installed on your load-path.
+To detect exactly which paths are duplicated, use @kbd{M-x
+list-load-path-shadows}. If you have a small number of duplicated
+libraries, it is probably one or more packages available both in the
+XEmacs distribution and in third-party distributions. If you prefer the
+third-party version, use @kbd{M-x list-packages} to get the package
+management UI, and uninstall the particular packages. Removal of third
+party packages must be done manually, if you wish to keep the version
+distributed by XEmacs.
+
+When you have many duplicate packages, a common cause is that XEmacs
+finds @emph{package root directories} that are duplicates of each other.
+This can occur in some automounter configurations, or when the roots
+share some subtrees via symlinks. In this case, you will get a warning
+for @emph{all} of the packages you have installed. Although this is
+basically a site configuration problem, please report these cases.
+XEmacs is already aware of many automounter artifacts, and automatically
+adjusts for them. Code is being added to try to detect symlinks. We
+may not be able to handle every case, but we'd like to know about them,
+and where possible incorporate workarounds.
+
+Package root directories are specified at configuration time via the
+@code{--prefix}, @code{--exec-prefix}, and the @samp{--with-*-packages}
+options; at runtime relative to the XEmacs binary (@file{../share} and
+@file{..} (for run-in-place)); and at runtime via the
+@samp{EMACS*PACKAGES} environment variables. Unless you have special
+needs, it is best to install XEmacs and the packages (configuring with
+@code{--with-prefix=$prefix} for XEmacs and by untarring the SUMOs in
+@file{@code{$prefix}/share/xemacs/}.
+
+Note that older versions of XEmacs (21.1, 21.4, and early releases of
+21.5) by default expect the packages to be installed under
+@file{@code{$prefix}/lib} rather than @file{@code{$prefix}/share}. See
+the documentation for @file{configure} for how to point XEmacs at
+@file{@code{$prefix}/share/xemacs/} if that is preferred, or older
+XEmacsen need to share packages with recent versions.
@node Editing, Display, Installation, Top
@unnumbered 3 Editing Functions
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches