commit: Factor out lists of operators specially treated by 'make-autoload'.
17 years
Stephen Turnbull
changeset: 4352:d2f4dd8611d9b88d0c16de371bc663a99bc6a305
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Dec 22 15:57:21 2007 -0800
files: lisp/ChangeLog lisp/autoload.el
description:
Factor out lists of operators specially treated by 'make-autoload'.
General idea approved by Mike Sperber, and tested in 21.4 by building JDE.
diff -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 lisp/ChangeLog
--- a/…
[View More]lisp/ChangeLog Sat Dec 22 15:02:04 2007 +0100
+++ b/lisp/ChangeLog Sat Dec 22 15:57:21 2007 -0800
@@ -1,3 +1,11 @@ 2007-12-18 Mike Sperber <mike(a)xemacs.o
+2007-12-22 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ Factor out lists of operators specially treated by `make-autoload'.
+
+ * autoload.el (autoload-make-autoload-operators): New.
+ (autoload-make-autoload-complex-operators): New.
+ (make-autoload): Use them.
+
2007-12-18 Mike Sperber <mike(a)xemacs.org>
* autoload.el (process-one-lisp-autoload): Insert <immediate> into
diff -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 lisp/autoload.el
--- a/lisp/autoload.el Sat Dec 22 15:02:04 2007 +0100
+++ b/lisp/autoload.el Sat Dec 22 15:57:21 2007 -0800
@@ -226,6 +226,20 @@ the section of autoloads for a file.")
;; Parsing the source file text.
;; Autoloads in C source differ from those in Lisp source.
+;; #### Eventually operators like defclass and defmethod (defined in an
+;; external package, EIEIO) may be factored out. Don't add operators here
+;; without discussing whether and how to do that on the developers' channel.
+(defvar autoload-make-autoload-operators
+ '(defun define-skeleton defmacro define-derived-mode define-generic-mode
+ easy-mmode-define-minor-mode easy-mmode-define-global-mode
+ define-minor-mode defun* defmacro* defclass defmethod)
+ "`defun'-like operators that use `autoload' to load the library.")
+
+(defvar autoload-make-autoload-complex-operators
+ '(easy-mmode-define-minor-mode easy-mmode-define-global-mode
+ define-minor-mode)
+ "`defun'-like operators to macroexpand before using `autoload'.")
+
(defun make-autoload (form file)
"Turn FORM into an autoload or defvar for source file FILE.
Returns nil if FORM is not a special autoload form (i.e. a function definition
@@ -233,8 +247,7 @@ or macro definition or a defcustom)."
(let ((car (car-safe form)) expand)
(cond
;; For complex cases, try again on the macro-expansion.
- ((and (memq car '(easy-mmode-define-global-mode
- easy-mmode-define-minor-mode define-minor-mode))
+ ((and (memq car autoload-make-autoload-complex-operators)
(setq expand (let ((load-file-name file)) (macroexpand form)))
(eq (car expand) 'progn)
(memq :autoload-end expand))
@@ -246,11 +259,7 @@ or macro definition or a defcustom)."
(cdr expand)))))
;; For special function-like operators, use the `autoload' function.
- ((memq car '(defun define-skeleton defmacro define-derived-mode
- define-generic-mode easy-mmode-define-minor-mode
- easy-mmode-define-global-mode
- define-minor-mode defun* defmacro*
- defclass defmethod)) ; from the EIEIO package
+ ((memq car autoload-make-autoload-operators)
(let* ((macrop (memq car '(defmacro defmacro*)))
(name (nth 1 form))
(body (nthcdr (get car 'doc-string-elt) form))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Commit deletion of file, omitted from earlier commit.
17 years
Stephen Turnbull
changeset: 4348:0831a73486ffa5a397647dac4033327e689fddff
parent: 4346:ec1103d2c1c7f17396af875d6831bb049c8c0356
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Dec 22 01:15:03 2007 -0800
files: tests/reproduce-bugs.el
description:
Commit deletion of file, omitted from earlier commit.
diff -r ec1103d2c1c7f17396af875d6831bb049c8c0356 -r 0831a73486ffa5a397647dac4033327e689fddff tests/reproduce-bugs.el
--- a/tests/reproduce-bugs.el Fri Dec 21 03:39:10 …
[View More]2007 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-;;; reproduce-bugs.el --- reproduce bugs in XEmacs
-
-;; Copyright (C) 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1997 Sun Microsystems, Inc.
-
-;; Keywords: bugs, crash, burn, die, croak, munge
-
-;; This file is part of XEmacs.
-
-;; This file is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING. If not, write to the Free
-;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-;; 02111-1307, USA.
-
-;;; Synched up with: Not in FSF.
-
-;;; Commentary:
-
-;; Reproduce XEmacs crashes, so that they can get fixed.
-;; A table of bugs is created. You can list, describe, or reproduce bugs.
-
-;; Non-crash bugs should not be in this file; they should be placed in
-;; an appropriate file in the tests/automated suite.
-;; You may need to use a debug version of XEmacs to reproduce some of these.
-
-;; For XEmacs maintainers and other masochists.
-;; It's a bad idea to rely on code in this file continuing to work in
-;; the same way. :-)
-
-;; #### This file should be cleaned up and renamed reproduce-crashes.el.
-;; #### Bugs < 11 need to be tested and versions where they pass recorded.
-;; #### Fixed bugs should become regression tests, maybe?
-;; #### Non-crashes should be copied (not moved) to tests/automatic.
-;; #### Do the autoloads make any sense?
-;; #### `list-bugs' should optionally sort on status.
-;; #### Bugs that depend on features (eg, Mule) should check for them and
-;; document them.
-
-;;; Code:
-
-;; UI entry points
-
-(defun reproduce-bug (number)
- "Reproduce XEmacs bugs, so that they can get fixed.
-Especially, make XEmacs crash.
-See reproduce-bugs.el for bug descriptions and bug numbers.
-A debug version of XEmacs may be needed to reproduce some bugs."
- (interactive "nBug Number: ")
- (funcall (nth 0 (gethash number bug-hashtable))))
-
-(defun describe-bug (number &optional show-code)
- "Describe the bug with index NUMBER in a popup window.
-If optional argument SHOW-CODE is non-nil, also display the reproduction code."
- (interactive "nBug number: \ncShow code? [y/N] ")
- (setq show-code (cond ((not (interactive-p)) show-code)
- ((member show-code '(?y ?Y)) t)
- (t nil)))
- (with-displaying-temp-buffer (format "Bug %d" number)
- (let ((bug (gethash number bug-hashtable)))
- (princ (format "Bug #%d is %s.\n%s\n\n%s"
- number
- (nth 1 bug)
- (nth 2 bug)
- (if show-code (pp-to-string (nth 0 bug)) ""))))))
-
-(defun list-bugs ()
- "List bugs most recent first, each with brief description in a popup window.
-Assumes a maximum of 999 bugs and a minimum of 80 column width window."
- (interactive)
- (with-displaying-temp-buffer "*Bug list*"
- (princ " # status description\n")
- (let (buglist)
- (maphash (lambda (number bug)
- (push (format "%3d %-9s %s"
- number
- (nth 1 bug)
- (let ((description (nth 2 bug)))
- (save-match-data
- (string-match "\\(.*\\)\\(\n\\|$\\)"
- description)
- (match-string 1 description))))
- buglist))
- bug-hashtable)
- (setq buglist (sort buglist (lambda (b1 b2) (string< b2 b1))))
- (while buglist
- (let ((bug (pop buglist)))
- (princ (if (< (length bug) 79) bug (substring bug 0 78)))
- (terpri))))))
-
-;; Database and utilities (internal)
-
-(defvar bug-hashtable (make-hashtable 10)
- "Table of bugs, keyed by bug index number.
-The value is a list (LAMBDA STATUS DOCSTRING), where LAMBDA is a lambda
-expression reproducing the bug, and STATUS and DOCSTRING describe the bug.
-For details, see `defbug'.")
-
-(put 'defbug 'lisp-indent-function 'defun)
-(defmacro defbug (bug-number status docstring &rest body)
- "Record a bug with key BUG-NUMBER and value (LAMBDA STATUS DOCSTRING).
-LAMBDA is a lambda expression which when called executes BODY.
-BUG-NUMBER is the bug's index number, a positive integer.
-STATUS is the current status of the bug, one of
- fixed The bug has been diagnosed and fixed.
- diagnosed The bug has been localized but not fixed.
- current The bug has been reported and reproduced but cause is unknown.
- legacy The bug is undocumented but presumed fixed.
-DOCSTRING should be a string describing the bug, including any relevant
-descriptive information and references to archived mailing list traffic or
-a BTS issue.
-BODY is a sequence of expressions to execute to reproduce the bug."
- (let ((body (if (stringp docstring) body (cons docstring body)))
- (docstring (if (stringp docstring) docstring "[docstring omitted]")))
- `(puthash ,bug-number
- '((lambda () ,@body) ,status ,docstring)
- bug-hashtable)))
-
-(defconst bug-buffer
- (save-excursion
- (set-buffer (get-buffer-create "*Bug*"))
- (erase-buffer)
- (current-buffer)))
-
-
-;;; ------------------------------------------------------------------
-;;;; Bugs follow:
-
-(defbug 11 fixed
- "Crash in search due to backward movement.
-Need Mule build with error checking in 21.5.28.
-Fatal error: assertion failed,
-file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487,
-(this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)
-Reported: <475B104F.2070807(a)barco.com>
- <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
-Fixed: <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>"
- (switch-to-buffer (get-buffer-create "*crash me*"))
- ;; doozy is the keystroke equivalent of the keyboard macro
- ;; "IAI" C-b C-b C-s C-x
- (let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return
- ?I ?A ?I
- (control ?b) (control ?b)
- (control ?s) (control ?w)]))
- (execute-kbd-macro doozy)))
-
-
-(defbug 10 current
- "Crash on trace-function
-Fatal error: assertion failed, file src/eval.c, line 1405, abort()"
- (trace-function 'record-buffer bug-buffer)
- (pop-to-buffer bug-buffer))
-
-
-(defbug 9 current
- "Crashes with stack overflow
-Should give error via barf-if-buffer-read-only
-Fatal error: assertion failed, file src/eval.c, line 1874, abort()
-This bug has been fixed. -sb"
- (switch-to-buffer bug-buffer)
- ;; The following line should contain a number of eight-bit characters
- (insert "²èÌÌËè€Î°ÜÆ°€Ï€Ç€€ë€è€Š€Ë€Ê€ê€Þ€·€¿¡£º£Åـϡ¢²èÌÌ€ÎÃæ€Ç¡¢ÆÃÄê€ÎŸì")
- (setq buffer-read-only t)
- (ignore-errors
- (encode-coding-region (point-min) (point-max) 'euc-japan))
- (garbage-collect))
-
-
-(defbug 8 current
- "Crashes in debug version only
-Fatal error: assertion failed, file src/objects.h, line 149,
-RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj)"
- (let (glyph ext)
- (make-face 'adobe-symbol-face)
- (set-face-font
- 'adobe-symbol-face
- "-adobe-symbol-medium-r-normal--*-140-*-*-p-*-adobe-fontspecific")
- (setq glyph (make-glyph (list (vector 'string
- :data (char-to-string ?\xD3)))))
- (set-glyph-face glyph 'adobe-symbol-face)
- (setq ext (make-extent 14 18))
- (set-extent-property ext 'begin-glyph glyph)))
-
-
-(defbug 7 current
- "(maybe?) crash koi8
-ACCL: Invalid command (c)
-With debugging on, crashes as follows:
-Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj)"
- ;;(load "cyrillic")
- ;;(load "cyrillic-hooks")
- (princ (decode-coding-string "\xe1" 'koi8)))
-
-
-(defbug 6 current
- "regexp crash
-This doesn't crash for me. -sb"
- (string-match "\\(\\s-\\|$\\)" "å"))
-
-
-(defbug 5 legacy
- "`subst-char-in-region' moves point."
- (interactive)
- (with-temp-buffer
- (insert "abc")
- (forward-char -1)
- (subst-char-in-region 1 4 ?b ?\344)
- (if (not (= (point) 3))
- (message "Bug! point should equal 3 but is %d" (point)))))
-
-
-(defbug 4 legacy
- "Infinite recursion crash - Segmentation Fault"
- (switch-to-buffer bug-buffer)
- (insert "abcdefg")
- (setq e (make-extent 1 4))
- (set-extent-property e 'face 'bold)
- (set-extent-property e 'duplicable t)
- (set-extent-property e 'replicating t)
- (insert (buffer-string))
- (delete-region 8 9))
-
-
-(defbug 3 current
- "Completely Uninterruptible hang in re-search-backward (Was: java-mode)"
- (switch-to-buffer bug-buffer)
- (insert "{
-public static void main(String[] args) throws java.io.IOException
- {
- }
-}
-")
- (goto-char (point-min))
- (search-forward "{" nil nil 2)
- (backward-char)
- (re-search-backward
- "^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s("))
-
-
-(defbug 2 legacy
- "crash popup frames
-FIXED
-#### This bug is not understood, and may be incomplete. See source."
- (lambda ()
- (let ((f (selected-frame)))
- (make-frame `(popup ,(selected-frame)))
- (make-frame)
- (sit-for 0)
- (delete-frame f)
- ;; #### Check whether this is needed.
- ;; (save-buffers-kill-emacs5)
- )))
-
-
-(defbug 1 legacy
- "crash on delete-frame-hook
-FIXED!
-#### This bug is not understood, and seems to be incomplete. See source."
- (lambda ()
- ;; #### Should this be add-hook instead of setq?
- (setq delete-frame-hook
- (lambda (frame)
- (select-frame frame)
- (kill-buffer (window-buffer (frame-selected-window frame)))
- ;; #### Do we need to delete a frame here or something?
- ))))
-
-;;; reproduce-bugs.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Respect the CODESYS argument in #'open-database; don't autodetect EOL.
17 years
Aidan Kehoe
changeset: 4351:bc3b9f61018efe778ecbbab927c5d8f37b60a629
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Dec 22 15:02:04 2007 +0100
files: src/ChangeLog src/database.c
description:
Respect the CODESYS argument in #'open-database; don't autodetect EOL.
2007-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* database.c (Fopen_database):
Actually respect the CODESYS argument; don't require EOL
autodetection from the coding system, because …
[View More]autodetection mostly
fails with reads of small amounts of data. It might be possible
with an implicit #'map-database on open, though I don't think
that's a great idea.
* database.c (print_database):
Give the coding system used for text conversion when printing a
database object.
diff -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 src/ChangeLog
--- a/src/ChangeLog Sat Dec 22 02:14:23 2007 -0800
+++ b/src/ChangeLog Sat Dec 22 15:02:04 2007 +0100
@@ -1,3 +1,15 @@ 2007-12-20 Jerry James <james(a)xemacs.o
+2007-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * database.c (Fopen_database):
+ Actually respect the CODESYS argument; don't require EOL
+ autodetection from the coding system, because autodetection mostly
+ fails with reads of small amounts of data. It might be possible
+ with an implicit #'map-database on open, though I don't think
+ that's a great idea.
+ * database.c (print_database):
+ Give the coding system used for text conversion when printing a
+ database object.
+
2007-12-20 Jerry James <james(a)xemacs.org>
* sound.c: Fix unused parameter warnings when HAVE_ALSA_SOUND.
diff -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e -r bc3b9f61018efe778ecbbab927c5d8f37b60a629 src/database.c
--- a/src/database.c Sat Dec 22 02:14:23 2007 -0800
+++ b/src/database.c Sat Dec 22 15:02:04 2007 +0100
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "sysfile.h"
#include "buffer.h"
+#include "file-coding.h"
#ifndef HAVE_DATABASE
#error HAVE_DATABASE not defined!!
@@ -181,11 +182,16 @@ print_database (Lisp_Object obj, Lisp_Ob
3, db->fname, db->funcs->get_type (db),
db->funcs->get_subtype (db));
- write_fmt_string (printcharfun, "%s) 0x%x>",
+ write_fmt_string (printcharfun, "%s) ",
(!DATABASE_LIVE_P (db) ? "closed" :
(db->access_ & O_WRONLY) ? "writeonly" :
- (db->access_ & O_RDWR) ? "readwrite" : "readonly"),
- db->header.uid);
+ (db->access_ & O_RDWR) ? "readwrite" : "readonly"));
+
+ write_fmt_string_lisp (printcharfun, "coding: %s ", 1,
+ XSYMBOL_NAME (XCODING_SYSTEM_NAME
+ (db->coding_system)));
+
+ write_fmt_string (printcharfun, "0x%x>", db->header.uid);
}
static void
@@ -654,7 +660,7 @@ variable `database-coding-system'.
if (NILP (codesys))
codesys = Vdatabase_coding_system;
- codesys = get_coding_system_for_text_file (Vdatabase_coding_system, 1);
+ codesys = get_coding_system_for_text_file (codesys, 0);
#ifdef HAVE_DBM
if (NILP (type) || EQ (type, Qdbm))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Fix typo of "late packages" for "last packages".
17 years
Stephen Turnbull
changeset: 4350:50889296c05cd0f9ea1295d66479ea49fb3ead8e
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Dec 22 02:14:23 2007 -0800
files: configure configure.ac
description:
Fix typo of "late packages" for "last packages".
diff -r 9b8a5d78e07af18621353d4f4bacff93e7dd891f -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e configure
--- a/configure Sat Dec 22 02:05:07 2007 -0800
+++ b/configure Sat Dec 22 02:14:23 2007 -0800
@@ -1521,7 +1521,7 @@…
[View More] Run-time path-searching options
Specify location of last/legacy packages (instead of
default location; same as --with-legacy-packages).
--with-legacy-packages=DIR
- Specify location of late/legacy packages (instead of
+ Specify location of last/legacy packages (instead of
default location; same as --with-last-packages).
--with-package-path=PATH
Search path for package directories.
@@ -2842,7 +2842,7 @@ if test "${with_legacy_packages+set}" =
enableval="$with_legacy_packages"
withval="$with_legacy_packages"
cat >>confdefs.h <<\_ACEOF
-#define LATE_PACKAGE_DIRECTORIES_USER_DEFINED 1
+#define LAST_PACKAGE_DIRECTORIES_USER_DEFINED 1
_ACEOF
fi;
diff -r 9b8a5d78e07af18621353d4f4bacff93e7dd891f -r 50889296c05cd0f9ea1295d66479ea49fb3ead8e configure.ac
--- a/configure.ac Sat Dec 22 02:05:07 2007 -0800
+++ b/configure.ac Sat Dec 22 02:14:23 2007 -0800
@@ -666,8 +666,8 @@ XE_MERGED_ARG([last-packages],
AS_HELP_STRING([--with-last-packages=DIR],[Specify location of last/legacy packages (instead of default location; same as --with-legacy-packages).]),
[AC_DEFINE(LAST_PACKAGE_DIRECTORIES_USER_DEFINED)], [])
XE_MERGED_ARG([legacy-packages],
- AS_HELP_STRING([--with-legacy-packages=DIR],[Specify location of late/legacy packages (instead of default location; same as --with-last-packages).]),
- [AC_DEFINE(LATE_PACKAGE_DIRECTORIES_USER_DEFINED)], [])
+ AS_HELP_STRING([--with-legacy-packages=DIR],[Specify location of last/legacy packages (instead of default location; same as --with-last-packages).]),
+ [AC_DEFINE(LAST_PACKAGE_DIRECTORIES_USER_DEFINED)], [])
XE_MERGED_ARG([package-path],
AS_HELP_STRING([--with-package-path=PATH],[Search path for package directories.]),
[AC_DEFINE(PACKAGE_PATH_USER_DEFINED)], [])
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Rework init-file migration.
17 years
Michael Sperber
changeset: 4347:6b571dc4ba3fe8413c178b8f1bba807925ffddf3
tag: tip
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Fri Dec 21 16:51:30 2007 +0100
files: lisp/ChangeLog lisp/startup.el
description:
Rework init-file migration.
2007-12-19 Mike Sperber <mike(a)xemacs.org>
* startup.el (user-init-file-migration-in-order-p): Factored out
check.
(maybe-migrate-user-init-file):
(migrate-user-init-file): Don't do a backup of ~/.emacs anymore.
…
[View More]Instead, make only a manual adjustment of the file, if at all,
i.e. don't go through customize magic anymore.
(unmigrate-user-init-file): Don't use customize to set
`load-home-init-file' anymore.
(set-load-home-init-file): Add; performs the modification
previously done through customize.
(unmigrate-user-init-file): Use `set-load-home-init-file' instead
of customize.
(command-line-1): Only wait for the first event if we're not going
to ask about migration.
diff -r ec1103d2c1c7f17396af875d6831bb049c8c0356 -r 6b571dc4ba3fe8413c178b8f1bba807925ffddf3 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Dec 21 03:39:10 2007 -0800
+++ b/lisp/ChangeLog Fri Dec 21 16:51:30 2007 +0100
@@ -3,6 +3,23 @@ 2007-12-18 Mike Sperber <mike(a)xemacs.o
* autoload.el (process-one-lisp-autoload): Insert <immediate> into
the section header for immediate autoloads, to make sure the
upstream doesn't think there aren't any autoloads at all.
+
+2007-12-19 Mike Sperber <mike(a)xemacs.org>
+
+ * startup.el (ask-about-user-init-file-migration-p): Factored out
+ check.
+ (maybe-migrate-user-init-file):
+ (migrate-user-init-file): Don't do a backup of ~/.emacs anymore.
+ Instead, make only a manual adjustment of the file, if at all,
+ i.e. don't go through customize magic anymore.
+ (unmigrate-user-init-file): Don't use customize to set
+ `load-home-init-file' anymore.
+ (set-load-home-init-file): Add; performs the modification
+ previously done through customize.
+ (unmigrate-user-init-file): Use `set-load-home-init-file' instead
+ of customize.
+ (command-line-1): Only wait for the first event if we're not going
+ to ask about migration.
2007-12-18 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r ec1103d2c1c7f17396af875d6831bb049c8c0356 -r 6b571dc4ba3fe8413c178b8f1bba807925ffddf3 lisp/startup.el
--- a/lisp/startup.el Fri Dec 21 03:39:10 2007 -0800
+++ b/lisp/startup.el Fri Dec 21 16:51:30 2007 +0100
@@ -849,12 +849,16 @@ the menubar)."
(or (find-user-init-directory-init-file init-directory)
(find-user-home-directory-init-file home-directory))))
+(defun ask-about-user-init-file-migration-p ()
+ "Check whether we want to ask the user if she wants to migrate the init file."
+ (and (not load-home-init-file)
+ (not (find-user-init-directory-init-file user-init-directory))
+ (stringp user-init-file)
+ (file-readable-p user-init-file)))
+
(defun maybe-migrate-user-init-file ()
"Ask user if she wants to migrate the init file(s) to new location."
- (if (and (not load-home-init-file)
- (not (find-user-init-directory-init-file user-init-directory))
- (stringp user-init-file)
- (file-readable-p user-init-file))
+ (if (ask-about-user-init-file-migration-p)
(if (with-output-to-temp-buffer (help-buffer-name nil)
(progn
(princ "XEmacs recommends that the initialization code in
@@ -881,7 +885,8 @@ perform the migration at any time with M
user-init-directory
"? "))))
- (let ((backup (migrate-user-init-file)))
+ (progn
+ (migrate-user-init-file)
(with-output-to-temp-buffer (help-buffer-name nil)
(progn
(princ "The initialization code has now been migrated to the ")
@@ -890,46 +895,63 @@ perform the migration at any time with M
For backwards compatibility with, for example, older versions of XEmacs,
XEmacs can create a special old-style .emacs file in your home
-directory which will load the relocated initialization code.")
- (if backup
- (progn
- (princ "\nMoreover, a backup of your old .emacs file was created as\n")
- (princ backup)
- (princ ".\n")))
+directory which will load the relocated initialization code.
+
+NOTE THAT THIS WILL OVERWRITE YOUR EXISTING .emacs FILE!")
(show-temp-buffer-in-current-frame standard-output)
(maybe-create-compatibility-dot-emacs))))
- (customize-save-variable 'load-home-init-file t))))
+ (set-load-home-init-file user-init-file t))))
(defun maybe-create-compatibility-dot-emacs ()
"Ask user if she wants to create a .emacs compatibility file."
- (if (yes-or-no-p-minibuf "Create compatibility .emacs? ")
+ (if (yes-or-no-p-minibuf "Create compatibility .emacs?")
(create-compatibility-dot-emacs)))
(defun migrate-user-init-file ()
- "Migrate the init file from the home directory.
-Return the name of backup file, if one was created."
+ "Migrate the init file from the home directory."
(interactive)
(if (not (file-exists-p user-init-directory))
(progn
(message "Creating %s directory..." user-init-directory)
(make-directory user-init-directory)))
(message "Migrating custom file...")
- (let* ((backup (concat user-init-file ".backup"))
- (backup-p
- (and (not (file-exists-p backup))
- (progn
- (copy-file user-init-file backup)
- t))))
- (customize-set-value 'load-home-init-file nil)
- (custom-migrate-custom-file (make-custom-file-name user-init-file
- 'force-new))
- (message "Moving init file...")
- (let ((new-user-init-file (expand-file-name user-init-file-base
- user-init-directory)))
- (rename-file user-init-file new-user-init-file)
- (setq user-init-file new-user-init-file))
- (message "Migration done.")
- (and backup-p backup)))
+ (set-load-home-init-file user-init-file nil)
+ (setq custom-file (make-custom-file-name user-init-file 'force-new))
+ (custom-save-all)
+ (message "Copying init file...")
+ (let ((new-user-init-file (expand-file-name user-init-file-base
+ user-init-directory)))
+ (copy-file user-init-file new-user-init-file)
+ (setq user-init-file new-user-init-file))
+ (message "Migration done."))
+
+(defun set-load-home-init-file (filename val)
+ "Put code in `filename' to set `load-home-init-file' to `val'.
+More precisely, remove the first `setq' form for `load-home-init-file',
+and replace it by (setq load-home-init-file t) if `val' is non-nil."
+ (save-excursion
+ (set-buffer (find-file-noselect filename))
+ (goto-char (point-min))
+ (condition-case nil
+ (block find-existing
+ (while (not (eobp))
+ (forward-sexp 1)
+ (backward-sexp 1)
+ (let* ((beginning (point))
+ (sexp (read (current-buffer))))
+ (if (and (consp sexp)
+ (consp (cdr sexp))
+ (eq 'setq (car sexp))
+ (eq 'load-home-init-file (cadr sexp)))
+ (progn
+ (forward-line 1)
+ (delete-region beginning (point))
+ (return-from find-existing nil))
+ (forward-sexp 1)))))
+ (error nil)) ; ignore if there are no sexprs in the file
+ (if val
+ (insert "(setq load-home-init-file t) ; don't load init file from ~/.xemacs/init.el\n"))
+ (save-buffer)))
(defun create-compatibility-dot-emacs ()
"Create .emacs compatibility file for migrated setup."
@@ -965,8 +987,9 @@ Return the name of backup file, if one w
(rename-file user-init-file target-file-name 'ok-if-already-exists)
(setq user-init-file target-file-name)
(let ((old-custom-file custom-file))
- (custom-migrate-custom-file target-file-name)
- (customize-save-variable 'load-home-init-file t)
+ (setq custom-file target-file-name)
+ (custom-save-all)
+ (set-load-home-init-file user-init-file t)
(delete-file old-custom-file))))
(defun load-user-init-file ()
@@ -1089,7 +1112,8 @@ a new format, when variables have change
;; Don't clobber a non-scratch buffer if init file
;; has selected it.
- (when (string= (buffer-name) "*scratch*")
+ (when (and (string= (buffer-name) "*scratch*")
+ (not (ask-about-user-init-file-migration-p)))
(unless (or inhibit-startup-message
(input-pending-p))
(let (tmout)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Refactor and rename reproduce-bugs.el to reproduce-crashes.el.
17 years
Stephen Turnbull
changeset: 4346:ec1103d2c1c7f17396af875d6831bb049c8c0356
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Fri Dec 21 03:39:10 2007 -0800
files: tests/ChangeLog tests/reproduce-crashes.el
description:
Refactor and rename reproduce-bugs.el to reproduce-crashes.el.
2007-12-21 Stephen J. Turnbull <stephen(a)xemacs.org>
* reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do.
2007-12-21 Stephen J. Turnbull <stephen(a)…
[View More]xemacs.org>
* reproduce-bugs.el: Reorganize. Minor cosmetic improvements.
Update to-do list.
(defbug): Include status and docstring in value.
(bug-hashtable): Document the table format.
(reproduce-bug): Handle revised table format. Remove broken
autoload cookie.
(describe-bug): New function. Pop up description of one bug.
(list-bugs): New function. Pop up brief descriptions of all bugs.
(1,2,3,4,5,6,7,8,9,10,11): (Re)number all bugs. Move comments to
docstrings.
diff -r 748bbb699b0afaddac3c258c03c9c94c81eadf94 -r ec1103d2c1c7f17396af875d6831bb049c8c0356 tests/ChangeLog
--- a/tests/ChangeLog Fri Dec 21 03:33:35 2007 -0800
+++ b/tests/ChangeLog Fri Dec 21 03:39:10 2007 -0800
@@ -1,3 +1,7 @@ 2007-12-21 Stephen J. Turnbull <stephe
+2007-12-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do.
+
2007-12-21 Stephen J. Turnbull <stephen(a)xemacs.org>
* reproduce-bugs.el: Reorganize. Minor cosmetic improvements.
diff -r 748bbb699b0afaddac3c258c03c9c94c81eadf94 -r ec1103d2c1c7f17396af875d6831bb049c8c0356 tests/reproduce-crashes.el
--- a/tests/reproduce-crashes.el Fri Dec 21 03:33:35 2007 -0800
+++ b/tests/reproduce-crashes.el Fri Dec 21 03:39:10 2007 -0800
@@ -37,11 +37,9 @@
;; It's a bad idea to rely on code in this file continuing to work in
;; the same way. :-)
-;; #### This file should be cleaned up and renamed reproduce-crashes.el.
;; #### Bugs < 11 need to be tested and versions where they pass recorded.
;; #### Fixed bugs should become regression tests, maybe?
;; #### Non-crashes should be copied (not moved) to tests/automatic.
-;; #### Do the autoloads make any sense?
;; #### `list-bugs' should optionally sort on status.
;; #### Bugs that depend on features (eg, Mule) should check for them and
;; document them.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Rename reproduce-bugs.el to reproduce-crashes.el.
17 years
Stephen Turnbull
changeset: 4345:748bbb699b0afaddac3c258c03c9c94c81eadf94
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Fri Dec 21 03:33:35 2007 -0800
files: tests/reproduce-crashes.el
description:
Rename reproduce-bugs.el to reproduce-crashes.el.
diff -r 2511b50f39c687bf48494cc8a640f532b0544acb -r 748bbb699b0afaddac3c258c03c9c94c81eadf94 tests/reproduce-crashes.el
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproduce-crashes.el Fri Dec 21 03:33:35 2007 -0800
@…
[View More]@ -0,0 +1,277 @@
+;;; reproduce-bugs.el --- reproduce bugs in XEmacs
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997 Sun Microsystems, Inc.
+
+;; Keywords: bugs, crash, burn, die, croak, munge
+
+;; This file is part of XEmacs.
+
+;; This file is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; Reproduce XEmacs crashes, so that they can get fixed.
+;; A table of bugs is created. You can list, describe, or reproduce bugs.
+
+;; Non-crash bugs should not be in this file; they should be placed in
+;; an appropriate file in the tests/automated suite.
+;; You may need to use a debug version of XEmacs to reproduce some of these.
+
+;; For XEmacs maintainers and other masochists.
+;; It's a bad idea to rely on code in this file continuing to work in
+;; the same way. :-)
+
+;; #### This file should be cleaned up and renamed reproduce-crashes.el.
+;; #### Bugs < 11 need to be tested and versions where they pass recorded.
+;; #### Fixed bugs should become regression tests, maybe?
+;; #### Non-crashes should be copied (not moved) to tests/automatic.
+;; #### Do the autoloads make any sense?
+;; #### `list-bugs' should optionally sort on status.
+;; #### Bugs that depend on features (eg, Mule) should check for them and
+;; document them.
+
+;;; Code:
+
+;; UI entry points
+
+(defun reproduce-bug (number)
+ "Reproduce XEmacs bugs, so that they can get fixed.
+Especially, make XEmacs crash.
+See reproduce-bugs.el for bug descriptions and bug numbers.
+A debug version of XEmacs may be needed to reproduce some bugs."
+ (interactive "nBug Number: ")
+ (funcall (nth 0 (gethash number bug-hashtable))))
+
+(defun describe-bug (number &optional show-code)
+ "Describe the bug with index NUMBER in a popup window.
+If optional argument SHOW-CODE is non-nil, also display the reproduction code."
+ (interactive "nBug number: \ncShow code? [y/N] ")
+ (setq show-code (cond ((not (interactive-p)) show-code)
+ ((member show-code '(?y ?Y)) t)
+ (t nil)))
+ (with-displaying-temp-buffer (format "Bug %d" number)
+ (let ((bug (gethash number bug-hashtable)))
+ (princ (format "Bug #%d is %s.\n%s\n\n%s"
+ number
+ (nth 1 bug)
+ (nth 2 bug)
+ (if show-code (pp-to-string (nth 0 bug)) ""))))))
+
+(defun list-bugs ()
+ "List bugs most recent first, each with brief description in a popup window.
+Assumes a maximum of 999 bugs and a minimum of 80 column width window."
+ (interactive)
+ (with-displaying-temp-buffer "*Bug list*"
+ (princ " # status description\n")
+ (let (buglist)
+ (maphash (lambda (number bug)
+ (push (format "%3d %-9s %s"
+ number
+ (nth 1 bug)
+ (let ((description (nth 2 bug)))
+ (save-match-data
+ (string-match "\\(.*\\)\\(\n\\|$\\)"
+ description)
+ (match-string 1 description))))
+ buglist))
+ bug-hashtable)
+ (setq buglist (sort buglist (lambda (b1 b2) (string< b2 b1))))
+ (while buglist
+ (let ((bug (pop buglist)))
+ (princ (if (< (length bug) 79) bug (substring bug 0 78)))
+ (terpri))))))
+
+;; Database and utilities (internal)
+
+(defvar bug-hashtable (make-hashtable 10)
+ "Table of bugs, keyed by bug index number.
+The value is a list (LAMBDA STATUS DOCSTRING), where LAMBDA is a lambda
+expression reproducing the bug, and STATUS and DOCSTRING describe the bug.
+For details, see `defbug'.")
+
+(put 'defbug 'lisp-indent-function 'defun)
+(defmacro defbug (bug-number status docstring &rest body)
+ "Record a bug with key BUG-NUMBER and value (LAMBDA STATUS DOCSTRING).
+LAMBDA is a lambda expression which when called executes BODY.
+BUG-NUMBER is the bug's index number, a positive integer.
+STATUS is the current status of the bug, one of
+ fixed The bug has been diagnosed and fixed.
+ diagnosed The bug has been localized but not fixed.
+ current The bug has been reported and reproduced but cause is unknown.
+ legacy The bug is undocumented but presumed fixed.
+DOCSTRING should be a string describing the bug, including any relevant
+descriptive information and references to archived mailing list traffic or
+a BTS issue.
+BODY is a sequence of expressions to execute to reproduce the bug."
+ (let ((body (if (stringp docstring) body (cons docstring body)))
+ (docstring (if (stringp docstring) docstring "[docstring omitted]")))
+ `(puthash ,bug-number
+ '((lambda () ,@body) ,status ,docstring)
+ bug-hashtable)))
+
+(defconst bug-buffer
+ (save-excursion
+ (set-buffer (get-buffer-create "*Bug*"))
+ (erase-buffer)
+ (current-buffer)))
+
+
+;;; ------------------------------------------------------------------
+;;;; Bugs follow:
+
+(defbug 11 fixed
+ "Crash in search due to backward movement.
+Need Mule build with error checking in 21.5.28.
+Fatal error: assertion failed,
+file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487,
+(this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)
+Reported: <475B104F.2070807(a)barco.com>
+ <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
+Fixed: <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>"
+ (switch-to-buffer (get-buffer-create "*crash me*"))
+ ;; doozy is the keystroke equivalent of the keyboard macro
+ ;; "IAI" C-b C-b C-s C-x
+ (let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return
+ ?I ?A ?I
+ (control ?b) (control ?b)
+ (control ?s) (control ?w)]))
+ (execute-kbd-macro doozy)))
+
+
+(defbug 10 current
+ "Crash on trace-function
+Fatal error: assertion failed, file src/eval.c, line 1405, abort()"
+ (trace-function 'record-buffer bug-buffer)
+ (pop-to-buffer bug-buffer))
+
+
+(defbug 9 current
+ "Crashes with stack overflow
+Should give error via barf-if-buffer-read-only
+Fatal error: assertion failed, file src/eval.c, line 1874, abort()
+This bug has been fixed. -sb"
+ (switch-to-buffer bug-buffer)
+ ;; The following line should contain a number of eight-bit characters
+ (insert "²èÌÌËè€Î°ÜÆ°€Ï€Ç€€ë€è€Š€Ë€Ê€ê€Þ€·€¿¡£º£Åـϡ¢²èÌÌ€ÎÃæ€Ç¡¢ÆÃÄê€ÎŸì")
+ (setq buffer-read-only t)
+ (ignore-errors
+ (encode-coding-region (point-min) (point-max) 'euc-japan))
+ (garbage-collect))
+
+
+(defbug 8 current
+ "Crashes in debug version only
+Fatal error: assertion failed, file src/objects.h, line 149,
+RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj)"
+ (let (glyph ext)
+ (make-face 'adobe-symbol-face)
+ (set-face-font
+ 'adobe-symbol-face
+ "-adobe-symbol-medium-r-normal--*-140-*-*-p-*-adobe-fontspecific")
+ (setq glyph (make-glyph (list (vector 'string
+ :data (char-to-string ?\xD3)))))
+ (set-glyph-face glyph 'adobe-symbol-face)
+ (setq ext (make-extent 14 18))
+ (set-extent-property ext 'begin-glyph glyph)))
+
+
+(defbug 7 current
+ "(maybe?) crash koi8
+ACCL: Invalid command (c)
+With debugging on, crashes as follows:
+Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj)"
+ ;;(load "cyrillic")
+ ;;(load "cyrillic-hooks")
+ (princ (decode-coding-string "\xe1" 'koi8)))
+
+
+(defbug 6 current
+ "regexp crash
+This doesn't crash for me. -sb"
+ (string-match "\\(\\s-\\|$\\)" "å"))
+
+
+(defbug 5 legacy
+ "`subst-char-in-region' moves point."
+ (interactive)
+ (with-temp-buffer
+ (insert "abc")
+ (forward-char -1)
+ (subst-char-in-region 1 4 ?b ?\344)
+ (if (not (= (point) 3))
+ (message "Bug! point should equal 3 but is %d" (point)))))
+
+
+(defbug 4 legacy
+ "Infinite recursion crash - Segmentation Fault"
+ (switch-to-buffer bug-buffer)
+ (insert "abcdefg")
+ (setq e (make-extent 1 4))
+ (set-extent-property e 'face 'bold)
+ (set-extent-property e 'duplicable t)
+ (set-extent-property e 'replicating t)
+ (insert (buffer-string))
+ (delete-region 8 9))
+
+
+(defbug 3 current
+ "Completely Uninterruptible hang in re-search-backward (Was: java-mode)"
+ (switch-to-buffer bug-buffer)
+ (insert "{
+public static void main(String[] args) throws java.io.IOException
+ {
+ }
+}
+")
+ (goto-char (point-min))
+ (search-forward "{" nil nil 2)
+ (backward-char)
+ (re-search-backward
+ "^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s("))
+
+
+(defbug 2 legacy
+ "crash popup frames
+FIXED
+#### This bug is not understood, and may be incomplete. See source."
+ (lambda ()
+ (let ((f (selected-frame)))
+ (make-frame `(popup ,(selected-frame)))
+ (make-frame)
+ (sit-for 0)
+ (delete-frame f)
+ ;; #### Check whether this is needed.
+ ;; (save-buffers-kill-emacs5)
+ )))
+
+
+(defbug 1 legacy
+ "crash on delete-frame-hook
+FIXED!
+#### This bug is not understood, and seems to be incomplete. See source."
+ (lambda ()
+ ;; #### Should this be add-hook instead of setq?
+ (setq delete-frame-hook
+ (lambda (frame)
+ (select-frame frame)
+ (kill-buffer (window-buffer (frame-selected-window frame)))
+ ;; #### Do we need to delete a frame here or something?
+ ))))
+
+;;; reproduce-bugs.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Refactor reproduce-bugs.el to usable state.
17 years
Stephen Turnbull
changeset: 4344:2511b50f39c687bf48494cc8a640f532b0544acb
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Fri Dec 21 03:31:41 2007 -0800
files: tests/ChangeLog tests/reproduce-bugs.el
description:
Refactor reproduce-bugs.el to usable state.
diff -r fb73a2046d3ebae0ec2e0e8df2aaaa254113a458 -r 2511b50f39c687bf48494cc8a640f532b0544acb tests/ChangeLog
--- a/tests/ChangeLog Thu Dec 20 09:51:51 2007 -0700
+++ b/tests/ChangeLog Fri Dec 21 03:31:41 2007 -0800
@@ -1,3 …
[View More]+1,16 @@ 2007-12-11 Aidan Kehoe <kehoea@parhasa
+2007-12-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * reproduce-bugs.el: Reorganize. Minor cosmetic improvements.
+ Update to-do list.
+ (defbug): Include status and docstring in value.
+ (bug-hashtable): Document the table format.
+ (reproduce-bug): Handle revised table format. Remove broken
+ autoload cookie.
+ (describe-bug): New function. Pop up description of one bug.
+ (list-bugs): New function. Pop up brief descriptions of all bugs.
+ (1,2,3,4,5,6,7,8,9,10,11): (Re)number all bugs. Move comments to
+ docstrings.
+
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/syntax-tests.el:
diff -r fb73a2046d3ebae0ec2e0e8df2aaaa254113a458 -r 2511b50f39c687bf48494cc8a640f532b0544acb tests/reproduce-bugs.el
--- a/tests/reproduce-bugs.el Thu Dec 20 09:51:51 2007 -0700
+++ b/tests/reproduce-bugs.el Fri Dec 21 03:31:41 2007 -0800
@@ -1,4 +1,4 @@
-;;; reproduce-bugs.el --- reproduce bugs in XEmacs;
+;;; reproduce-bugs.el --- reproduce bugs in XEmacs
;; Copyright (C) 1997 Free Software Foundation, Inc.
;; Copyright (C) 1997 Sun Microsystems, Inc.
@@ -26,63 +26,126 @@
;;; Commentary:
-;; Reproduce XEmacs bugs, so that they can get fixed.
-;; Especially, make XEmacs crash.
+;; Reproduce XEmacs crashes, so that they can get fixed.
+;; A table of bugs is created. You can list, describe, or reproduce bugs.
+
+;; Non-crash bugs should not be in this file; they should be placed in
+;; an appropriate file in the tests/automated suite.
;; You may need to use a debug version of XEmacs to reproduce some of these.
-;; Several global keybindings are created, each of which exhibits a bug.
-
;; For XEmacs maintainers and other masochists.
-
;; It's a bad idea to rely on code in this file continuing to work in
;; the same way. :-)
;; #### This file should be cleaned up and renamed reproduce-crashes.el.
-;; #### Bugs need docstrings.
-;; #### Fixed bugs should become regression tests.
+;; #### Bugs < 11 need to be tested and versions where they pass recorded.
+;; #### Fixed bugs should become regression tests, maybe?
+;; #### Non-crashes should be copied (not moved) to tests/automatic.
+;; #### Do the autoloads make any sense?
+;; #### `list-bugs' should optionally sort on status.
+;; #### Bugs that depend on features (eg, Mule) should check for them and
+;; document them.
;;; Code:
-(defvar bug-hashtable (make-hashtable 10))
-
-(defmacro defbug (bug-number &rest body)
- `(puthash ,bug-number (lambda () ,@body) bug-hashtable))
-
-(put 'defbug 'lisp-indent-function 'defun)
-
-(defconst bug-buffer
- (save-excursion
- (set-buffer (get-buffer-create "*Bug*"))
- (erase-buffer)
- (current-buffer)))
-
-;;;####autoload
+;; UI entry points
+
(defun reproduce-bug (number)
"Reproduce XEmacs bugs, so that they can get fixed.
Especially, make XEmacs crash.
See reproduce-bugs.el for bug descriptions and bug numbers.
A debug version of XEmacs may be needed to reproduce some bugs."
(interactive "nBug Number: ")
- (funcall (gethash number bug-hashtable)))
-
-;;; Change this to your preferred key-binding
-
-;; (global-set-key [(control ?Z)] 'reproduce-bug)
-
+ (funcall (nth 0 (gethash number bug-hashtable))))
+
+(defun describe-bug (number &optional show-code)
+ "Describe the bug with index NUMBER in a popup window.
+If optional argument SHOW-CODE is non-nil, also display the reproduction code."
+ (interactive "nBug number: \ncShow code? [y/N] ")
+ (setq show-code (cond ((not (interactive-p)) show-code)
+ ((member show-code '(?y ?Y)) t)
+ (t nil)))
+ (with-displaying-temp-buffer (format "Bug %d" number)
+ (let ((bug (gethash number bug-hashtable)))
+ (princ (format "Bug #%d is %s.\n%s\n\n%s"
+ number
+ (nth 1 bug)
+ (nth 2 bug)
+ (if show-code (pp-to-string (nth 0 bug)) ""))))))
+
+(defun list-bugs ()
+ "List bugs most recent first, each with brief description in a popup window.
+Assumes a maximum of 999 bugs and a minimum of 80 column width window."
+ (interactive)
+ (with-displaying-temp-buffer "*Bug list*"
+ (princ " # status description\n")
+ (let (buglist)
+ (maphash (lambda (number bug)
+ (push (format "%3d %-9s %s"
+ number
+ (nth 1 bug)
+ (let ((description (nth 2 bug)))
+ (save-match-data
+ (string-match "\\(.*\\)\\(\n\\|$\\)"
+ description)
+ (match-string 1 description))))
+ buglist))
+ bug-hashtable)
+ (setq buglist (sort buglist (lambda (b1 b2) (string< b2 b1))))
+ (while buglist
+ (let ((bug (pop buglist)))
+ (princ (if (< (length bug) 79) bug (substring bug 0 78)))
+ (terpri))))))
+
+;; Database and utilities (internal)
+
+(defvar bug-hashtable (make-hashtable 10)
+ "Table of bugs, keyed by bug index number.
+The value is a list (LAMBDA STATUS DOCSTRING), where LAMBDA is a lambda
+expression reproducing the bug, and STATUS and DOCSTRING describe the bug.
+For details, see `defbug'.")
+
+(put 'defbug 'lisp-indent-function 'defun)
+(defmacro defbug (bug-number status docstring &rest body)
+ "Record a bug with key BUG-NUMBER and value (LAMBDA STATUS DOCSTRING).
+LAMBDA is a lambda expression which when called executes BODY.
+BUG-NUMBER is the bug's index number, a positive integer.
+STATUS is the current status of the bug, one of
+ fixed The bug has been diagnosed and fixed.
+ diagnosed The bug has been localized but not fixed.
+ current The bug has been reported and reproduced but cause is unknown.
+ legacy The bug is undocumented but presumed fixed.
+DOCSTRING should be a string describing the bug, including any relevant
+descriptive information and references to archived mailing list traffic or
+a BTS issue.
+BODY is a sequence of expressions to execute to reproduce the bug."
+ (let ((body (if (stringp docstring) body (cons docstring body)))
+ (docstring (if (stringp docstring) docstring "[docstring omitted]")))
+ `(puthash ,bug-number
+ '((lambda () ,@body) ,status ,docstring)
+ bug-hashtable)))
+
+(defconst bug-buffer
+ (save-excursion
+ (set-buffer (get-buffer-create "*Bug*"))
+ (erase-buffer)
+ (current-buffer)))
+
+
+;;; ------------------------------------------------------------------
;;;; Bugs follow:
-;;; ------------------------------------------------------------------
-;;; Crash in search due to backward movement
-;;; Need Mule build with error checking in 21.5.28.
-;;; Fatal error: assertion failed,
-;;; file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487,
-;;; (this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)
-;;; Reported: <475B104F.2070807(a)barco.com>
-;;; <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
-;;; Fixed: <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
-(defbug 10
+(defbug 11 fixed
+ "Crash in search due to backward movement.
+Need Mule build with error checking in 21.5.28.
+Fatal error: assertion failed,
+file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487,
+(this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)
+Reported: <475B104F.2070807(a)barco.com>
+ <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
+Fixed: <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>"
(switch-to-buffer (get-buffer-create "*crash me*"))
- ;; doozy is the keystroke version of the keyboard macro
+ ;; doozy is the keystroke equivalent of the keyboard macro
;; "IAI" C-b C-b C-s C-x
(let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return
?I ?A ?I
@@ -91,20 +154,18 @@ A debug version of XEmacs may be needed
(execute-kbd-macro doozy)))
-;;; ------------------------------------------------------------------
-;;; Crash on trace-function
-;;; Fatal error: assertion failed, file src/eval.c, line 1405, abort()
-(defbug 1
+(defbug 10 current
+ "Crash on trace-function
+Fatal error: assertion failed, file src/eval.c, line 1405, abort()"
(trace-function 'record-buffer bug-buffer)
(pop-to-buffer bug-buffer))
-;;; ------------------------------------------------------------------
-;;; Crashes with stack overflow
-;;; Should give error via barf-if-buffer-read-only
-;;; Fatal error: assertion failed, file src/eval.c, line 1874, abort()
-;; This bug has been fixed. -sb
-(defbug 2
+(defbug 9 current
+ "Crashes with stack overflow
+Should give error via barf-if-buffer-read-only
+Fatal error: assertion failed, file src/eval.c, line 1874, abort()
+This bug has been fixed. -sb"
(switch-to-buffer bug-buffer)
;; The following line should contain a number of eight-bit characters
(insert "²èÌÌËè€Î°ÜÆ°€Ï€Ç€€ë€è€Š€Ë€Ê€ê€Þ€·€¿¡£º£Åـϡ¢²èÌÌ€ÎÃæ€Ç¡¢ÆÃÄê€ÎŸì")
@@ -114,11 +175,10 @@ A debug version of XEmacs may be needed
(garbage-collect))
-;;; ------------------------------------------------------------------
-;;; Crashes in debug version only
-;;; Fatal error: assertion failed, file src/objects.h, line 149,
-;;; RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj)
-(defbug 3
+(defbug 8 current
+ "Crashes in debug version only
+Fatal error: assertion failed, file src/objects.h, line 149,
+RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj)"
(let (glyph ext)
(make-face 'adobe-symbol-face)
(set-face-font
@@ -131,20 +191,47 @@ A debug version of XEmacs may be needed
(set-extent-property ext 'begin-glyph glyph)))
-;;; ------------------------------------------------------------------
-;;; (maybe?) crash koi8
-;;; ACCL: Invalid command (c)
-;;; With debugging on, crashes as follows:
-;;; Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj)
-(defbug 5
+(defbug 7 current
+ "(maybe?) crash koi8
+ACCL: Invalid command (c)
+With debugging on, crashes as follows:
+Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj)"
;;(load "cyrillic")
;;(load "cyrillic-hooks")
(princ (decode-coding-string "\xe1" 'koi8)))
-;;; ------------------------------------------------------------------
-;;; Completely Uninterruptible hang in re-search-backward (Was: java-mode)
-(defbug 6
+(defbug 6 current
+ "regexp crash
+This doesn't crash for me. -sb"
+ (string-match "\\(\\s-\\|$\\)" "å"))
+
+
+(defbug 5 legacy
+ "`subst-char-in-region' moves point."
+ (interactive)
+ (with-temp-buffer
+ (insert "abc")
+ (forward-char -1)
+ (subst-char-in-region 1 4 ?b ?\344)
+ (if (not (= (point) 3))
+ (message "Bug! point should equal 3 but is %d" (point)))))
+
+
+(defbug 4 legacy
+ "Infinite recursion crash - Segmentation Fault"
+ (switch-to-buffer bug-buffer)
+ (insert "abcdefg")
+ (setq e (make-extent 1 4))
+ (set-extent-property e 'face 'bold)
+ (set-extent-property e 'duplicable t)
+ (set-extent-property e 'replicating t)
+ (insert (buffer-string))
+ (delete-region 8 9))
+
+
+(defbug 3 current
+ "Completely Uninterruptible hang in re-search-backward (Was: java-mode)"
(switch-to-buffer bug-buffer)
(insert "{
public static void main(String[] args) throws java.io.IOException
@@ -159,62 +246,32 @@ public static void main(String[] args) t
"^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s("))
-;;; ------------------------------------------------------------------
-;;; regexp crash
-;; This doesn't crash for me. -sb
-(defbug 7
- (string-match "\\(\\s-\\|$\\)" "å"))
-
-
-;;;; -------------------------------------------------------------------
-;;;; Bugs below this line have been fixed.
-;;;; Keep these for regression testing
-;;;; -------------------------------------------------------------------
-
-
-;;; ------------------------------------------------------------------
-;;; Infinite recursion crash - Segmentation Fault
-(defbug 4
- (switch-to-buffer bug-buffer)
- (insert "abcdefg")
- (setq e (make-extent 1 4))
- (set-extent-property e 'face 'bold)
- (set-extent-property e 'duplicable t)
- (set-extent-property e 'replicating t)
- (insert (buffer-string))
- (delete-region 8 9))
-
-(defbug 5
- (interactive)
- (with-temp-buffer
- (insert "abc")
- (forward-char -1)
- (subst-char-in-region 1 4 ?b ?\344)
- (if (not (= (point) 3))
- (message "Bug! point should equal 3 but is %d" (point)))))
-
-;;; crash popup frames FIXED
-;; defbug 8
-;;(global-set-key
-;; [(alt meta control f12)]
-;; (lambda ()
-;; (interactive)
-;; (let ((f (selected-frame)))
-;; (make-frame `(popup ,(selected-frame)))
-;; (make-frame)
-;; (sit-for 0)
-;; (delete-frame f)
-;; (save-buffers-kill-emacs))))
-
-;;; crash on delete-frame-hook - FIXED!
-;; defbug 9
-;;(global-set-key
-;; [(alt meta control f10)]
-;; (lambda ()
-;; (interactive)
-;; (setq delete-frame-hook
-;; (lambda (frame)
-;; (select-frame frame)
-;; (kill-buffer (window-buffer (frame-selected-window frame)))))))
+(defbug 2 legacy
+ "crash popup frames
+FIXED
+#### This bug is not understood, and may be incomplete. See source."
+ (lambda ()
+ (let ((f (selected-frame)))
+ (make-frame `(popup ,(selected-frame)))
+ (make-frame)
+ (sit-for 0)
+ (delete-frame f)
+ ;; #### Check whether this is needed.
+ ;; (save-buffers-kill-emacs5)
+ )))
+
+
+(defbug 1 legacy
+ "crash on delete-frame-hook
+FIXED!
+#### This bug is not understood, and seems to be incomplete. See source."
+ (lambda ()
+ ;; #### Should this be add-hook instead of setq?
+ (setq delete-frame-hook
+ (lambda (frame)
+ (select-frame frame)
+ (kill-buffer (window-buffer (frame-selected-window frame)))
+ ;; #### Do we need to delete a frame here or something?
+ ))))
;;; reproduce-bugs.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
[Q]: commit: Provide #'special-form-p, for the use of advice.el, perhaps other files.
17 years
Jerry James
QUERY
On Dec 18, 2007 1:51 PM, Aidan Kehoe <aidan-guest(a)alioth.debian.org> wrote:
> +DEFUN ("special-form-p", Fspecial_form_p, 1, 1, 0, /*
> +Return whether SUBR is a special form. SUBR must be built-in.
> +*/
> + (subr))
> +{
> + subr = indirect_function (subr, 1);
> + CHECK_SUBR (subr);
> +
> + return XSUBR (subr)->max_args == UNEVALLED ? Qt : Qnil;
> }
>
I personally hate predicates that throw errors. If I pass a string or an
integer …
[View More]to this function, I would like it to return nil. Would you object
to changing that code to something like this?
{
subr = indirect_function (subr, 0);
return (SUBRP (subr) && XSUBR (subr)->max_args == UNEVALLED) ? Qt : Qnil;
}
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]
commit: Fix unused parameter warnings when compiling with ALSA sound support.
17 years
Jerry James
changeset: 4343:fb73a2046d3ebae0ec2e0e8df2aaaa254113a458
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Thu Dec 20 09:51:51 2007 -0700
files: src/ChangeLog src/sound.c
description:
Fix unused parameter warnings when compiling with ALSA sound support.
2007-12-20 Jerry James <james(a)xemacs.org>
* sound.c: Fix unused parameter warnings when HAVE_ALSA_SOUND.
diff -r 4df309efe6fc5d5591b8d7f48b593083a55c36b4 -r …
[View More]fb73a2046d3ebae0ec2e0e8df2aaaa254113a458 src/ChangeLog
--- a/src/ChangeLog Thu Dec 20 02:58:07 2007 -0800
+++ b/src/ChangeLog Thu Dec 20 09:51:51 2007 -0700
@@ -1,3 +1,7 @@ 2007-12-18 Kenny Chien <Kenny.Chien@mor
+2007-12-20 Jerry James <james(a)xemacs.org>
+
+ * sound.c: Fix unused parameter warnings when HAVE_ALSA_SOUND.
+
2007-12-18 Kenny Chien <Kenny.Chien(a)morganstanley.com>
* extw-Xt.c (extw_wait_for_response): Don't use undocumented
diff -r 4df309efe6fc5d5591b8d7f48b593083a55c36b4 -r fb73a2046d3ebae0ec2e0e8df2aaaa254113a458 src/sound.c
--- a/src/sound.c Thu Dec 20 02:58:07 2007 -0800
+++ b/src/sound.c Thu Dec 20 09:51:51 2007 -0700
@@ -64,7 +64,7 @@ Boston, MA 02111-1307, USA. */
#endif
#if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND) \
- || defined(HAVE_ESD_SOUND)
+ || defined(HAVE_ALSA_SOUND) || defined(HAVE_ESD_SOUND)
#define USED_IF_HAVE_ANY(decl) decl
#else
#define USED_IF_HAVE_ANY(decl) UNUSED (decl)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[View Less]