# HG changeset patch # User Ben Wing # Date 1263107175 21600 # Node ID 4dd2389173fcab244e41d7d750e142721454a2ca # Parent 07fa38c30fdfc12d810aa8343abe7b7f1ba33ce3# Parent 50102dde8ab24899473ebf2fb01d88604ed196ce merge diff -r 07fa38c30fdf -r 4dd2389173fc ChangeLog --- a/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,8 @@ +2010-01-06 Jerry James + + * configure.ac: Add --with-valgrind option. + * configure: Regenerate. + 2009-12-21 Jerry James * INSTALL: Remove references to OffiX. diff -r 07fa38c30fdf -r 4dd2389173fc configure --- a/configure Sun Jan 10 00:49:30 2010 -0600 +++ b/configure Sun Jan 10 01:06:15 2010 -0600 @@ -1017,6 +1017,8 @@ with_quantify enable_purify with_purify +enable_valgrind +with_valgrind with_x ' ac_precious_vars='build_alias @@ -1974,6 +1976,7 @@ trigger bugs in some compilers. --with-quantify Support performance debugging using Quantify. --with-purify Support memory debugging using Purify. + --with-valgrind Support memory debugging using Valgrind. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -5335,6 +5338,22 @@ withval="$with_purify" fi; +# If --with-valgrind or --without-valgrind were given then copy the value to the +# equivalent enable_valgrind variable. +if test "${with_valgrind+set}" = set; then + enable_valgrind="$with_valgrind" +fi; +# If -enable-valgrind or --disable-valgrind were given then copy the value to the +# equivalent with_valgrind variable. +if test "${enable_valgrind+set}" = set; then + with_valgrind="$enable_valgrind" +fi; +# Check whether --with-valgrind or --without-valgrind was given. +if test "${with_valgrind+set}" = set; then + enableval="$with_valgrind" + withval="$with_valgrind" + +fi; if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then test "$with_system_malloc" = "default" && with_system_malloc=yes @@ -20635,6 +20654,8 @@ test "$with_quantify" = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h +test "$with_valgrind" = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h + test "$with_pop" = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h test "$with_kerberos" = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h @@ -20948,6 +20969,7 @@ echo " WARNING: Error checking is on by default for XEmacs beta releases." echo " WARNING: ---------------------------------------------------------" fi +test "$with_valgrind" = yes && echo " Compiling in support for memory debugging with Valgrind." echo "" ) | tee -a Installation echo "" diff -r 07fa38c30fdf -r 4dd2389173fc configure.ac --- a/configure.ac Sun Jan 10 00:49:30 2010 -0600 +++ b/configure.ac Sun Jan 10 01:06:15 2010 -0600 @@ -1014,6 +1014,9 @@ XE_MERGED_ARG([purify], AS_HELP_STRING([--with-purify],[Support memory debugging using Purify.]), [], []) +XE_MERGED_ARG([valgrind], + AS_HELP_STRING([--with-valgrind],[Support memory debugging using Valgrind.]), + [], []) dnl ------------------------------------------------------------------------- dnl Final command line argument checks. @@ -5491,6 +5494,7 @@ test "$enable_quick_build" = "yes" && AC_DEFINE(QUICK_BUILD) test "$with_purify" = "yes" && AC_DEFINE(PURIFY) test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) +test "$with_valgrind" = "yes" && AC_DEFINE(USE_VALGRIND) test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) @@ -5806,6 +5810,7 @@ echo " WARNING: Error checking is on by default for XEmacs beta releases." echo " WARNING: ---------------------------------------------------------" fi +test "$with_valgrind" = yes && echo " Compiling in support for memory debugging with Valgrind." echo "" ) | tee -a Installation dnl echo "The above configure report is appended to \"Installation\" file." diff -r 07fa38c30fdf -r 4dd2389173fc etc/ChangeLog --- a/etc/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/etc/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,8 @@ +2010-01-04 Jerry James + + * Emacs.ad: Change /usr/lib/X11 to /usr/share/X11. + * xemacs.1: Ditto. + 2009-12-18 Jerry James * idd/drop: Remove. diff -r 07fa38c30fdf -r 4dd2389173fc etc/Emacs.ad --- a/etc/Emacs.ad Sun Jan 10 00:49:30 2010 -0600 +++ b/etc/Emacs.ad Sun Jan 10 01:06:15 2010 -0600 @@ -9,7 +9,7 @@ ! changes to .../etc/Emacs.ad made after XEmacs has been built will have no ! effect. ! -! However, you may copy .../etc/Emacs.ad to /usr/lib/X11/app-defaults/Emacs +! However, you may copy .../etc/Emacs.ad to /usr/share/X11/app-defaults/Emacs ! (or whatever the standard app-defaults directory is at your site) to cause ! it to be consulted at run-time. (Do this only for site-wide customizations: ! personal customizations should be put into ~/.Xresources instead.) diff -r 07fa38c30fdf -r 4dd2389173fc etc/xemacs.1 --- a/etc/xemacs.1 Sun Jan 10 00:49:30 2010 -0600 +++ b/etc/xemacs.1 Sun Jan 10 01:06:15 2010 -0600 @@ -288,7 +288,7 @@ Sets the color of the text. See the file -.I /usr/lib/X11/rgb.txt +.I /usr/share/X11/rgb.txt for a list of valid color names. .TP diff -r 07fa38c30fdf -r 4dd2389173fc lisp/ChangeLog --- a/lisp/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,55 @@ +2010-01-09 Didier Verna + + * x-faces.el (x-init-global-faces): Deactivate obsolete code. + * x-faces.el (x-init-device-faces): Ditto. + * x-faces.el (x-init-frame-faces): Ditto. + +2010-01-09 Didier Verna + + * glyphs.el (init-glyphs): Recognize bitmaps/ directory as + containing bitmap files. + +2010-01-09 Aidan Kehoe + + * subr.el (with-trapping-errors): + Fix a bug here, where I used a normal quote instead of a + backquote. Thank you the byte-compiler. + +2010-01-08 Aidan Kehoe + + * indent.el (indent-region): + Make COLUMN optional as in GNU, merging Andreas Roehler's change + of http://mid.gmane.org/4B46F5FC.2070506@online.de ; thank you + Andreas! + +2010-01-07 Aidan Kehoe + + * cl-macs.el (map): + Add a compiler macro for this function, for cases where CL-TYPE is + constant and understood. + +2010-01-07 Aidan Kehoe + + * unicode.el (load-unicode-tables): + * mule/mule-msw-init-late.el: + * mule/mule-category.el (predefined-category-list): + * mule/arabic.el: + Move arabic-iso8859-6 back to C, it needs to be there, otherwise + X11 character input lookup fails. + +2010-01-06 Didier Verna + + * cl-extra.el (get-properties): New. + +2009-12-31 Aidan Kehoe + + * list-mode.el (next-list-mode-item, switch-to-completions): Use + next-single-char-property-change, + previous-single-char-property-change now + next-single-property-change no longer pays attention to extents + not created using the text property functions. Fix for issue 546, + bug dates from changeset 8c96bdabcaf9. + 2009-12-21 Jerry James * dragdrop.el (offix-start-drag): Remove. @@ -12,64 +64,71 @@ 2009-12-21 Aidan Kehoe - * mule/arabic.el (arabic-iso8859-6): + * mule/arabic.el (arabic-iso8859-6): Move the creation of this character set to this (dumped) file, - since it's needed for input on X11. - * mule/iso-with-esc.el: + since it's needed for input on X11. + * mule/iso-with-esc.el: Remove arabic-iso8859-6 and its Unicode map from this file. - * unicode.el (load-unicode-tables): + * unicode.el (load-unicode-tables): Load arabic-iso8859-6 on startup again. +2009-12-19 Aidan Kehoe + + * cl-macs.el (cl-do-arglist): + * cl-compat.el (keyword-of): + Remove support in our generated code for emacs versions where + keywords are not self-quoting. + 2009-12-18 Aidan Kehoe - * alist.el (modify-alist): - * autoload.el (update-autoload-files, autoload-print-form): + * alist.el (modify-alist): + * autoload.el (update-autoload-files, autoload-print-form): * bytecomp.el (batch-byte-compile-1) (byte-compile-multiple-value-call, byte-compile-funcall) (byte-compile-insert, byte-compile-concat, byte-compile-list) - (byte-compile-normal-call, byte-compile-flush-pending): - * cl-macs.el (letf): + (byte-compile-normal-call, byte-compile-flush-pending): + * cl-macs.el (letf): * cl.el: - * disass.el (disassemble-1): - * easy-mmode.el (easy-mmode-define-syntax): - * faces.el (set-face-parent): - * files.el (cd): + * disass.el (disassemble-1): + * easy-mmode.el (easy-mmode-define-syntax): + * faces.el (set-face-parent): + * files.el (cd): * finder.el (finder-list-matches, finder-list-keywords) - (finder-compile-keywords): + (finder-compile-keywords): * frame.el (frame-notice-user-settings) - (frame-remove-geometry-props): + (frame-remove-geometry-props): * ldap.el (ldap-delete-entries, ldap-modify-entries) - (ldap-add-entries): - * loadhist.el (unload-feature): - * map-ynp.el (map-y-or-n-p): - * menubar-items.el (default-menubar): + (ldap-add-entries): + * loadhist.el (unload-feature): + * map-ynp.el (map-y-or-n-p): + * menubar-items.el (default-menubar): * mouse.el (default-mouse-track-next-move-rect) (default-mouse-track-next-move-rect) (default-mouse-track-cleanup-hook) - (default-mouse-track-cleanup-extent): + (default-mouse-track-cleanup-extent): * mule/ethio-util.el (ethio-fidel-to-sera-buffer) - (ethio-modify-vowel): - * obsolete.el: - * package-get.el (package-get-update-all): + (ethio-modify-vowel): + * obsolete.el: + * package-get.el (package-get-update-all): * package-ui.el (pui-list-packages) - (pui-install-selected-packages, pui-install-selected-packages): + (pui-install-selected-packages, pui-install-selected-packages): * select.el (select-make-extent-for-selection) - (dehilight-selection): - * simple.el (clone-buffer): - * term/tvi970.el: - * term/wyse50.el: - * unicode.el: - (load-unicode-tables): + (dehilight-selection): + * simple.el (clone-buffer): + * term/tvi970.el: + * term/wyse50.el: + * unicode.el: + (load-unicode-tables): * x-font-menu.el (fc-make-font-menu-entry) - (x-reset-device-font-menus-xft): - * x-misc.el (x-init-specifier-from-resources): + (x-reset-device-font-menus-xft): + * x-misc.el (x-init-specifier-from-resources): Eliminate byte-compile warnings, with the exception of Stephen's various non-defined fontconfig functions, as I don't know if he plans to add them and is keeping the warnings around as a reminder. The warnings actually eliminated involve i) using mapcar instead of mapc where the result is discarded and ii) using a lambda quoted as data in a context where it is unequivocally used - as a function. + as a function. 2009-12-17 Aidan Kehoe @@ -81,11 +140,30 @@ that they are *that* fast, for most of the coding systems they're used a minority of the time. +2010-01-01 Aidan Kehoe + + * syntax.el (map-syntax-table): + * subr.el (map-plist): + * startup.el (load-init-file): + * minibuf.el (read-from-minbuffer): + * cus-edit.el (custom-load-custom-defines-1): + * cmdloop.el (execute-extended-command): + Replace symbol names using underscore, whether to avoid dynamic + scope problems or to ensure helpful arguments to + #'call-with-condition-handler, with uninterned symbols. + 2009-12-05 Stephen J. Turnbull * font.el (x-font-create-object): Check for Xft before using it. This fixes the symptom in openSUSE bug #558764. +2010-01-09 Aidan Kehoe + + * descr-text.el (describe-char-unihan-field-descriptions): + * cl-macs.el: + Use keywords, not ordinary symbols, in the hash table read syntax, + for compatibility with Common Lisp and recent GNU Emacs. + 2009-11-10 Jerry James * device.el (device-type): Remove (mostly imaginary) support for @@ -103,20 +181,20 @@ 2009-11-15 Aidan Kehoe - * custom.el (custom-quote): + * custom.el (custom-quote): Define this as an alias for `quote-maybe', which is in C and more comprehensive; packages still use this name in places. (customize-mark-to-save, customize-mark-as-set): Use `quote-maybe', not `custom-quote'. * cus-edit.el (customize-set-variable, customize-save-variable) (custom-variable-value-create, custom-variable-set) - (custom-variable-pre-save): + (custom-variable-pre-save): Remove a version of `custom-quote' specific to this file; use `quote-maybe' universally instead. 2009-11-14 Aidan Kehoe - * bytecomp.el (byte-compile-funarg-n): + * bytecomp.el (byte-compile-funarg-n): New macro, used to create the various byte-compile-funarg functions, which check for quoted lambdas in given positions. (byte-compile-funarg, byte-compile-funarg-2) @@ -126,21 +204,21 @@ to this problem. Be much more comprehensive in the functions that we use byte-compile-funarg and related function to compile, especially - including functions from cl-seq.el. + including functions from cl-seq.el. 2009-11-14 Aidan Kehoe - * cl-macs.el (letf): + * cl-macs.el (letf): Check whether arguments to #'values are bound, and make them unbound after evaluating BODY; document the limitations of this macro. 2009-11-14 Aidan Kehoe - * faces.el (init-other-random-faces): + * faces.el (init-other-random-faces): If the modeline face is using its fallbacks, avoid that, specify the corresponding problems instead. Fixes problems described in - http://mid.gmane.org/3ggprc2diyt.wl_Ron.Isaacson@morganstanley.com + http://mid.gmane.org/3ggprc2diyt.wl_Ron.Isaacson@morganstanley.com 2009-11-09 Didier Verna @@ -151,14 +229,27 @@ 2009-11-08 Aidan Kehoe - * bytecomp.el (save-window-excursion): + * bytecomp.el (save-window-excursion): Remove the compiler form for this bytecode, we no longer generate calls to it. Keep the information about the bytecode's numeric value, we want that for disassembling code. +2009-11-08 Aidan Kehoe + + * cl-extra.el (cl-string-vector-equalp) + (cl-bit-vector-vector-equalp, cl-vector-array-equalp) + (cl-hash-table-contents-equalp): New functions, to implement + equalp treating arrays with identical contents as equivalent, as + specified by Common Lisp. + (equalp): Revise this function to implement array equivalence, + and the hash-table equalp behaviour specified by CL. + * cl-macs.el (equalp): Add a compiler macro for this function, + used when one of the arguments is constant, and as such, its type + is known at compile time. + 2009-11-01 Aidan Kehoe - * cl-extra.el (equalp): + * cl-extra.el (equalp): Don't error if handed a string and a non-string. 2009-11-01 Stephen Turnbull @@ -214,7 +305,7 @@ 2009-10-30 Aidan Kehoe - * cl-macs.el (regexp-quote): + * cl-macs.el (regexp-quote): If STRING is constant, call regexp-quote at compile time. 2009-10-24 Aidan Kehoe @@ -225,32 +316,32 @@ New function; return t if file names under PATH should be treated case-insensitively. * minibuf.el (read-file-name-1, read-file-name-internal-1) - (read-file-name-internal-1): - * package-admin.el (package-admin-check-manifest): + (read-file-name-internal-1): + * package-admin.el (package-admin-check-manifest): Use file-system-ignore-case-p instead of checking system-type directly in these functions. (Even though minibuf.el is dumped before files.el, the function is only called in interactive usage, - there's no dump time order dependency here.) + there's no dump time order dependency here.) 2009-10-19 Aidan Kehoe - * bytecomp.el (byte-compile-default-warnings): + * bytecomp.el (byte-compile-default-warnings): Add two new warning types, discarded-consing (basically use of mapcar instead of mapc where its result is discarded) and quoted-lambda (use of a lambda expression quoted as data in a function context). - (byte-compile-warnings): Document the new warnings. + (byte-compile-warnings): Document the new warnings. (byte-compile-fset, byte-compile-funarg): Implement the - quoted-lambda warning option. + quoted-lambda warning option. (byte-compile-mapcar): Renamed to byte-compile-maybe-mapc. - (byte-compile-maybe-mapc, byte-compile-maplist): - Implement the discarded-consing warning option. + (byte-compile-maybe-mapc, byte-compile-maplist): + Implement the discarded-consing warning option. Add more functions that should be compiled using byte-compile-funarg, notably mapvector, mapc-internal, - map-char-table. - * cl-macs.el (mapcar*): + map-char-table. + * cl-macs.el (mapcar*): If we know at compile time that there are no CL options being - used, use the mapcar subr, not the byte-coded function. + used, use the mapcar subr, not the byte-coded function. 2009-10-12 Aidan Kehoe @@ -262,13 +353,13 @@ mapc-internal call instead, and warn, because the programmer probably can't rely on always being compiled by an XEmacs that does this. Similarly for maplist and mapl; and use - byte-compile-funarg for map, mapl, mapcan, mapcon. + byte-compile-funarg for map, mapl, mapcan, mapcon. 2009-10-12 Aidan Kehoe - * cl-macs.el (delete-duplicates): + * cl-macs.el (delete-duplicates): Fix another bug in the delete-duplicates compiler macro, thank you - the byte compiler. + the byte compiler. 2009-10-07 Andreas Roehler @@ -305,7 +396,7 @@ 2009-10-03 Aidan Kehoe - * cl-macs.el (delete-duplicates): + * cl-macs.el (delete-duplicates): Make this compiler macro aware that CL-SEQ is a sequence, which may not necessarily be a list. @@ -323,66 +414,66 @@ 2009-09-27 Aidan Kehoe - * cus-edit.el (custom-variable-prompt): + * cus-edit.el (custom-variable-prompt): nil is a symbol, check that variable-at-point is non-nil before checking if it's a symbol when deciding on the prompt used in this - function. + function. 2009-09-22 Andreas Roehler * lisp.el (beginning-of-defun-raw): - new variable: beginning-of-defun-function, + new variable: beginning-of-defun-function, beginning-of-defun may call FUNCTION determining start position * lisp.el (end-of-defun): - new variable: end-of-defun-function, + new variable: end-of-defun-function, end-of-defun may call FUNCTION determining the end position 2009-09-20 Aidan Kehoe Add arglist information to docstrings for autoloaded functions and macros. - * hyper-apropos.el (hyper-apropos-get-doc): + * hyper-apropos.el (hyper-apropos-get-doc): Treat autoload docstrings like subr docstrings; correct the regexp used. - * help.el (describe-function-show-arglist): - This no longer treats autoloads specially. - (function-arglist): Treat autoload docstrings like subr docstrings. + * help.el (describe-function-show-arglist): + This no longer treats autoloads specially. + (function-arglist): Treat autoload docstrings like subr docstrings. (function-documentation): Treat documentation strings that are zero-length after the arglist has been removed as indicating a lack of documentation. - * cl-macs.el (case): - (ecase): - (typecase): - (etypecase): - (block): - (return): - (return-from): - (progv): - (lexical-let): - (lexical-let*): - (remf): - (callf): - (callf2): - (define-modify-macro): - (deftype): - (define-compiler-macro): + * cl-macs.el (case): + (ecase): + (typecase): + (etypecase): + (block): + (return): + (return-from): + (progv): + (lexical-let): + (lexical-let*): + (remf): + (callf): + (callf2): + (define-modify-macro): + (deftype): + (define-compiler-macro): Rely on the autoload code to always show an arglist for these functions, don't supply an ad-hoc one in the docstring. These changes are for the most obvious functions; there are some missed that would require changing argument names in the docstring or in the function bodies. - * autoload.el (make-autoload): + * autoload.el (make-autoload): Add arg list information to the doc string, using the same approach as for subrs. 2009-09-20 Aidan Kehoe - * help.el (function-arglist): - Show the double-quotes in the sample output, correctly. - Bind print-gensym to nil, now we're using uninterned symbols. + * help.el (function-arglist): + Show the double-quotes in the sample output, correctly. + Bind print-gensym to nil, now we're using uninterned symbols. Don't #'mapcar + #'intern to create uppercase symbols, use #'loop and #'make-symbol instead. - * cl-macs.el (cl-upcase-arg): + * cl-macs.el (cl-upcase-arg): Don't intern the upcased symbols we're using for cosmetic reasons. Trust #'true-list-p in #'cl-function-arglist to detect circularity. @@ -395,82 +486,82 @@ 2009-09-20 Aidan Kehoe - * mule/make-coding-system.el (make-coding-system): + * mule/make-coding-system.el (make-coding-system): Require a minimum of two, not four, arguments; thank you for the problem report, Adam Sjøgren! 2009-09-19 Aidan Kehoe Move the #'query-coding-region implementation to C. - * coding.el: + * coding.el: Consolidate code that depends on the presence or absence of Mule - at the end of this file. + at the end of this file. (default-query-coding-region, query-coding-region): - Move these functions to C. + Move these functions to C. (default-query-coding-region-safe-charset-skip-chars-map): Remove this variable, the corresponding C variable is - Vdefault_query_coding_region_chartab_cache in file-coding.c. + Vdefault_query_coding_region_chartab_cache in file-coding.c. (query-coding-string): Update docstring to reflect actual multiple values, be more careful about not modifying a range table that we're currently mapping over. (encode-coding-char): Make the implementation of this simpler. (featurep 'mule): Autoload #'make-coding-system from mule/make-coding-system.el if we're a mule build; provide an - appropriate compiler macro. + appropriate compiler macro. Do various non-mule compatibility things if we're not a mule - build. - * update-elc.el (additional-dump-dependencies): + build. + * update-elc.el (additional-dump-dependencies): Add mule/make-coding-system as a dump time dependency if we're a - mule build. - * unicode.el (ccl-encode-to-ucs-2): - (decode-char): - (encode-char): + mule build. + * unicode.el (ccl-encode-to-ucs-2): + (decode-char): + (encode-char): Move these earlier in the file, for the sake of some byte compile - warnings. - (unicode-query-coding-region): + warnings. + (unicode-query-coding-region): Move this to unicode.c * mule/make-coding-system.el: New file, not dumped. Contains the functionality to rework the arguments necessary for fixed-width coding systems, and contains the implementation of #'make-coding-system, which now calls #'make-coding-system-internal. - * mule/vietnamese.el (viscii): - * mule/latin.el (iso-8859-2): - (windows-1250): - (iso-8859-3): - (iso-8859-4): - (iso-8859-14): - (iso-8859-15): - (iso-8859-16): - (iso-8859-9): - (macintosh): - (windows-1252): - * mule/hebrew.el (iso-8859-8): - * mule/greek.el (iso-8859-7): - (windows-1253): - * mule/cyrillic.el (iso-8859-5): - (koi8-r): - (koi8-u): - (windows-1251): - (alternativnyj): - (koi8-ru): - (koi8-t): - (koi8-c): - (koi8-o): - * mule/arabic.el (iso-8859-6): - (windows-1256): + * mule/vietnamese.el (viscii): + * mule/latin.el (iso-8859-2): + (windows-1250): + (iso-8859-3): + (iso-8859-4): + (iso-8859-14): + (iso-8859-15): + (iso-8859-16): + (iso-8859-9): + (macintosh): + (windows-1252): + * mule/hebrew.el (iso-8859-8): + * mule/greek.el (iso-8859-7): + (windows-1253): + * mule/cyrillic.el (iso-8859-5): + (koi8-r): + (koi8-u): + (windows-1251): + (alternativnyj): + (koi8-ru): + (koi8-t): + (koi8-c): + (koi8-o): + * mule/arabic.el (iso-8859-6): + (windows-1256): Move all these coding systems to being of type fixed-width, not of type CCL. This allows the distinct query-coding-region for them to be in C, something which will eventually allow us to implement query-coding-region for the mswindows-multibyte coding systems. - * mule/general-late.el (posix-charset-to-coding-system-hash): + * mule/general-late.el (posix-charset-to-coding-system-hash): Document why we're pre-emptively persuading the byte compiler that the ELC for this file needs to be written using escape-quoted. Call #'set-unicode-query-skip-chars-args, now the Unicode - query-coding-region implementation is in C. - * mule/thai-xtis.el (tis-620): + query-coding-region implementation is in C. + * mule/thai-xtis.el (tis-620): Don't bother checking whether we're XEmacs or not here. - * mule/mule-coding.el: + * mule/mule-coding.el: Move the eight bit fixed-width functionality from this file to make-coding-system.el. @@ -485,44 +576,44 @@ * simple.el (handle-pre-motion-command-current-command-is-motion): If KEY is a character, ascertain that once, not every iteration of the loop. - * mule/mule-cmds.el (finish-set-language-environment): + * mule/mule-cmds.el (finish-set-language-environment): Don't call #'string-match on a one-character string, use functions that have bytecodes instead, since this is called so often on - startup. + startup. 2009-08-31 Aidan Kehoe - * byte-optimize.el (byte-optimize-form-code-walker): + * byte-optimize.el (byte-optimize-form-code-walker): Be careful about discarding multiple values when optimising - #'prog1 calls. - (byte-optimize-or): + #'prog1 calls. + (byte-optimize-or): Preserve any trailing nil, as this is a supported way to explicitly discard multiple values. (byte-optimize-cond-1): Discard multiple values with a singleton followed by no more clauses. - * bytecomp.el (progn): + * bytecomp.el (progn): (prog1): (prog2): Be careful about discarding multiple values in the byte-hunk - handler of these three forms. + handler of these three forms. * bytecomp.el (byte-compile-prog1, byte-compile-prog2): Don't call #'values explicitly, use `(or ,(pop form) nil) instead, since that compiles to bytecode, not a funcall. - * bytecomp.el (byte-compile-values): + * bytecomp.el (byte-compile-values): With one non-const argument, byte-compile to `(or ,(second form) nil), not an explicit #'values call. - * bytecomp.el (byte-compile-insert-header): + * bytecomp.el (byte-compile-insert-header): Be nicer in the error message to emacs versions that don't understand our bytecode. 2009-08-27 Aidan Kehoe * cl.el (bytecomp-load-hook): New. - * bytecomp.el (bytecomp-load-hook): Use id. + * bytecomp.el (bytecomp-load-hook): Use id. Merge Dave Love's 2000-02-02 GNU (GPLv2) change, forcing the byte-compiler to be more consistent about loading cl-macs at - compile time. + compile time. 2009-08-19 Malcolm Purvis @@ -537,7 +628,7 @@ 2009-08-16 Aidan Kehoe - * faces.el (xpm-color-symbols): + * faces.el (xpm-color-symbols): Call (featurep 'x) when faces.elc is dumped, not repeatedly (myriad times) at image instantiation time. @@ -548,17 +639,17 @@ 2009-08-14 Aidan Kehoe - * minibuf.el (read-from-minibuffer): + * minibuf.el (read-from-minibuffer): Use buffer (format " *Minibuf-%d*" (minibuffer-depth)), regardless - of depth. + of depth. 2009-08-11 Aidan Kehoe - * cl-extra.el (ceiling*, floor*, round*, truncate*): + * cl-extra.el (ceiling*, floor*, round*, truncate*): Implement these in terms of the C functions; mark them as - obsolete. + obsolete. (mod*, rem*): Use #'nth-value with the C functions, not #'nth with - the CL emulation functions. + the CL emulation functions. 2009-08-11 Aidan Kehoe @@ -568,10 +659,10 @@ -- Four new bytecodes, and special compiler functions to compile multiple-value-call, multiple-value-list-internal, values, values-list, and, since it now needs to pass back multiple values - and is a special form, throw. + and is a special form, throw. -- There's a new compiler variable, byte-compile-checks-on-load, which is a list of forms that are evaluated at the very start of a - file, with an error thrown if any of them give nil. + file, with an error thrown if any of them give nil. -- The header is now inserted *after* compilation, giving a chance for the compilation process to influence what those checks are. There is still a check done before compilation for non-ASCII @@ -580,73 +671,73 @@ Space is reserved for checks; comments describing the version of the byte compiler generating the file are inserted if space remains for them. - * bytecomp.el (byte-compile-version): + * bytecomp.el (byte-compile-version): Update this, we're a newer version of the byte compiler. - * byte-optimize.el (byte-optimize-funcall): + * byte-optimize.el (byte-optimize-funcall): Correct a comment. - * bytecomp.el (byte-compile-lapcode): + * bytecomp.el (byte-compile-lapcode): Discard the arg with byte-multiple-value-call. - * bytecomp.el (byte-compile-checks-and-comments-space): + * bytecomp.el (byte-compile-checks-and-comments-space): New variable, describe how many octets to reserve for checks at - the start of byte-compiled files. - * cl-compat.el: + the start of byte-compiled files. + * cl-compat.el: Remove the fake multiple-value implementation. Have the functions - that use it use the real multiple-value implementation instead. - * cl-macs.el (cl-block-wrapper, cl-block-throw): + that use it use the real multiple-value implementation instead. + * cl-macs.el (cl-block-wrapper, cl-block-throw): Revise the byte-compile properties of these symbols to work now we've made throw into a special form; keep the byte-compile properties as anonymous lambdas, since we don't have docstrings - for them. + for them. * cl-macs.el (multiple-value-bind, multiple-value-setq) - (multiple-value-list, nth-value): + (multiple-value-list, nth-value): Update these functions to work with the C support for multiple values. - * cl-macs.el (values): + * cl-macs.el (values): Modify the setf handler for this to call #'multiple-value-list-internal appropriately. - * cl-macs.el (cl-setf-do-store): + * cl-macs.el (cl-setf-do-store): If the store form is a cons, treat it specially as wrapping the store value. - * cl.el (cl-block-wrapper): + * cl.el (cl-block-wrapper): Make this an alias of #'and, not #'identity, since it needs to pass back multiple values. - * cl.el (multiple-value-apply): - We no longer support this, mark it obsolete. - * lisp-mode.el (eval-interactive-verbose): - Remove a useless space in the docstring. - * lisp-mode.el (eval-interactive): + * cl.el (multiple-value-apply): + We no longer support this, mark it obsolete. + * lisp-mode.el (eval-interactive-verbose): + Remove a useless space in the docstring. + * lisp-mode.el (eval-interactive): Update this function and its docstring. It now passes back a list, basically wrapping any eval calls with multiple-value-list. This - allows multiple values to be printed by default in *scratch*. - * lisp-mode.el (prin1-list-as-multiple-values): + allows multiple values to be printed by default in *scratch*. + * lisp-mode.el (prin1-list-as-multiple-values): New function, printing a list as multiple values in the manner of Bruno Haible's clisp, separating each entry with " ;\n". * lisp-mode.el (eval-last-sexp): Call #'prin1-list-as-multiple-values on the return value of - #'eval-interactive. - * lisp-mode.el (eval-defun): + #'eval-interactive. + * lisp-mode.el (eval-defun): Call #'prin1-list-as-multiple-values on the return value of - #'eval-interactive. - * mouse.el (mouse-eval-sexp): + #'eval-interactive. + * mouse.el (mouse-eval-sexp): Deal with lists corresponding to multiple values from #'eval-interactive. Call #'cl-prettyprint, which is always available, instead of sometimes calling #'pprint and sometimes - falling back to prin1. - * obsolete.el (obsolete-throw): + falling back to prin1. + * obsolete.el (obsolete-throw): New function, called from eval.c when #'funcall encounters an attempt to call #'throw (now a special form) as a function. Only - needed for compatibility with 21.4 byte-code. + needed for compatibility with 21.4 byte-code. 2009-08-10 Aidan Kehoe - * help.el (function-arglist, function-documentation): + * help.el (function-arglist, function-documentation): Deal more gracefully with tabs in the function arglist; in function-documentation, when stripping the arglist, pay attention to the fact that they may span multiple lines. 2009-08-09 Aidan Kehoe - * faces.el (set-face-background-pixmap-file): + * faces.el (set-face-background-pixmap-file): Remove some extra parentheses revealed by change set 7757334005ae. 2009-08-07 Mike Sperber @@ -674,48 +765,48 @@ 2009-07-18 Aidan Kehoe - * files.el (find-file-create-switch-thunk): + * files.el (find-file-create-switch-thunk): Check that #'buffer-file-name gives non-nil before trying to determine whether that file exists; avoids problems in dired. Thank you Mats Lidell! 2009-07-13 Aidan Kehoe - * code-files.el (insert-file-contents): + * code-files.el (insert-file-contents): Set the buffer coding system even on error; especially important - when dealing with nonexistent files. + when dealing with nonexistent files. If the `coding-system' property of an undecided coding system is itself undecided, don't use that as a value for - buffer-file-coding-system. + buffer-file-coding-system. 2009-07-12 Aidan Kehoe - * files.el (after-find-file): + * files.el (after-find-file): If the answer to "The directory containing %s does not exist. Create?" is no, kill the current buffer, since the user probably just misspelled the directory name. Thank you Rodney Sparapani! 2009-07-12 Aidan Kehoe - * files.el (find-file-create-switch-thunk): + * files.el (find-file-create-switch-thunk): New macro, used to mark buffers created within #'find-file (and related) modified if the associated file doesn't exist. - (find-alternate-file-other-window): - Correct this, pass CODESYS to find-file-other-window. - (find-file-read-only): - Correct behaviour of this function in the presence of wildcards. - (find-file): - (find-file-other-window): - (find-file-other-frame): - (find-file-read-only-other-window): - (find-file-read-only-other-frame): - (find-alternate-file): + (find-alternate-file-other-window): + Correct this, pass CODESYS to find-file-other-window. + (find-file-read-only): + Correct behaviour of this function in the presence of wildcards. + (find-file): + (find-file-other-window): + (find-file-other-frame): + (find-file-read-only-other-window): + (find-file-read-only-other-frame): + (find-alternate-file): Simplify these functions, use #'find-file-create-switch-thunk' - instead of explicit #'switch-to-buffer calls. + instead of explicit #'switch-to-buffer calls. 2009-07-11 Aidan Kehoe - * code-files.el (insert-file-contents): + * code-files.el (insert-file-contents): Take advantage of more sensible behaviour from #'insert-file-contents-internal, allowing us to actually follow the documented coding system behaviour for nonexistent files (that @@ -729,19 +820,19 @@ 2009-06-14 Aidan Kehoe - * help.el (describe-function-1): + * help.el (describe-function-1): Check macro-p, not macrop, when describing whether a symbol has an associated macro or an associated function. Relevant with - autoloaded macros. - (function-arglist): + autoloaded macros. + (function-arglist): Accept multi-line arglists in built-in functions, as found in #'write-region-internal. #'dontusethis-set-symbol-value-handler - is still broken for other reasons. + is still broken for other reasons. 2009-06-07 Aidan Kehoe - * code-files.el (insert-file-contents): - Autodetection may return undecided as a coding system. If the file + * code-files.el (insert-file-contents): + Autodetection may return undecided as a coding system. If the file was zero-length, this is kosher, and we should set buffer-file-coding-system to its default; if it is not zero-length, we still need to set b-f-c-s, but we warn that the @@ -749,21 +840,21 @@ failing is something very distinct from what we use it to mean here.) See http://mid.gmane.org/18986.53111.800393.660612@parhasard.net and - the related thread. + the related thread. 2009-06-06 Aidan Kehoe - * files.el (cd): + * files.el (cd): Make CDPATH handling portable, accept entries without trailing slashes within it. Some style corrections from Stephen Turnbull, - thank you Stephen. + thank you Stephen. 2009-05-29 Aidan Kehoe - * bytecomp.el (byte-compile-lambda): + * bytecomp.el (byte-compile-lambda): Even if we are going to store uncompiled interactive forms in the compiled-function object, byte compile (and discard) the code, for - the sake of the warnings generated. + the sake of the warnings generated. 2009-05-18 Stephen J. Turnbull @@ -787,65 +878,65 @@ 2009-03-01 Aidan Kehoe - * x-compose.el: - Document an XIM bug, and how one might work around it. - (define-compose-map): + * x-compose.el: + Document an XIM bug, and how one might work around it. + (define-compose-map): Revise this macro, call it with compose-caron-map, compose-macron-map, compose-breve-map, compose-dot-map, compose-doubleacute-map, compose-ogonek-map, compose-hook-map, - compose-horn-map as well as the previous existing maps. - (compose-map): + compose-horn-map as well as the previous existing maps. + (compose-map): Add entries for caron, macron, doubleacute, ogonek, breve and - abovedot to this map. + abovedot to this map. Add an assert, this code assumes that a non-Mule build has no - character codes above U+00FF. + character codes above U+00FF. Incorporate all the precomposed Latin characters in UnicodeData.txt that we can into the maps, deciding at runtime on which exactly depending on whether this is a non-Mule or a Mule build. - Remove a commented-out old X11 bug workaround. + Remove a commented-out old X11 bug workaround. Use #'flet instead of defun + unintern for #'alias-colon-to-doublequote. Correct #'electric-diacritic to work with the keyboard macro - versions of the maps. - (compose-help): + versions of the maps. + (compose-help): This has been turned off since 1994; no-one appears to have noticed, since the normal help mechanism offers similar - functionality and is actually maintained. Removed entirely. - Remove a superflous setting of a default value for ctl-arrow. - * x-init.el (x-initialize-compose): + functionality and is actually maintained. Removed entirely. + Remove a superflous setting of a default value for ctl-arrow. + * x-init.el (x-initialize-compose): Support the new dead key maps we just added to x-compose.el with - autoloads here. + autoloads here. 2009-02-22 Aidan Kehoe * bytecomp.el (byte-compile-force-escape-quoted): New variable, used to force `byte-compile-insert-header' to treat the output as - having characters above ?\xFF. - (byte-compile-from-buffer): + having characters above ?\xFF. + (byte-compile-from-buffer): If the compiled output contains characters above ?\xFF, and byte-compile-dynamic-docstrings or byte-compile-dynamic is non-nil (or we're using an inappropriate coding system) recompile the file, turning off the dynamic features and using a more - appropriate header. + appropriate header. (byte-compile-insert-header): Pay attention to - byte-compile-force-escape-quoted. + byte-compile-force-escape-quoted. 2009-02-18 Aidan Kehoe - * coding.el (check-coding-systems-region): + * coding.el (check-coding-systems-region): Return null on success, not t. See http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1723 2009-02-17 Aidan Kehoe - * mule/mule-cmds.el (finish-set-language-environment): + * mule/mule-cmds.el (finish-set-language-environment): Correct this function, don't try to format non-control characters with ^ followed by their value plus (char-int ?@). 2009-02-17 Aidan Kehoe - * unicode.el (unicode-query-coding-region): + * unicode.el (unicode-query-coding-region): Avoid eval-when-compile where that gives incorrect results when compiled on a non-Mule XEmacs but run on a Mule XEmacs. Fixes problems seen by @@ -854,7 +945,7 @@ (An equivalent way to get the efficiency of the eval-when-compile would be to provide two defvars, evaluated at dump time, but this code will be in C soon enough, and we can use the relevant - preprocessor constants there.) + preprocessor constants there.) 2009-02-02 Aidan Kehoe @@ -865,144 +956,144 @@ 2009-02-02 Aidan Kehoe - * mule/latin.el (macintosh): - Add GNU Emacs' name for this coding system as an alias. + * mule/latin.el (macintosh): + Add GNU Emacs' name for this coding system as an alias. 2009-02-13 Aidan Kehoe - * mule/mule-cmds.el (init-mule-at-startup): + * mule/mule-cmds.el (init-mule-at-startup): Actually use leim-list-file-name, don't load a hardcoded - leim-list.el in this function. + leim-list.el in this function. 2009-02-11 Aidan Kehoe - * coding.el (query-coding-string): - Correct the order of arguments passed to #'query-coding-region. - (unencodable-char-position): + * coding.el (query-coding-string): + Correct the order of arguments passed to #'query-coding-region. + (unencodable-char-position): Handle string offsets correctly, they're one less than buffer - offsets. Handle START and END correctly if passed a string. + offsets. Handle START and END correctly if passed a string. 2009-02-08 Aidan Kehoe - * cl-macs.el (delete-duplicates): + * cl-macs.el (delete-duplicates): Add a new compiler macro, inlining this function if it's called with a literal #'eq or #'equal test arguments and no other keywords. - * font-lock.el (font-lock-unique): - Remove this function. - * font-lock.el (font-lock-prepend-text-property): - (font-lock-append-text-property): + * font-lock.el (font-lock-unique): + Remove this function. + * font-lock.el (font-lock-prepend-text-property): + (font-lock-append-text-property): Use #'delete-duplicates instead of #'font-lock-unique. * font.el (font-unique): Remove this function. - * font.el (font-combine-fonts-internal): - (x-font-families-for-device): - (xft-font-families-for-device): - (ns-font-families-for-device): + * font.el (font-combine-fonts-internal): + (x-font-families-for-device): + (xft-font-families-for-device): + (ns-font-families-for-device): Use #'delete-duplicates instead of #'font-unique. - * fontconfig.el (fc-delete-duplicates): - * fontconfig.el (fc-filter): - Remove these functions. - * fontconfig.el (fc-find-available-font-families): + * fontconfig.el (fc-delete-duplicates): + * fontconfig.el (fc-filter): + Remove these functions. + * fontconfig.el (fc-find-available-font-families): Replace #'fc-delete-duplicates with #'delete-duplicates, #'fc-filter with #'delete-if-not. - * format.el (format-make-relatively-unique): + * format.el (format-make-relatively-unique): Document that this is equivalent to #'nset-exclusive-or with a test of #'equal. 2009-02-07 Aidan Kehoe * descr-text.el (describe-text-sexp): - pp is in packages, use cl-prettyprint instead. - * mule/mule-coding.el (make-8-bit-generate-helper): + pp is in packages, use cl-prettyprint instead. + * mule/mule-coding.el (make-8-bit-generate-helper): Don't uselessly bind args-out-of-range, thank you the byte - compiler. - * mule/mule-coding.el (8-bit-fixed-query-coding-region): + compiler. + * mule/mule-coding.el (8-bit-fixed-query-coding-region): Don't uselessly bind previous-fail, thank you the byte compiler. - * tty-init.el (make-device-early-tty-entry-point): - Set make-device-early-tty-entry-point-called-p, not - pre-tty-win-initted, thank you the byte compiler. - * unicode.el (unicode-query-coding-region): + * tty-init.el (make-device-early-tty-entry-point): + Set make-device-early-tty-entry-point-called-p, not + pre-tty-win-initted, thank you the byte compiler. + * unicode.el (unicode-query-coding-region): Don't uselessly bind invalid-sequence-p, thank you the - byte-compiler. + byte-compiler. 2009-02-07 Aidan Kehoe - * coding.el (query-coding-clear-highlights): + * coding.el (query-coding-clear-highlights): Rename the BUFFER argument to BUFFER-OR-STRING, describe it as - possibly being a string in its documentation. - (default-query-coding-region): + possibly being a string in its documentation. + (default-query-coding-region): Add a new IGNORE-INVALID-SEQUENCESP argument, document that this - function does not support it. + function does not support it. Bind case-fold-search to nil, we don't want this to influence what the function thinks is encodable or not. (query-coding-region): Add a new IGNORE-INVALID-SEQUENCESP argument, document what it - does; reflect this new argument in the associated compiler macro. - (query-coding-string): + does; reflect this new argument in the associated compiler macro. + (query-coding-string): Add a new IGNORE-INVALID-SEQUENCESP argument, document what it does. Support the HIGHLIGHT argument correctly. - * unicode.el (unicode-query-coding-region): + * unicode.el (unicode-query-coding-region): Add a new IGNORE-INVALID-SEQUENCESP argument, document what it - does, implement this. Document a potential problem. + does, implement this. Document a potential problem. Use #'query-coding-clear-highlights instead of reimplementing it - ourselves. - Remove some debugging messages. - * mule/arabic.el (iso-8859-6): - * mule/cyrillic.el (iso-8859-5): - * mule/greek.el (iso-8859-7): - * mule/hebrew.el (iso-8859-8): - * mule/latin.el (iso-8859-2): - * mule/latin.el (iso-8859-3): - * mule/latin.el (iso-8859-4): - * mule/latin.el (iso-8859-14): - * mule/latin.el (iso-8859-15): - * mule/latin.el (iso-8859-16): - * mule/latin.el (iso-8859-9): - * mule/latin.el (windows-1252): - * mule/mule-coding.el (iso-8859-1): - Avoid the assumption that characters not given an explicit mapping - in these coding systems map to the ISO 8859-1 characters - corresponding to the octets on disk; this makes it much more - reasonable to implement the IGNORE-INVALID-SEQUENCESP argument to - query-coding-region. - * mule/mule-cmds.el (set-language-info): - Correct the docstring. - * mule/mule-cmds.el (finish-set-language-environment): - Treat invalid Unicode sequences produced from - invalid-sequence-coding-system and corresponding to control - characters the same as control characters in redisplay. - * mule/mule-cmds.el: - Document that encode-coding-char is available in coding.el - * mule/mule-coding.el (make-8-bit-generate-helper): - Change to return the both the encode-program generated and the - relevant non-ASCII charset; update the docstring to reflect this. - * mule/mule-coding.el - (make-8-bit-generate-encode-program-and-skip-chars-strings): - Rename this function; have it return skip-chars-strings as well as - the encode program. Have these skip-chars-strings use ranges for - charsets, where possible. - * mule/mule-coding.el (make-8-bit-create-decode-encode-tables): - Revise this to allow people to specify explicitly characters that - should be undefined (= corresponding to keys in - unicode-error-default-translation-table), and treating unspecified - octets above #x7f as undefined by default. - * mule/mule-coding.el (8-bit-fixed-query-coding-region): - Add a new IGNORE-INVALID-SEQUENCESP argument, implement support - for it using the 8-bit-fixed-invalid-sequences-skip-chars coding - system property; remove some debugging messages. - * mule/mule-coding.el (make-8-bit-coding-system): - This function is dumped, autoloading it makes no sense. + ourselves. + Remove some debugging messages. + * mule/arabic.el (iso-8859-6): + * mule/cyrillic.el (iso-8859-5): + * mule/greek.el (iso-8859-7): + * mule/hebrew.el (iso-8859-8): + * mule/latin.el (iso-8859-2): + * mule/latin.el (iso-8859-3): + * mule/latin.el (iso-8859-4): + * mule/latin.el (iso-8859-14): + * mule/latin.el (iso-8859-15): + * mule/latin.el (iso-8859-16): + * mule/latin.el (iso-8859-9): + * mule/latin.el (windows-1252): + * mule/mule-coding.el (iso-8859-1): + Avoid the assumption that characters not given an explicit mapping + in these coding systems map to the ISO 8859-1 characters + corresponding to the octets on disk; this makes it much more + reasonable to implement the IGNORE-INVALID-SEQUENCESP argument to + query-coding-region. + * mule/mule-cmds.el (set-language-info): + Correct the docstring. + * mule/mule-cmds.el (finish-set-language-environment): + Treat invalid Unicode sequences produced from + invalid-sequence-coding-system and corresponding to control + characters the same as control characters in redisplay. + * mule/mule-cmds.el: + Document that encode-coding-char is available in coding.el + * mule/mule-coding.el (make-8-bit-generate-helper): + Change to return the both the encode-program generated and the + relevant non-ASCII charset; update the docstring to reflect this. + * mule/mule-coding.el + (make-8-bit-generate-encode-program-and-skip-chars-strings): + Rename this function; have it return skip-chars-strings as well as + the encode program. Have these skip-chars-strings use ranges for + charsets, where possible. + * mule/mule-coding.el (make-8-bit-create-decode-encode-tables): + Revise this to allow people to specify explicitly characters that + should be undefined (= corresponding to keys in + unicode-error-default-translation-table), and treating unspecified + octets above #x7f as undefined by default. + * mule/mule-coding.el (8-bit-fixed-query-coding-region): + Add a new IGNORE-INVALID-SEQUENCESP argument, implement support + for it using the 8-bit-fixed-invalid-sequences-skip-chars coding + system property; remove some debugging messages. + * mule/mule-coding.el (make-8-bit-coding-system): + This function is dumped, autoloading it makes no sense. Document what happens when characters above #x7f are not - specified, implement this. - * mule/vietnamese.el: - Correct spelling. + specified, implement this. + * mule/vietnamese.el: + Correct spelling. 2009-02-04 Aidan Kehoe - * help.el: - (describe-function-1): - * byte-optimize.el: + * help.el: + (describe-function-1): + * byte-optimize.el: Remove any reference to mocklisp as an active technology. 2009-02-04 Aidan Kehoe @@ -1015,8 +1106,8 @@ 2009-02-04 Aidan Kehoe - * coding.el (force-coding-system-equivalency): - Document this macro and the motivation for it. + * coding.el (force-coding-system-equivalency): + Document this macro and the motivation for it. 2009-01-15 Aidan Kehoe @@ -1034,31 +1125,31 @@ 2009-02-04 Aidan Kehoe - * coding.el (query-coding-region): + * coding.el (query-coding-region): Revert this to being a defun, add a compiler macro without - needless binding. - (query-coding-string): - Correct a bug here, string indices are zero- not one-based. + needless binding. + (query-coding-string): + Correct a bug here, string indices are zero- not one-based. * mule/general-late.el (unicode-query-coding-skip-chars-arg): - Correct the algorithm used to initialise this variable. + Correct the algorithm used to initialise this variable. 2009-02-04 Aidan Kehoe - * help.el (describe-function-1): + * help.el (describe-function-1): Distinguish between special forms and subrs; don't bind autoload-file, #'symbol-file returns it like any other function file name. 2009-01-31 Aidan Kehoe - * mule/mule-cmds.el (finish-set-language-environment): + * mule/mule-cmds.el (finish-set-language-environment): Treat control characters specially in the invalid-sequence-coding-system handling, display them using the - caret notation. + caret notation. 2009-01-31 Aidan Kehoe - * frame.el (display-graphic-p): + * frame.el (display-graphic-p): Call #'display-device on the DISPLAY argument, ensuring that the argument to #'device-on-window-system-p is correct. @@ -1071,7 +1162,7 @@ 2009-01-13 Aidan Kehoe - * mule/mule-cmds.el (set-language-environment-coding-systems): + * mule/mule-cmds.el (set-language-environment-coding-systems): Fix a cosmetic bug; the relationship between file-name-coding-system and the file-name coding system alias established in coding.el wasn't being maintained. See Katsumi @@ -1092,118 +1183,118 @@ 2008-12-30 Aidan Kehoe - * make-docfile.el: + * make-docfile.el: Use absolute source file names when checking if DOC is out of date, don't use relative paths that may not be related to the - current directory. + current directory. 2008-12-28 Aidan Kehoe - * coding.el (query-coding-region): - (query-coding-string): + * coding.el (query-coding-region): + (query-coding-string): Make these defsubsts, they're short enough and they're called explicitly rarely enough that it make some sense. The alternative - would be compiler macros that avoid the binding of the arguments. - (unencodable-char-position): - Document where the docstring and API are from. + would be compiler macros that avoid the binding of the arguments. + (unencodable-char-position): + Document where the docstring and API are from. Correct a special case for zero--check-argument-type returns nil when it succeeds, we can't usefully chain its result in an and - here. + here. (check-coding-systems-region): New. API taken from GNU; docstring - and implementation are independent. - (encode-coding-char): + and implementation are independent. + (encode-coding-char): Add an optional third argument, as used by recent GNU. Document - the origen of the docstring. + the origen of the docstring. (default-query-coding-region): Add a short docstring to the - non-Mule implementation of this function. - * unicode.el: + non-Mule implementation of this function. + * unicode.el: Don't set the query-coding-function property for unicode coding systems if we're on non-mule. Unintern unicode-query-coding-region, unicode-query-coding-skip-chars-arg - in the same context. + in the same context. 2008-12-30 Aidan Kehoe - * frame.el (display-mouse-p): - (display-popup-menus-p): - (display-images-p): - (display-selections-p): - (display-visual-class): + * frame.el (display-mouse-p): + (display-popup-menus-p): + (display-images-p): + (display-selections-p): + (display-visual-class): Make all these functions more general, do not hard code device - type symbols where that is inappropriate. + type symbols where that is inappropriate. 2008-12-28 Aidan Kehoe - * coding.el (default-query-coding-region): + * coding.el (default-query-coding-region): Declare using defun*, so we can #'return-from to it on encountering a safe-charsets value of t. Comment out a few - debug messages. - (query-coding-region): + debug messages. + (query-coding-region): Correct the docstring, it deals with a region, not a string. - (unencodable-char-position): + (unencodable-char-position): Correct the implementation for non-nil COUNT, special-case a zero value for count, treat it as one. Don't rely on dynamic scope when calling the main lambda. - * unicode.el (unicode-query-coding-region): - Comment out some debug messages here. - * mule/mule-coding.el (8-bit-fixed-query-coding-region): - Comment out some debug messages here. - - * code-init.el (raw-text): - Add a safe-charsets property to this coding system. - * mule/korean.el (iso-2022-int-1): - * mule/korean.el (euc-kr): - * mule/korean.el (iso-2022-kr): - Add safe-charsets properties for these coding systems. - * mule/japanese.el (iso-2022-jp): - * mule/japanese.el (jis7): - * mule/japanese.el (jis8): - * mule/japanese.el (shift-jis): - * mule/japanese.el (iso-2022-jp-1978-irv): - * mule/japanese.el (euc-jp): - Add safe-charsets properties for all these coding systems. - * mule/iso-with-esc.el: + * unicode.el (unicode-query-coding-region): + Comment out some debug messages here. + * mule/mule-coding.el (8-bit-fixed-query-coding-region): + Comment out some debug messages here. + + * code-init.el (raw-text): + Add a safe-charsets property to this coding system. + * mule/korean.el (iso-2022-int-1): + * mule/korean.el (euc-kr): + * mule/korean.el (iso-2022-kr): + Add safe-charsets properties for these coding systems. + * mule/japanese.el (iso-2022-jp): + * mule/japanese.el (jis7): + * mule/japanese.el (jis8): + * mule/japanese.el (shift-jis): + * mule/japanese.el (iso-2022-jp-1978-irv): + * mule/japanese.el (euc-jp): + Add safe-charsets properties for all these coding systems. + * mule/iso-with-esc.el: Add safe-charsets properties to all the coding systems in here. Comment on the downside of a safe-charsets value of t for iso-latin-1-with-esc. - * mule/hebrew.el (ctext-hebrew): - Add a safe-charsets property for this coding system. - * mule/devanagari.el (in-is13194-devanagari): - Add a safe-charsets property for this coding system. - * mule/chinese.el (cn-gb-2312): - * mule/chinese.el (hz-gb-2312): - * mule/chinese.el (big5): - Add safe-charsets properties for these coding systems. - * mule/latin.el (iso-8859-14): + * mule/hebrew.el (ctext-hebrew): + Add a safe-charsets property for this coding system. + * mule/devanagari.el (in-is13194-devanagari): + Add a safe-charsets property for this coding system. + * mule/chinese.el (cn-gb-2312): + * mule/chinese.el (hz-gb-2312): + * mule/chinese.el (big5): + Add safe-charsets properties for these coding systems. + * mule/latin.el (iso-8859-14): Add an implementation for this, using #'make-8-bit-coding-system. - * mule/mule-coding.el (ctext): - * mule/mule-coding.el (iso-2022-8bit-ss2): - * mule/mule-coding.el (iso-2022-7bit-ss2): - * mule/mule-coding.el (iso-2022-jp-2): - * mule/mule-coding.el (iso-2022-7bit): - * mule/mule-coding.el (iso-2022-8): - * mule/mule-coding.el (escape-quoted): - * mule/mule-coding.el (iso-2022-lock): - Add safe-charsets properties for all these coding systems. + * mule/mule-coding.el (ctext): + * mule/mule-coding.el (iso-2022-8bit-ss2): + * mule/mule-coding.el (iso-2022-7bit-ss2): + * mule/mule-coding.el (iso-2022-jp-2): + * mule/mule-coding.el (iso-2022-7bit): + * mule/mule-coding.el (iso-2022-8): + * mule/mule-coding.el (escape-quoted): + * mule/mule-coding.el (iso-2022-lock): + Add safe-charsets properties for all these coding systems. 2008-12-27 Aidan Kehoe - * loadhist.el (symbol-file): + * loadhist.el (symbol-file): Use #'defun*, not #'defun, to allow the checks for autoloaded functions and variables to call #'return-from correctly. Use - #'return-from instead of #'return throughout the function. + #'return-from instead of #'return throughout the function. 2008-12-27 Aidan Kehoe - * loadup.el (load-history): + * loadup.el (load-history): Add the contents of current-load-list to load-history before clearing it. Move the variable declarations earlier in the file to - a format understood by make-docfile.c. + a format understood by make-docfile.c. * custom.el (custom-declare-variable): Add the variable's symbol to the current file's load history entry correctly, don't use a cons. Eliminate a comment that we don't need to worry about, we don't need to check the `initialized' C variable in Lisp. - * bytecomp.el (byte-compile-output-file-form): + * bytecomp.el (byte-compile-output-file-form): Merge Andreas Schwab's pre-GPLv3 GNU change of 19970831 here; treat #'custom-declare-variable correctly, generating the docstrings in a format understood by make-docfile.c. @@ -1214,25 +1305,25 @@ it relative to lisp-directory if the filename corresponds to a Lisp file, and relative to (concat source-directory "/src/") otherwise. - * make-docfile.el (preloaded-file-list): + * make-docfile.el (preloaded-file-list): Rationalise some let bindings a little. Use the "-d" argument to make-docfile.c to supply Lisp paths relative to lisp-directory, not absolutely. Add in loadup.el explicitly to the list of files to be processed by make-docfile.c--it doesn't make sense to add it to preloaded-file-list, since that is used for purposes of - byte-compilation too. + byte-compilation too. 2008-12-22 Aidan Kehoe - * loadhist.el (symbol-file): + * loadhist.el (symbol-file): Add support for differentiating between variables and functions to - #'symbol-file. - * help.el (describe-function-1): - (describe-variable): + #'symbol-file. + * help.el (describe-function-1): + (describe-variable): Call #'symbol-function explicitly with a 'defun or 'defvar argument, depending on whether we're looking for a variable or a - function. - * cus-face.el (custom-declare-face): + function. + * cus-face.el (custom-declare-face): Record information about the face in the load history; code taken from GNU, pre-GPLv3 revision 1.45. @@ -1259,13 +1350,13 @@ * window.el (only-window-p): New. Check if WINDOW is the only window in some context, normally its frame. - (one-window-p): + (one-window-p): Implemented this in terms of #'only-window-p, calling it on the - selected window. - (window-buffer-height): Uncomment this, make it work. - (count-screen-lines): Support a BUFFER argument. + selected window. + (window-buffer-height): Uncomment this, make it work. + (count-screen-lines): Support a BUFFER argument. (fit-window-to-buffer): Uncomment this, correct its implementation - to work with XEmacs. + to work with XEmacs. * help.el (temp-buffer-resize-mode): New. Name taken from GNU, implementation our own. * (resize-temp-buffer-window): New. GNU-compatible alias for @@ -1275,32 +1366,32 @@ * frame.el: Point to #'temp-buffer-resize-mode in a comment. Some of this code is from GNU; help.el CVS version 1.327 of 2007-03-21, window.el CVS version 1.122, of 2007-06-24. Both these - are GPLV2 or later. + are GPLV2 or later. 2008-08-27 Aidan Kehoe - * subr.el (skip-chars-quote): + * subr.el (skip-chars-quote): Correct the implementation, following the docstring of #'skip-char-forward more closely rather than the documentation of - character classes in the Lispref. + character classes in the Lispref. 2008-08-23 Aidan Kehoe * custom.el: Move #'custom-variable-p to C, since it's now called - from #'user-variable-p. + from #'user-variable-p. 2008-08-23 Aidan Kehoe - - * mule/mule-coding.el (make-8-bit-coding-system): - * mule/general-late.el (posix-charset-to-coding-system-hash): - Use #'skip-chars-quote as appropriate. + + * mule/mule-coding.el (make-8-bit-coding-system): + * mule/general-late.el (posix-charset-to-coding-system-hash): + Use #'skip-chars-quote as appropriate. 2008-08-09 Aidan Kehoe * subr.el (skip-chars-quote): New. Given STRING, return a string that means that all characters in STRING will be skipped when passed to #'skip-chars-forward, - #'skip-chars-backward. + #'skip-chars-backward. 2008-08-09 Aidan Kehoe @@ -1308,10 +1399,10 @@ 2008-08-08 Aidan Kehoe - * unicode.el: - * mule/mule-cmds.el: - * mule/latin.el: - * mule/cyrillic.el: + * unicode.el: + * mule/mule-cmds.el: + * mule/latin.el: + * mule/cyrillic.el: Rework the various identifiers using error-sequence to use invalid-sequence instead. @@ -1321,58 +1412,58 @@ in x-init.el, since we want it even on non-X builds to use the support for displaying Unicode error sequences according to the current locale. - * mule/mule-cmds.el (set-language-info): + * mule/mule-cmds.el (set-language-info): Document error-sequence-coding-system, used to describe how to - display characters that are not valid Unicode on disk. - * mule/mule-cmds.el (finish-set-language-environment): - Implement error-sequence-coding-system. - * unicode.el (unicode-error-sequence-warning-face): + display characters that are not valid Unicode on disk. + * mule/mule-cmds.el (finish-set-language-environment): + Implement error-sequence-coding-system. + * unicode.el (unicode-error-sequence-warning-face): New face, to make it possible to distinguish invalid Unicode sequences from the characters given by the valid Unicode - sequences. - * mule/cyrillic.el ("Russian"): - ("Ukrainian"): - ("Bulgarian"): - ("Belarusian"): + sequences. + * mule/cyrillic.el ("Russian"): + ("Ukrainian"): + ("Bulgarian"): + ("Belarusian"): ("Cyrillic-ALT"): Add support for error-sequence-coding-system for all these languages. - * mule/latin.el: + * mule/latin.el: Add support for error-sequence-coding-system for the Latin-alphabet language environments. 2008-08-05 Aidan Kehoe - * mule/iso-with-esc.el (greek-iso-8bit-with-esc): - (arabic-iso-8bit-with-esc): + * mule/iso-with-esc.el (greek-iso-8bit-with-esc): + (arabic-iso-8bit-with-esc): Add these two here. Move the implementation of the 'arabic-iso8859-6 character set here, with commentary on why that - is reasonable. - * mule/arabic.el (iso-8859-6): + is reasonable. + * mule/arabic.el (iso-8859-6): Add iso-8859-6, windows-1256 implementations using make-8-bit-coding-system. Remove our non-standard Mule character - sets. + sets. * unicode.el (load-unicode-tables): Remove Arabic since it's no longer dumped. * mule/mule-msw-init-late.el: Remove Arabic. * mule/mule-category.el (predefined-category-list): Remove - Arabic. + Arabic. 2008-07-26 Aidan Kehoe - * x-init.el (x-initialize-compose): + * x-init.el (x-initialize-compose): Rewrite to use #'loop, as does similar code in x-win-sun.el, x-win-xfree86.el. Locally bind function-key-map to the correct value for the device's console. - * x-win-xfree86.el (x-win-init-xfree86): + * x-win-xfree86.el (x-win-init-xfree86): Locally bind function-key-map to the correct value for the device's console. - * x-win-sun.el (x-win-init-sun): + * x-win-sun.el (x-win-init-sun): Locally bind function-key-map to the correct value for the device's console. 2008-07-20 Aidan Kehoe - * descr-text.el (describe-char-unicode-data): + * descr-text.el (describe-char-unicode-data): Correct three calls to #'error; it doesn't take #'message style format strings and arguments. @@ -1380,11 +1471,11 @@ * descr-text.el (describe-property-list): Move the (require 'hyper-apropos) call to top level, this isn't the only function - that uses the relevant face. + that uses the relevant face. (describe-char): Wrap the Unihan field descriptions if they are longer than the windows width minus 50. Rename the created buffer to reflect the character's position as - well as its value. + well as its value. 2008-07-07 Aidan Kehoe @@ -1392,7 +1483,7 @@ various Lisp functions should be called during device creation, not relying on the startup code to decide this. Also, rename initial-window-system to initial-device-type (which makes more - sense in this scheme), always set it. + sense in this scheme), always set it. * startup.el (command-line): Use initial-device-type, not initial-window-system; just call @@ -1419,49 +1510,49 @@ what device-specific things need doing. Don't use create-console-hook in core code. * x-win-xfree86.el (x-win-init-xfree86): Take a DEVICE argument; - use it. - * x-win-sun.el (x-win-init-sun): Take a DEVICE argument; use it. + use it. + * x-win-sun.el (x-win-init-sun): Take a DEVICE argument; use it. * mule/mule-x-init.el: Remove #'init-mule-x-win, an empty - function. + function. * tty-init.el (make-device-early-tty-entry-point-called-p): New. Rename pre-tty-win-initted. (make-device-early-tty-entry-point): New. Rename init-pre-tty-win. (make-frame-after-init-entry-point): New. - Rename init-post-tty-win to better reflect when it's called. + Rename init-post-tty-win to better reflect when it's called. * gtk-init.el (gtk-early-lisp-options-file): New. - Move this path to a documented variable. + Move this path to a documented variable. (gtk-command-switch-alist): Wrap the docstring to fewer than 79 - columns. + columns. (make-device-early-gtk-entry-point-called-p): New. (make-device-late-gtk-entry-point-called-p): New. Renamed gtk-pre-win-initted, gtk-post-win-initted to these. - (make-device-early-gtk-entry-point): New. + (make-device-early-gtk-entry-point): New. (make-device-late-gtk-entry-point): New. Renamed init-pre-gtk-win, init-post-gtk-win to these. Have make-device-late-gtk-entry-point take a device argument, and use it; have make-device-early-gtk-entry-point load the GTK-specific - startup code, instead of doing that in C. + startup code, instead of doing that in C. (init-gtk-win): Deleted, functionality moved to the GTK device - creation code. + creation code. (gtk-define-dead-key): Have it take a DEVICE argument; use this - argument. - (gtk-initialize-compose): Ditto. - - * coding.el (set-terminal-coding-system): - Correct the docstring; the function isn't broken. + argument. + (gtk-initialize-compose): Ditto. + + * coding.el (set-terminal-coding-system): + Correct the docstring; the function isn't broken. 2008-06-29 Aidan Kehoe - * descr-text.el (describe-char-unicode-data): + * descr-text.el (describe-char-unicode-data): Don't leak the Unihan database handle when looking up non-Han - characters. + characters. 2008-06-04 Aidan Kehoe - * descr-text.el (describe-property-list): + * descr-text.el (describe-property-list): #'require hyper-apropos, since we use hyper-apropos-face 2008-05-25 Aidan Kehoe @@ -1470,27 +1561,27 @@ Taken from GNU's GPLV2 version of 2007-02-14, with modifications for XEmacs support and extensions for Unihan.txt support and db/dbm caches. - * simple.el (what-cursor-position): + * simple.el (what-cursor-position): Support an optional prefix argument, as does GNU, calling #'describe-char to giving more detail on the character at point, notably from UnicodeData and (in our case, optionally) Unihan.txt. - * syntax.el (syntax-after): - Make this available for the sake of #'describe-char. + * syntax.el (syntax-after): + Make this available for the sake of #'describe-char. * mule/mule-cmds.el (iso-2022-control-alist): Make this available, for the sake of #'encoded-string-description - and #'describe-char. + and #'describe-char. * mule/mule-cmds.el (encoded-string-description): Make this available, for the sake of #'describe-char. - * unicode.el (unicode-error-default-translation-table): + * unicode.el (unicode-error-default-translation-table): Make this a char table of type generic, not of type char. Makes it possible to have the relevant logic in #'describe-char reasonably clear; also, and this is undocumented, makes it much easier to implement #'frob-unicode-errors-region. I should document this, - and revise #'frob-unicode-errors-region. + and revise #'frob-unicode-errors-region. 2008-05-21 Aidan Kehoe - * mule/mule-coding.el (make-8-bit-choose-category): + * mule/mule-coding.el (make-8-bit-choose-category): Merge my change of 2008-05-14 to the query-coding-region code. 2008-05-14 Stephen J. Turnbull @@ -1500,7 +1591,7 @@ 2008-05-14 Aidan Kehoe * subr.el (add-to-list): Implement the same logic with a more - concise syntax; thank you Stephen, in + concise syntax; thank you Stephen, in http://mid.gmane.org/87ablomdwx.fsf@uwakimon.sk.tsukuba.ac.jp . 2008-02-25 bpalmer @@ -1516,22 +1607,22 @@ 2008-05-13 Aidan Kehoe - * printer.el (generic-print-region): - (generic-print-buffer): + * printer.el (generic-print-region): + (generic-print-buffer): Use #'valid-device-type-p instead of #'valid-specifier-tag-p to check if the msprinter device is available, now that msprinter is - always available as a specifier tag. + always available as a specifier tag. 2008-05-11 Aidan Kehoe - * disp-table.el (make-display-table): + * disp-table.el (make-display-table): Update the example code to make it more general, and more compatible with GNU. Also, I previously said #xFF when I meant ?\xFF; correct this. - * mule/cyril-util.el (standard-display-cyrillic-translit): + * mule/cyril-util.el (standard-display-cyrillic-translit): Make the selection of the default language more sensible; change the API a little to make a sensible default Cyrillic language - available, checking current-language-environment. + available, checking current-language-environment. 2007-07-21 Aidan Kehoe @@ -1540,11 +1631,11 @@ * mule/cyril-util.el (cyrillic-encode-alternativnyj-char): Removed. No-one uses these functions in google.com/codesearch, GNU have a comment doubting their utility, and their - implementation is trivial. + implementation is trivial. * mule/cyril-util.el (cyrillic-language-alist): Reformatted. * mule/cyril-util.el (standard-display-table)): Removed. It wasn't - used anyway. + used anyway. * mule/cyril-util.el (standard-display-cyrillic-translit): Rewrite it to work with character tables as display tables, and not to abort with an error. @@ -1553,11 +1644,11 @@ * disp-table.el: * disp-table.el (make-display-table): Moved earlier in the file in - a weak attempt at making syncing with GNU easier. + a weak attempt at making syncing with GNU easier. * disp-table.el (frob-display-table): Autoload it, accept TAG-SET, for editing specifiers. * disp-table.el (describe-display-table): - Have it handle character sets. + Have it handle character sets. * disp-table.el (standard-display-8bit-1): * disp-table.el (standard-display-8bit): * disp-table.el (standard-display-default-1): @@ -1568,13 +1659,13 @@ * disp-table.el (standard-display-european): Rework them all to use put-char-table, remove-char-table instead of aset. Limit standard-display-g1, standard-display-graphic to - TTYs; have standard-display-underline work on X11 too. - + TTYs; have standard-display-underline work on X11 too. + * font.el (font-caps-display-table): Use put-char-table instead of aset when editing a display table. * x-init.el: * x-init.el (tab): - Create the initial display table as a char-table, not a vector. + Create the initial display table as a char-table, not a vector. 2008-01-20 Aidan Kehoe @@ -1586,15 +1677,15 @@ 2008-05-07 Aidan Kehoe * mule/latin.el (windows-1250): Add the Central European Windows - coding system. + coding system. * mule/mule-win32-init.el: Don't use the Windows-specific CP1250 - implementation, rely on that in latin.el instead. + implementation, rely on that in latin.el instead. 2008-05-11 Aidan Kehoe - * coding.el (query-coding-clear-highlights): + * coding.el (query-coding-clear-highlights): New function--clear any face information added by - `query-coding-region'. + `query-coding-region'. (default-query-coding-region): Use it. 2008-04-13 Henry S. Thompson , Mike Sperber @@ -1604,10 +1695,10 @@ alist mapping the window objects from the original window configuration to the window objects corresponding to them in the restored configuration. - (set-window-configuration): - (saved-window): - (root-window->saved-window): - (really-set-window-configuration): + (set-window-configuration): + (saved-window): + (root-window->saved-window): + (really-set-window-configuration): (restore-saved-window): Record the mapping for above functions. 2008-04-12 Henry S. Thompson @@ -1616,10 +1707,10 @@ these to the original definitions of `split-window' and `delete-window', and use them in the window-configuration code to make sure it doesn't get affected by advice to these functions. - + 2008-04-10 Aidan Kehoe - * help.el (describe-function-1): + * help.el (describe-function-1): Rely on #'symbol-file to tell which file an autoloaded function belongs to, don't special-case them. @@ -1682,55 +1773,55 @@ * info.el (Info-suffix-list): Support LZMA compression, as used--oddly--by Mandriva Linux. - * coding.el (decode-coding-string): + * coding.el (decode-coding-string): (encode-coding-string): Accept GNU's NOCOPY argument for - these. Todo; write compiler macros to use it. + these. Todo; write compiler macros to use it. (query-coding-warning-face): New face, to show unencodable - characters. - (default-query-coding-region-safe-charset-skip-chars-map): - New variable, a cache used by #'default-query-coding-region. + characters. + (default-query-coding-region-safe-charset-skip-chars-map): + New variable, a cache used by #'default-query-coding-region. (default-query-coding-region): Default implementation of #'query-coding-region, using the safe-charsets and safe-chars - coding systemproperties. + coding systemproperties. (query-coding-region): New function; can a given coding system - encode a given region? + encode a given region? (query-coding-string): New function; can a given coding system - encode a given string? + encode a given string? (unencodable-char-position): Function API taken from GNU; return - the first unencodable position given a string and coding system. + the first unencodable position given a string and coding system. (encode-coding-char): Function API taken from GNU; return CHAR encoded using CODING-SYSTEM, or nil if CODING-SYSTEM would trash - CHAR. + CHAR. ((unless (featurep 'mule)): Override the default - query-coding-region implementation on non-Mule. + query-coding-region implementation on non-Mule. * mule/mule-coding.el (make-8-bit-generate-helper): Eliminate a - duplicate comment. - (make-8-bit-choose-category): Simplify implementation. + duplicate comment. + (make-8-bit-choose-category): Simplify implementation. (8-bit-fixed-query-coding-region): Implementation of #'query-coding-region for coding systems created with - #'make-8-bit-coding-system. + #'make-8-bit-coding-system. (make-8-bit-coding-system): Initialise the #'query-coding-region - implementation for these character sets. + implementation for these character sets. (make-8-bit-coding-system): Ditto for the compiler macro version - of this function. + of this function. * unicode.el (unicode-query-coding-skip-chars-arg): New variable, used by unicode-query-coding-region, initialised in - mule/general-late.el. + mule/general-late.el. (unicode-query-coding-region): New function, the - #'query-coding-region implementation for Unicode coding systems. + #'query-coding-region implementation for Unicode coding systems. Initialise the query-coding-function property for the Unicode coding systems to #'unicode-query-coding-region. * mule/mule-charset.el (charset-skip-chars-string): New function. Return a #'skip-chars-forward argument that skips all - characters in CHARSET. + characters in CHARSET. (map-charset-chars): Function synced from GNU, modified to work with XEmacs. Map FUNC across the int value charset ranges of - CHARSET. + CHARSET. 2008-01-21 Aidan Kehoe - * info.el (Info-suffix-list): - Support LZMA compression, as used--oddly--by Mandriva Linux. + * info.el (Info-suffix-list): + Support LZMA compression, as used--oddly--by Mandriva Linux. 2008-01-17 Mike Sperber diff -r 07fa38c30fdf -r 4dd2389173fc lisp/cl-compat.el --- a/lisp/cl-compat.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/cl-compat.el Sun Jan 10 01:06:15 2010 -0600 @@ -57,7 +57,7 @@ (list* 'defconst x (list 'quote x) (and doc (list doc)))) (defun keyword-of (sym) - (or (keywordp sym) (keywordp (intern (format ":%s" sym))))) + (or (keywordp sym) (keywordp (read (format ":%s" sym))))) ;;; Routines for parsing keyword arguments. diff -r 07fa38c30fdf -r 4dd2389173fc lisp/cl-extra.el --- a/lisp/cl-extra.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/cl-extra.el Sun Jan 10 01:06:15 2010 -0600 @@ -89,35 +89,128 @@ ;;; Predicates. +;; I'd actually prefer not to have this inline, the space +;; vs. amount-it's-called trade-off isn't reasonable, but that would +;; introduce bytecode problems with the compiler macro in cl-macs.el. +(defsubst cl-string-vector-equalp (cl-string cl-vector) + "Helper function for `equalp', which see." +; (check-argument-type #'stringp cl-string) +; (check-argument-type #'vector cl-vector) + (let ((cl-i (length cl-string)) + cl-char cl-other) + (when (= cl-i (length cl-vector)) + (while (and (>= (setq cl-i (1- cl-i)) 0) + (or (eq (setq cl-char (aref cl-string cl-i)) + (setq cl-other (aref cl-vector cl-i))) + (and (characterp cl-other) ; Note we want to call this + ; as rarely as possible, it + ; doesn't have a bytecode. + (eq (downcase cl-char) (downcase cl-other)))))) + (< cl-i 0)))) + +;; See comment on cl-string-vector-equalp above. +(defsubst cl-bit-vector-vector-equalp (cl-bit-vector cl-vector) + "Helper function for `equalp', which see." +; (check-argument-type #'bit-vector-p cl-bit-vector) +; (check-argument-type #'vectorp cl-vector) + (let ((cl-i (length cl-bit-vector)) + cl-other) + (when (= cl-i (length cl-vector)) + (while (and (>= (setq cl-i (1- cl-i)) 0) + (numberp (setq cl-other (aref cl-vector cl-i))) + ;; Differs from clisp here. + (= (aref cl-bit-vector cl-i) cl-other))) + (< cl-i 0)))) + +;; These two helper functions call equalp recursively, the two above have no +;; need to. +(defsubst cl-vector-array-equalp (cl-vector cl-array) + "Helper function for `equalp', which see." +; (check-argument-type #'vector cl-vector) +; (check-argument-type #'arrayp cl-array) + (let ((cl-i (length cl-vector))) + (when (= cl-i (length cl-array)) + (while (and (>= (setq cl-i (1- cl-i)) 0) + (equalp (aref cl-vector cl-i) (aref cl-array cl-i)))) + (< cl-i 0)))) + +(defsubst cl-hash-table-contents-equalp (cl-hash-table-1 cl-hash-table-2) + "Helper function for `equalp', which see." + (symbol-macrolet + ;; If someone has gone and fished the uninterned symbol out of this + ;; function's constants vector, and subsequently stored it as a value + ;; in a hash table, it's their own damn fault when + ;; `cl-hash-table-contents-equalp' gives the wrong answer. + ((equalp-default '#:equalp-default)) + (loop + for x-key being the hash-key in cl-hash-table-1 + using (hash-value x-value) + with y-value = nil + always (and (not (eq equalp-default + (setq y-value (gethash x-key cl-hash-table-2 + equalp-default)))) + (equalp y-value x-value))))) + (defun equalp (x y) "Return t if two Lisp objects have similar structures and contents. + This is like `equal', except that it accepts numerically equal -numbers of different types (float vs. integer), and also compares -strings case-insensitively." - (cond ((eq x y) t) +numbers of different types (float, integer, bignum, bigfloat), and also +compares strings and characters case-insensitively. + +Arrays (that is, strings, bit-vectors, and vectors) of the same length and +with contents that are `equalp' are themselves `equalp'. + +Two hash tables are `equalp' if they have the same test (see +`hash-table-test'), if they have the same number of entries, and if, for +each entry in one hash table, its key is equivalent to a key in the other +hash table using the hash table test, and its value is `equalp' to the other +hash table's value for that key." + (cond ((eq x y)) ((stringp x) - ;; XEmacs change: avoid downcase - (and (stringp y) - (eq t (compare-strings x nil nil y nil nil t)))) - ;; XEmacs addition: compare characters - ((characterp x) - (and (characterp y) - (or (char-equal x y) - (char-equal (downcase x) (downcase y))))) + (if (stringp y) + (eq t (compare-strings x nil nil y nil nil t)) + (if (vectorp y) + (cl-string-vector-equalp x y) + ;; bit-vectors and strings are only equalp if they're + ;; zero-length: + (and (equal "" x) (equal #* y))))) ((numberp x) (and (numberp y) (= x y))) ((consp x) (while (and (consp x) (consp y) (equalp (car x) (car y))) (setq x (cdr x) y (cdr y))) (and (not (consp x)) (equalp x y))) - ((vectorp x) - (and (vectorp y) (= (length x) (length y)) - (let ((i (length x))) - (while (and (>= (setq i (1- i)) 0) - (equalp (aref x i) (aref y i)))) - (< i 0)))) - (t (equal x y)))) - + (t + ;; From here on, the type tests don't (yet) have bytecodes. + (let ((x-type (type-of x))) + (cond ((eq 'vector x-type) + (if (stringp y) + (cl-string-vector-equalp y x) + (if (vectorp y) + (cl-vector-array-equalp x y) + (if (bit-vector-p y) + (cl-bit-vector-vector-equalp y x))))) + ((eq 'character x-type) + (and (characterp y) + ;; If the characters are actually identical, the + ;; first eq test will have caught them above; we only + ;; need to check them case-insensitively here. + (eq (downcase x) (downcase y)))) + ((eq 'hash-table x-type) + (and (hash-table-p y) + (eq (hash-table-test x) (hash-table-test y)) + (= (hash-table-count x) (hash-table-count y)) + (cl-hash-table-contents-equalp x y))) + ((eq 'bit-vector x-type) + (if (bit-vector-p y) + (equal x y) + (if (vectorp y) + (cl-bit-vector-vector-equalp x y) + ;; bit-vectors and strings are only equalp if they're + ;; zero-length: + (and (equal "" y) (equal #* x))))) + (t (equal x y))))))) ;;; Control structures. @@ -408,7 +501,7 @@ symbols (cdr symbols)) (push `(make-obsolete ',(intern (format "%s*" symbol)) ',symbol "21.5.29") - result) + result) (push `(defun ,(intern (format "%s*" symbol)) (number &optional divisor) ,(format "See `%s'. This returns a list, not multiple values." @@ -605,6 +698,18 @@ ;; XEmacs change: we have a builtin remprop (defalias 'cl-remprop 'remprop) +(defun get-properties (plist indicator-list) + "Find a property from INDICATOR-LIST in PLIST. +Return 3 values: +- the first property found, +- its value, +- the tail of PLIST beginning with the found entry." + (do ((plst plist (cddr plst))) + ((null plst) (values nil nil nil)) + (cond ((atom (cdr plst)) + (error "Malformed property list: %S." plist)) + ((memq (car plst) indicator-list) + (return (values (car plst) (cadr plst) plst)))))) ;;; Hash tables. @@ -671,7 +776,7 @@ (defun cl-do-prettyprint () (skip-chars-forward " ") (if (looking-at "(") - (let ((skip (or (looking-at "((") + (let ((skip (or (looking-at "((") ;; XEmacs: be selective about trailing stuff after prog (looking-at "(prog[nv12\\(ress-feedback\\|n-with-message\\)]") (looking-at "(unwind-protect ") diff -r 07fa38c30fdf -r 4dd2389173fc lisp/cl-macs.el --- a/lisp/cl-macs.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/cl-macs.el Sun Jan 10 01:06:15 2010 -0600 @@ -440,12 +440,19 @@ (while (and args (not (memq (car args) lambda-list-keywords))) (let ((arg (pop args))) (or (consp arg) (setq arg (list arg))) - (let* ((karg (if (consp (car arg)) (caar arg) - (intern (format ":%s" (car arg))))) + (let* ((karg (if (consp (car arg)) + ;; It's possible to use non-keywords here, as + ;; in the KEYWORD-ARGUMENT-NAME-PACKAGE Common + ;; Lisp issue: + (caar arg) + ;; Use read instead of intern in case we ever + ;; actually get packages and keywords are no + ;; longer in obarray: + (read (concat ":" (symbol-name (car arg)))))) (varg (if (consp (car arg)) (cadar arg) (car arg))) (def (if (cdr arg) (cadr arg) (or (car bind-defs) (cadr (assq varg bind-defs))))) - (look (list 'memq (list 'quote karg) restarg))) + (look (list 'memq (quote-maybe karg) restarg))) (and def bind-enquote (setq def (list 'quote def))) (if (cddr arg) (let* ((temp (or (nth 2 arg) (gensym))) @@ -467,12 +474,7 @@ 'quote (list nil (cl-const-expr-val def))) (list 'list nil def)))))))) - (push karg keys) - ;; XEmacs addition - (if (= (aref (symbol-name karg) 0) ?:) - (progn (set karg karg) - (push (list 'setq karg (list 'quote karg)) - bind-inits))))))) + (push karg keys))))) (setq keys (nreverse keys)) (or (and (eq (car args) '&allow-other-keys) (pop args)) (null keys) (= safety 0) @@ -487,7 +489,7 @@ (list 'setq var (list 'cdr (list 'cdr var)))) (list (list 'car (list 'cdr - (list 'memq (cons 'quote allow) + (list 'memq (car allow) restarg))) (list 'setq var nil)) (list t @@ -2596,7 +2598,7 @@ ;; I've just done) in the body of this function, and the following gives the ;; wrong behaviour for gethash: ;; -;; (setq my-hash-table #s(hash-table test equal data ()) +;; (setq my-hash-table #s(hash-table :test equal :data ()) ;; print-gensym t) ;; => t ;; (gethash "my-key" my-hash-table (gensym)) @@ -3348,6 +3350,140 @@ (regexp-quote string) form)) +(define-compiler-macro equalp (&whole form x y) + "Expand calls to `equalp' where X or Y is a constant expression. + +Much of the processing that `equalp' does is dependent on the types of both +of its arguments, and with type information for one of them, we can +eliminate much of the body of the function at compile time. + +Where both X and Y are constant expressions, `equalp' is evaluated at +compile time by byte-optimize.el--this compiler macro passes FORM through to +the byte optimizer in those cases." + ;; Cases where both arguments are constant are handled in + ;; byte-optimize.el, we only need to handle those cases where one is + ;; constant here. + (let* ((equalp-sym (eval-when-compile (gensym))) + (let-form '(progn)) + (check-bit-vector t) + (check-string t) + (original-y y) + equalp-temp checked) + (macrolet + ((unordered-check (check) + `(prog1 + (setq checked + (or ,check + (prog1 ,(sublis '((x . y) (y . x)) check :test #'eq) + (setq equalp-temp x x y y equalp-temp)))) + (when checked + (unless (symbolp y) + (setq let-form `(let ((,equalp-sym ,y))) y equalp-sym)))))) + ;; In the bodies of the below clauses, x is always a constant expression + ;; of the type we're interested in, and y is always a symbol that refers + ;; to the result non-constant side of the comparison. + (cond ((unordered-check (and (arrayp x) (not (cl-const-expr-p y)))) + ;; Strings and other arrays. A vector containing the same + ;; character elements as a given string is equalp to that string; + ;; a bit-vector can only be equalp to a string if both are + ;; zero-length. + (cond + ((member x '("" #* [])) + ;; No need to protect against multiple evaluation here: + `(and (member ,original-y '("" #* [])) t)) + ((stringp x) + `(,@let-form + (if (stringp ,y) + (eq t (compare-strings ,x nil nil + ,y nil nil t)) + (if (vectorp ,y) + (cl-string-vector-equalp ,x ,y))))) + ((bit-vector-p x) + `(,@let-form + (if (bit-vector-p ,y) + ;; No need to call equalp on each element here: + (equal ,x ,y) + (if (vectorp ,y) + (cl-bit-vector-vector-equalp ,x ,y))))) + (t + (loop + for elt across x + ;; We may not need to check the other argument if it's a + ;; string or bit vector, depending on the contents of x: + always (progn + (unless (characterp elt) (setq check-string nil)) + (unless (and (numberp elt) (or (= elt 0) (= elt 1))) + (setq check-bit-vector nil)) + (or check-string check-bit-vector))) + `(,@let-form + (cond + ,@(if check-string + `(((stringp ,y) + (cl-string-vector-equalp ,y ,x)))) + ,@(if check-bit-vector + `(((bit-vector-p ,y) + (cl-bit-vector-vector-equalp ,y ,x)))) + ((vectorp ,y) + (cl-vector-array-equalp ,x ,y))))))) + ((unordered-check (and (characterp x) (not (cl-const-expr-p y)))) + `(,@let-form + (or (eq ,x ,y) + ;; eq has a bytecode, char-equal doesn't. + (and (characterp ,y) + (eq (downcase ,x) (downcase ,y)))))) + ((unordered-check (and (numberp x) (not (cl-const-expr-p y)))) + `(,@let-form + (and (numberp ,y) + (= ,x ,y)))) + ((unordered-check (and (hash-table-p x) (not (cl-const-expr-p y)))) + ;; Hash tables; follow the CL spec. + `(,@let-form + (and (hash-table-p ,y) + (eq ',(hash-table-test x) (hash-table-test ,y)) + (= ,(hash-table-count x) (hash-table-count ,y)) + (cl-hash-table-contents-equalp ,x ,y)))) + ((unordered-check + ;; Symbols; eq. + (and (not (cl-const-expr-p y)) + (or (memq x '(nil t)) + (and (eq (car-safe x) 'quote) (symbolp (second x)))))) + (cons 'eq (cdr form))) + ((unordered-check + ;; Compare conses at runtime, there's no real upside to + ;; unrolling the function -> they fall through to the next + ;; clause in this function. + (and (cl-const-expr-p x) (not (consp x)) + (not (cl-const-expr-p y)))) + ;; All other types; use equal. + (cons 'equal (cdr form))) + ;; Neither side is a constant expression, do all our evaluation at + ;; runtime (or both are, and equalp will be called from + ;; byte-optimize.el). + (t form))))) + +(define-compiler-macro map (&whole form cl-type cl-func cl-seq + &rest cl-rest) + "If CL-TYPE is a constant expression that we know how to handle, transform +the call to `map' to a more efficient expression." + (cond + ;; The first two here rely on the compiler macros for mapc and mapcar*, + ;; to convert to mapc-internal and mapcar, where appropriate (that is, in + ;; the absence of cl-rest.) + ((null cl-type) + `(prog1 nil (mapc ,@(nthcdr 2 form)))) + ((equal '(quote list) cl-type) + (cons 'mapcar* (nthcdr 2 form))) + ((or (equal '(quote vector) cl-type) + (equal '(quote array) cl-type)) + (if cl-rest + `(vconcat (mapcar* ,@(nthcdr 2 form))) + (cons 'mapvector (nthcdr 2 form)))) + ((equal '(quote string) cl-type) + `(concat (mapcar* ,@(nthcdr 2 form)))) + ((equal '(quote bit-vector) cl-type) + `(bvconcat (mapcar* ,@(nthcdr 2 form)))) + (t form))) + (mapc #'(lambda (y) (put (car y) 'side-effect-free t) diff -r 07fa38c30fdf -r 4dd2389173fc lisp/cmdloop.el --- a/lisp/cmdloop.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/cmdloop.el Sun Jan 10 01:06:15 2010 -0600 @@ -344,35 +344,36 @@ (if (and teach-extended-commands-p (interactive-p)) ;; Remember the keys, run the command, and show the keys (if - ;; any). The funny variable names are a poor man's guarantee - ;; that we don't get tripped by this-command doing something - ;; funny. Quoth our forefathers: "We want lexical scope!" - (let ((_execute_command_keys_ (where-is-internal this-command)) - (_execute_command_name_ this-command)) ; the name can change - (command-execute this-command t) - (when _execute_command_keys_ - ;; Normally the region is adjusted in post_command_hook; - ;; however, it is not called until after we finish. It - ;; looks ugly for the region to get updated after the - ;; delays, so we do it now. The code below is a Lispified - ;; copy of code in event-stream.c:post_command_hook(). - (if (and (not zmacs-region-stays) - (or (not (eq (selected-window) (minibuffer-window))) - (eq (zmacs-region-buffer) (current-buffer)))) - (zmacs-deactivate-region) - (zmacs-update-region)) - ;; Wait for a while, so the user can see a message printed, - ;; if any. - (when (sit-for 1) - (display-message - 'no-log - (format (if (cdr _execute_command_keys_) - "Command `%s' is bound to keys: %s" - "Command `%s' is bound to key: %s") - _execute_command_name_ - (sorted-key-descriptions _execute_command_keys_))) - (sit-for teach-extended-commands-timeout) - (clear-message 'no-log)))) + ;; any). The symbol-macrolet avoids some lexical-scope lossage. + (symbol-macrolet + ((execute-command-keys #:execute-command-keys) + (execute-command-name #:execute-command-name)) + (let ((execute-command-keys (where-is-internal this-command)) + (execute-command-name this-command)) ; the name can change + (command-execute this-command t) + (when execute-command-keys + ;; Normally the region is adjusted in post_command_hook; + ;; however, it is not called until after we finish. It + ;; looks ugly for the region to get updated after the + ;; delays, so we do it now. The code below is a Lispified + ;; copy of code in event-stream.c:post_command_hook(). + (if (and (not zmacs-region-stays) + (or (not (eq (selected-window) (minibuffer-window))) + (eq (zmacs-region-buffer) (current-buffer)))) + (zmacs-deactivate-region) + (zmacs-update-region)) + ;; Wait for a while, so the user can see a message printed, + ;; if any. + (when (sit-for 1) + (display-message + 'no-log + (format (if (cdr execute-command-keys) + "Command `%s' is bound to keys: %s" + "Command `%s' is bound to key: %s") + execute-command-name + (sorted-key-descriptions execute-command-keys))) + (sit-for teach-extended-commands-timeout) + (clear-message 'no-log))))) ;; Else, just run the command. (command-execute this-command t))) diff -r 07fa38c30fdf -r 4dd2389173fc lisp/cus-edit.el --- a/lisp/cus-edit.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/cus-edit.el Sun Jan 10 01:06:15 2010 -0600 @@ -1779,31 +1779,39 @@ ;; Use call-with-condition-handler so the error can be seen ;; with the stack intact. (call-with-condition-handler - #'(lambda (__custom_load_cd1__) - (when (and - custom-define-current-source-file - (progn - (setq source (expand-file-name - custom-define-current-source-file - dir)) - (let ((nondir (file-name-nondirectory source))) - (and (file-exists-p source) - (not (assoc source load-history)) - (not (assoc nondir load-history)) - (not (and (boundp 'preloaded-file-list) - (member nondir - preloaded-file-list))))))) - (if custom-warn-when-reloading-necessary - (lwarn 'custom-defines 'warning - "Error while loading custom-defines, fetching source and reloading ...\n + ((macro + . (lambda (lambda-expression) + ;; Be more serious about information hiding here: + (nsublis + '((custom-load-handler-arg . #:custom-load-g9JBHiZHD)) + lambda-expression))) + #'(lambda (custom-load-handler-arg) + (when (and + custom-define-current-source-file + (progn + (setq source (expand-file-name + custom-define-current-source-file + dir)) + (let ((nondir (file-name-nondirectory source))) + (and (file-exists-p source) + (not (assoc source load-history)) + (not (assoc nondir load-history)) + (not (and (boundp 'preloaded-file-list) + (member nondir + preloaded-file-list))))))) + (if custom-warn-when-reloading-necessary + (lwarn 'custom-defines 'warning + "Error while loading custom-defines, fetching \ +source and reloading ...\n Error: %s\n Source file: %s\n\n Backtrace follows:\n\n%s" - (error-message-string __custom_load_cd1__) - source - (backtrace-in-condition-handler-eliminating-handler - '__custom_load_cd1__))) - (return-from custom-load nil))) + (error-message-string custom-load-handler-arg) + source + (backtrace-in-condition-handler-eliminating-handler + 'custom-load-handler-arg +))) + (return-from custom-load nil)))) #'(lambda () (load (expand-file-name "custom-defines" dir)))))) ;; we get here only from the `return-from'; see above diff -r 07fa38c30fdf -r 4dd2389173fc lisp/descr-text.el --- a/lisp/descr-text.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/descr-text.el Sun Jan 10 01:06:15 2010 -0600 @@ -291,7 +291,7 @@ "The DB format to use for the `describe-char' cache, or nil if no cache.") (defvar describe-char-unihan-field-descriptions - #s(hash-table test equal data + #s(hash-table :test equal :data ("kAccountingNumeric" "Value as an an accounting numeral" "kBigFive" diff -r 07fa38c30fdf -r 4dd2389173fc lisp/glyphs.el --- a/lisp/glyphs.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/glyphs.el Sun Jan 10 01:06:15 2010 -0600 @@ -1142,7 +1142,8 @@ (if (featurep 'x) (set-console-type-image-conversion-list 'x `(,@(if (featurep 'xpm) '(("\\.xpm\\'" [xpm :file nil] 2))) - ("\\.xbm\\'" [xbm :file nil] 2) + ("\\.xbm\\'" [xbm :file nil] 2) + ("/bitmaps/" [xbm :file nil] 2) ,@(if (featurep 'xpm) '(("\\`/\\* XPM \\*/" [xpm :data nil] 2))) ,@(if (featurep 'xface) '(("\\`X-Face:" [xface :data nil] 2))) ,@(if (featurep 'gif) '(("\\.gif\\'" [gif :file nil] 2) @@ -1164,6 +1165,7 @@ 'tty '(("\\.xpm\\'" [string :data nil] 2) ("\\.xbm\\'" [string :data nil] 2) + ("/bitmaps/" [string :data nil] 2) ;; #define could also mean a bitmap as well as a version 1 XPM. Who ;; cares. ("^#define" [string :data "[xpm]"]) diff -r 07fa38c30fdf -r 4dd2389173fc lisp/indent.el --- a/lisp/indent.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/indent.el Sun Jan 10 01:06:15 2010 -0600 @@ -289,7 +289,7 @@ "Short cut function to indent region using `indent-according-to-mode'. A value of nil means really run `indent-according-to-mode' on each line.") -(defun indent-region (start end column) +(defun indent-region (start end &optional column) "Indent each nonblank line in the region. With no argument, indent each line using `indent-according-to-mode', or use `indent-region-function' to do the whole region if that's non-nil. diff -r 07fa38c30fdf -r 4dd2389173fc lisp/list-mode.el --- a/lisp/list-mode.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/list-mode.el Sun Jan 10 01:06:15 2010 -0600 @@ -174,8 +174,9 @@ (if extent (goto-char (extent-end-position extent))) ;; Move to start of next one. (or (extent-at (point) (current-buffer) 'list-mode-item) - (goto-char (next-single-property-change (point) 'list-mode-item - nil end)))) + (goto-char (next-single-char-property-change (point) + 'list-mode-item + nil end)))) (setq n (1- n))) (while (and (< n 0) (not (bobp))) (let ((extent (extent-at (point) (current-buffer) 'list-mode-item)) @@ -186,7 +187,7 @@ (if (setq extent (extent-at (point) (current-buffer) 'list-mode-item nil 'before)) (goto-char (extent-start-position extent)) - (goto-char (previous-single-property-change + (goto-char (previous-single-char-property-change (point) 'list-mode-item nil end)) (if (setq extent (extent-at (point) (current-buffer) 'list-mode-item nil 'before)) @@ -648,7 +649,7 @@ (if (not (get-buffer-window "*Completions*")) nil (select-window (get-buffer-window "*Completions*")) - (goto-char (next-single-property-change (point-min) 'list-mode-item nil - (point-max))))) + (goto-char (next-single-char-property-change (point-min) 'list-mode-item + nil (point-max))))) ;;; list-mode.el ends here diff -r 07fa38c30fdf -r 4dd2389173fc lisp/minibuf.el --- a/lisp/minibuf.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/minibuf.el Sun Jan 10 01:06:15 2010 -0600 @@ -344,13 +344,16 @@ (define-error 'input-error "Keyboard input error" 'io-error) -(defun read-from-minibuffer (prompt &optional initial-contents - keymap - readp - history - abbrev-table - default) - "Read a string from the minibuffer, prompting with string PROMPT. +((macro + . (lambda (read-from-minibuffer-definition) + (nsublis + ;; `M-x doctor' makes (the interned) history a local variable, use an + ;; uninterned symbol here so we don't interact with it. + '((history . #:history)) + read-from-minibuffer-definition))) + (defun read-from-minibuffer (prompt &optional initial-contents keymap + readp history abbrev-table default) + "Read a string from the minibuffer, prompting with string PROMPT. If optional second arg INITIAL-CONTENTS is non-nil, it is a string to be inserted into the minibuffer before reading input. If INITIAL-CONTENTS is (STRING . POSITION), the initial input @@ -376,50 +379,45 @@ See also the variable `completion-highlight-first-word-only' for control over completion display." - (if (and (not enable-recursive-minibuffers) - (> (minibuffer-depth) 0) - (eq (selected-window) (minibuffer-window))) - (error "Command attempted to use minibuffer while in minibuffer")) + (if (and (not enable-recursive-minibuffers) + (> (minibuffer-depth) 0) + (eq (selected-window) (minibuffer-window))) + (error "Command attempted to use minibuffer while in minibuffer")) - (if (and minibuffer-max-depth - (> minibuffer-max-depth 0) - (>= (minibuffer-depth) minibuffer-max-depth)) - (minibuffer-max-depth-exceeded)) + (if (and minibuffer-max-depth + (> minibuffer-max-depth 0) + (>= (minibuffer-depth) minibuffer-max-depth)) + (minibuffer-max-depth-exceeded)) - ;; catch this error before the poor user has typed something... - (if history - (if (symbolp history) - (or (boundp history) - (error "History list %S is unbound" history)) - (or (boundp (car history)) - (error "History list %S is unbound" (car history))))) + ;; catch this error before the poor user has typed something... + (if history + (if (symbolp history) + (or (boundp history) + (error "History list %S is unbound" history)) + (or (boundp (car history)) + (error "History list %S is unbound" (car history))))) - (if (noninteractive) - (progn - ;; XEmacs in -batch mode calls minibuffer: print the prompt. - (message "%s" (gettext prompt)) - ;;#### force-output + (if (noninteractive) + (progn + ;; XEmacs in -batch mode calls minibuffer: print the prompt. + (message "%s" (gettext prompt)) + ;;#### force-output - ;;#### Should this even be falling though to the code below? - ;;#### How does this stuff work now, anyway? - )) - (let* ((dir default-directory) - (owindow (selected-window)) - (oframe (selected-frame)) - (window (minibuffer-window)) - (buffer (get-buffer-create (format " *Minibuf-%d*" - (minibuffer-depth)))) - (frame (window-frame window)) - (mconfig (if (eq frame (selected-frame)) - nil (current-window-configuration frame))) - (oconfig (current-window-configuration)) - ;; dynamic scope sucks sucks sucks sucks sucks sucks. - ;; `M-x doctor' makes history a local variable, and thus - ;; our binding above is buffer-local and doesn't apply - ;; once we switch buffers!!!! We demand better scope! - (_history_ history) - (minibuffer-default default)) - (unwind-protect + ;;#### Should this even be falling though to the code below? + ;;#### How does this stuff work now, anyway? + )) + (let* ((dir default-directory) + (owindow (selected-window)) + (oframe (selected-frame)) + (window (minibuffer-window)) + (buffer (get-buffer-create (format " *Minibuf-%d*" + (minibuffer-depth)))) + (frame (window-frame window)) + (mconfig (if (eq frame (selected-frame)) + nil (current-window-configuration frame))) + (oconfig (current-window-configuration)) + (minibuffer-default default)) + (unwind-protect (progn (set-buffer (reset-buffer buffer)) (setq default-directory dir) @@ -462,14 +460,14 @@ (current-buffer))) (current-prefix-arg current-prefix-arg) ;; (help-form minibuffer-help-form) - (minibuffer-history-variable (cond ((not _history_) + (minibuffer-history-variable (cond ((not history) 'minibuffer-history) - ((consp _history_) - (car _history_)) + ((consp history) + (car history)) (t - _history_))) - (minibuffer-history-position (cond ((consp _history_) - (cdr _history_)) + history))) + (minibuffer-history-position (cond ((consp history) + (cdr history)) (t 0))) (minibuffer-scroll-window owindow)) @@ -479,16 +477,16 @@ (setq local-abbrev-table abbrev-table abbrev-mode t)) ;; This is now run from read-minibuffer-internal - ;(if minibuffer-setup-hook - ; (run-hooks 'minibuffer-setup-hook)) - ;(message nil) + ;(if minibuffer-setup-hook + ; (run-hooks 'minibuffer-setup-hook)) + ;(message nil) (if (eq 't (catch 'exit (if (> (recursion-depth) (minibuffer-depth)) (let ((standard-output t) (standard-input t)) (read-minibuffer-internal prompt)) - (read-minibuffer-internal prompt)))) + (read-minibuffer-internal prompt)))) ;; Translate an "abort" (throw 'exit 't) ;; into a real quit (signal 'quit '()) @@ -538,21 +536,20 @@ (cons histval list)))))) (if err (signal (car err) (cdr err))) val)))) - ;; stupid display code requires this for some reason - (set-buffer buffer) - (buffer-disable-undo buffer) - (setq buffer-read-only nil) - (erase-buffer) + ;; stupid display code requires this for some reason + (set-buffer buffer) + (buffer-disable-undo buffer) + (setq buffer-read-only nil) + (erase-buffer) - ;; restore frame configurations - (if (and mconfig (frame-live-p oframe) - (eq frame (selected-frame))) - ;; if we changed frames (due to surrogate minibuffer), - ;; and we're still on the new frame, go back to the old one. - (select-frame oframe)) - (if mconfig (set-window-configuration mconfig)) - (set-window-configuration oconfig)))) - + ;; restore frame configurations + (if (and mconfig (frame-live-p oframe) + (eq frame (selected-frame))) + ;; if we changed frames (due to surrogate minibuffer), + ;; and we're still on the new frame, go back to the old one. + (select-frame oframe)) + (if mconfig (set-window-configuration mconfig)) + (set-window-configuration oconfig))))) (defun minibuffer-max-depth-exceeded () ;; diff -r 07fa38c30fdf -r 4dd2389173fc lisp/mule/arabic.el --- a/lisp/mule/arabic.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/mule/arabic.el Sun Jan 10 01:06:15 2010 -0600 @@ -28,35 +28,6 @@ ;;; Code: -;; ISO 8859-6 is such a useless character set that it seems a waste of -;; codespace to dump it. Let me count the ways: -;; -;; 1. It doesn't support Persian or Urdu, let alone Sinhalese, despite -;; plenty of unallocated code points. -;; -;; 2. It doesn't encode all the vowel diacritics (the Harakaat) despite that -;; they are necessary, even for the Arabs, for basic things like -;; dictionary entries, children's books, and occasional disambiguation. -;; -;; 3. The Arabs don't use it, they use Windows-1256, which also supports -;; Persian, at least, as well as the French characters necessary in -;; Lebanon and North Africa. - -;; But; it's necessary for input on X11. - -(make-charset - 'arabic-iso8859-6 - "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127" - '(dimension 1 - registry "ISO8859-6" - chars 96 - columns 1 - direction r2l - final ?G - graphic 1 - short-name "RHP of ISO8859/6" - long-name "RHP of Arabic (ISO 8859-6): ISO-IR-127")) - (make-coding-system 'iso-8859-6 'fixed-width "ISO 8859-6 (Arabic)" '(unicode-map diff -r 07fa38c30fdf -r 4dd2389173fc lisp/mule/mule-category.el --- a/lisp/mule/mule-category.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/mule/mule-category.el Sun Jan 10 01:06:15 2010 -0600 @@ -244,6 +244,7 @@ (latin-iso8859-4 ?l) (latin-iso8859-9 ?l) (cyrillic-iso8859-5 ?y "Cyrillic character set") + (arabic-iso8859-6 ?b "Arabic character set") (greek-iso8859-7 ?g "Greek character set") (hebrew-iso8859-8 ?w "Hebrew character set") (katakana-jisx0201 ?k "Japanese 1-byte Katakana character set") diff -r 07fa38c30fdf -r 4dd2389173fc lisp/mule/mule-msw-init-late.el --- a/lisp/mule/mule-msw-init-late.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/mule/mule-msw-init-late.el Sun Jan 10 01:06:15 2010 -0600 @@ -37,6 +37,7 @@ (greek-iso8859-7 . "Greek") (latin-iso8859-9 . "Turkish") (hebrew-iso8859-8 . "Hebrew") + (arabic-iso8859-6 . "Arabic") (latin-iso8859-4 . "Baltic") (vietnamese-viscii-lower . "Viet Nam") (vietnamese-viscii-upper . "Viet Nam") diff -r 07fa38c30fdf -r 4dd2389173fc lisp/startup.el --- a/lisp/startup.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/startup.el Sun Jan 10 01:06:15 2010 -0600 @@ -1046,9 +1046,15 @@ (load-user-init-file)) (condition-case nil (call-with-condition-handler - #'(lambda (__load_init_file_arg__) + ((macro + . (lambda (lambda-expression) + ;; Be serious about information hiding here: + (nsublis + '((load-init-handler-arg . #:load-init-gZK6A36gTed)) + lambda-expression))) + #'(lambda (load-init-handler-arg) (let ((errstr (error-message-string - __load_init_file_arg__))) + load-init-handler-arg))) (message "Error in init file: %s" errstr) (lwarn 'initialization 'error "\ @@ -1066,8 +1072,8 @@ exact problem." user-init-file errstr (backtrace-in-condition-handler-eliminating-handler - '__load_init_file_arg__))) - (setq init-file-had-error t)) + 'load-init-handler-arg))) + (setq init-file-had-error t))) #'(lambda () (if load-user-init-file-p (load-user-init-file)) diff -r 07fa38c30fdf -r 4dd2389173fc lisp/subr.el --- a/lisp/subr.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/subr.el Sun Jan 10 01:06:15 2010 -0600 @@ -1118,14 +1118,26 @@ (setq plist (cddr plist))) (nreverse alist))) -(defun map-plist (_mp_fun _mp_plist) - "Map _MP_FUN (a function of two args) over each key/value pair in _MP_PLIST. +((macro + . (lambda (map-plist-definition) + "Replace the variable names in MAP-PLIST-DEFINITION with uninterned +symbols, avoiding the risk of interference with variables in other functions +introduced by dynamic scope." + (if-fboundp 'nsublis + (nsublis + '((mp-function . #:function) + (plist . #:plist) + (result . #:result)) + map-plist-definition) + map-plist-definition))) + (defun map-plist (mp-function plist) + "Map FUNCTION (a function of two args) over each key/value pair in PLIST. Return a list of the results." - (let (_mp_result) - (while _mp_plist - (push (funcall _mp_fun (car _mp_plist) (cadr _mp_plist)) _mp_result) - (setq _mp_plist (cddr _mp_plist))) - (nreverse _mp_result))) + (let (result) + (while plist + (push (funcall mp-function (car plist) (cadr plist)) result) + (setq plist (cddr plist))) + (nreverse result)))) (defun destructive-plist-to-alist (plist) "Convert property list PLIST into the equivalent association-list form. @@ -1464,7 +1476,9 @@ (no-backtrace nil) (class ''general) (level ''warning) - (resignal nil)) + (resignal nil) + (cte-cc-var '#:cte-cc-var) + (call-trapping-errors-arg '#:call-trapping-errors-Ldc9FC5Hr)) (let* ((keys '(operation error-form no-backtrace class level resignal)) (keys-with-colon (mapcar #'(lambda (sym) @@ -1473,11 +1487,11 @@ (let* ((key-with-colon (pop keys-body)) (key (intern (substring (symbol-name key-with-colon) 1)))) (set key (pop keys-body))))) - `(condition-case ,(if resignal '__cte_cc_var__ nil) + `(condition-case ,(if resignal cte-cc-var nil) (call-with-condition-handler - #'(lambda (__call_trapping_errors_arg__) + #'(lambda (,call-trapping-errors-arg) (let ((errstr (error-message-string - __call_trapping_errors_arg__))) + ,call-trapping-errors-arg))) ,(if no-backtrace `(lwarn ,class ,level (if (warning-level-< @@ -1490,12 +1504,12 @@ "Error in %s: %s\n\nBacktrace follows:\n\n%s" ,operation errstr (backtrace-in-condition-handler-eliminating-handler - '__call_trapping_errors_arg__))))) + ',call-trapping-errors-arg))))) #'(lambda () (progn ,@keys-body))) (error ,error-form - ,@(if resignal '((signal (car __cte_cc_var__) (cdr __cte_cc_var__))))) + ,@(if resignal `((signal (car ,cte-cc-var) (cdr ,cte-cc-var))))) ))) ;;;; Miscellanea. diff -r 07fa38c30fdf -r 4dd2389173fc lisp/syntax.el --- a/lisp/syntax.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/syntax.el Sun Jan 10 01:06:15 2010 -0600 @@ -205,21 +205,35 @@ (wrong-type-argument 'syntax-table-p syntax-table)))) nil) -(defun map-syntax-table (__function __syntax_table &optional __range) - "Map FUNCTION over entries in SYNTAX-TABLE, collapsing inheritance. +((macro + . (lambda (map-syntax-definition) + "Replace the variable names in MAP-SYNTAX-DEFINITION with uninterned +symbols, at byte-compile time. This avoids the risk of variable names +within the functions called from MAP-SYNTAX-DEFINITION being shared with +MAP-SYNTAX-DEFINITION, and as such subject to modification, one of the +common downsides of dynamic scope." + (nsublis + '((syntax-table . #:syntax-table) + (m-s-function . #:function) + (range . #:range) + (key . #:key) + (value . #:value)) + map-syntax-definition))) + (defun map-syntax-table (m-s-function syntax-table &optional range) + "Map FUNCTION over entries in SYNTAX-TABLE, collapsing inheritance. This is similar to `map-char-table', but works only on syntax tables, and collapses any entries that call for inheritance by invisibly substituting the inherited values from the standard syntax table." - (check-argument-type 'syntax-table-p __syntax_table) - (map-char-table #'(lambda (__key __value) - (if (eq ?@ (char-syntax-from-code __value)) - (map-char-table #'(lambda (__key __value) - (funcall __function - __key __value)) - (standard-syntax-table) - __key) - (funcall __function __key __value))) - __syntax_table __range)) + (check-argument-type 'syntax-table-p syntax-table) + (map-char-table #'(lambda (key value) + (if (eq ?@ (char-syntax-from-code value)) + (map-char-table + #'(lambda (key value) + (funcall m-s-function key value)) + (standard-syntax-table) + key) + (funcall m-s-function key value))) + syntax-table range))) ;(defun test-xm () ; (let ((o (copy-syntax-table)) diff -r 07fa38c30fdf -r 4dd2389173fc lisp/unicode.el --- a/lisp/unicode.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/unicode.el Sun Jan 10 01:06:15 2010 -0600 @@ -154,7 +154,7 @@ '(ascii control-1 latin-iso8859-1 latin-iso8859-2 latin-iso8859-15 greek-iso8859-7 hebrew-iso8859-8 ipa cyrillic-iso8859-5 latin-iso8859-16 latin-iso8859-3 latin-iso8859-4 latin-iso8859-9 - vietnamese-viscii-lower vietnamese-viscii-upper + vietnamese-viscii-lower vietnamese-viscii-upper arabic-iso8859-6 jit-ucs-charset-0 japanese-jisx0208 japanese-jisx0208-1978 japanese-jisx0212 japanese-jisx0213-1 japanese-jisx0213-2 chinese-gb2312 chinese-sisheng chinese-big5-1 chinese-big5-2 diff -r 07fa38c30fdf -r 4dd2389173fc lisp/x-faces.el --- a/lisp/x-faces.el Sun Jan 10 00:49:30 2010 -0600 +++ b/lisp/x-faces.el Sun Jan 10 01:06:15 2010 -0600 @@ -910,10 +910,14 @@ ;;; specified. ;;; (defun x-init-global-faces () - (or (face-foreground 'default 'global) - (set-face-foreground 'default "black" 'global '(x default))) - (or (face-background 'default 'global) - (set-face-background 'default "gray80" 'global '(x default)))) + ;; #### NOTE: this code is probably an oldy: faces.c ensures that we have + ;; working fallback values so there is no need to initialize anything here. + ;; -- dvl + ;; (or (face-foreground 'default 'global) + ;; (set-face-foreground 'default "black" 'global '(x default))) + ;; (or (face-background 'default 'global) + ;; (set-face-background 'default "gray80" 'global '(x default)) + ) ;;; x-init-device-faces is responsible for initializing default ;;; values for faces on a newly created device. @@ -959,21 +963,21 @@ ;; likely to know what to do about it. ]] - ;; - ;; If the "default" face didn't have both colors specified, then pick - ;; some, taking into account whether one of the colors was specified. - ;; - (let ((fg (face-foreground-instance 'default device)) - (bg (face-background-instance 'default device))) - (if (not (and fg bg)) - (if (or (and fg (equalp (color-instance-name fg) "white")) - (and bg (equalp (color-instance-name bg) "black"))) - (progn - (or fg (set-face-foreground 'default "white" device)) - (or bg (set-face-background 'default "black" device))) - (or fg (set-face-foreground 'default "white" device)) - (or bg (set-face-background 'default "black" device))))) + ;; #### NOTE: this code is probably an oldy as well (as per Ben's comment + ;; above): faces.c ensures that we have working fallback values so there is + ;; no need to initialize anything here. -- dvl + ;; (let ((fg (face-foreground-instance 'default device)) + ;; (bg (face-background-instance 'default device))) + ;; (if (not (and fg bg)) + ;; (if (or (and fg (equalp (color-instance-name fg) "white")) + ;; (and bg (equalp (color-instance-name bg) "black"))) + ;; (progn + ;; (or fg (set-face-foreground 'default "white" device)) + ;; (or bg (set-face-background 'default "black" device))) + ;; (or fg (set-face-foreground 'default "white" device)) + ;; (or bg (set-face-background 'default "black" device))))) + ;; Don't look at reverseVideo now or initialize the modeline. This ;; is done on a per-frame basis at the appropriate time. @@ -1005,17 +1009,20 @@ ;; (cond ((car (x-get-resource "reverseVideo" "ReverseVideo" 'boolean frame nil 'warn)) - ;; First make sure the modeline has fg and bg, inherited from the - ;; current default face - for the case where only one is specified, - ;; so that invert-face doesn't do something weird. - (or (face-foreground 'modeline frame) - (set-face-foreground 'modeline - (face-foreground-instance 'default frame) - frame)) - (or (face-background 'modeline frame) - (set-face-background 'modeline - (face-background-instance 'default frame) - frame)) + ;; #### NOTE: again, this is probably yet another oldy: faces.c + ;; ensures sane fallbacks for the modeline face. Besides, this face + ;; does not inherit from the default face, but from the gui-element + ;; one.-- dvl + + ;; (or (face-foreground 'modeline frame) + ;; (set-face-foreground 'modeline + ;; (face-foreground-instance 'default frame) + ;; frame)) + ;; (or (face-background 'modeline frame) + ;; (set-face-background 'modeline + ;; (face-background-instance 'default frame) + ;; frame)) + ;; Now invert both of them. If they end up looking the same, ;; make-frame-initial-faces will invert the modeline again later. (invert-face 'default frame) diff -r 07fa38c30fdf -r 4dd2389173fc man/ChangeLog --- a/man/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/man/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,8 @@ +2010-01-06 Jerry James + + * internals/internals.texi (Debugging and Testing): Document + valgrind configuration and use. + 2009-12-21 Jerry James * internals/internals.texi (A Summary of the Various XEmacs Modules): @@ -17,6 +22,14 @@ Remove references to xmu.c and xmu.h. (Modules for Interfacing with X Windows): Ditto. +2010-01-09 Aidan Kehoe + + * lispref/objects.texi (Hash Table Type): + * lispref/hash-tables.texi (Introduction to Hash Tables): + Use keywords, not ordinary symbols, in the hash table read syntax; + document that we do accept the ordinary symbols for the sake of + backward-compatiblity. + 2009-11-10 Jerry James * internals/internals.texi (XEmacs from the Perspective of Building): @@ -33,6 +46,11 @@ * xemacs-faq.texi (Q1.2.2: What versions of Unix does XEmacs run on?): Ditto. +2009-11-08 Aidan Kehoe + + * lispref/objects.texi (Equality Predicates): + Document #'equalp here, as well as #'equal and #'eq. + 2009-10-05 Jerry James * beta.texi (Building XEmacs from a full distribution): Remove diff -r 07fa38c30fdf -r 4dd2389173fc man/internals/internals.texi --- a/man/internals/internals.texi Sun Jan 10 00:49:30 2010 -0600 +++ b/man/internals/internals.texi Sun Jan 10 01:06:15 2010 -0600 @@ -6225,6 +6225,13 @@ temacs -batch -l loadup.el run-temacs @var{xemacs-args...} @end example +@cindex Valgrind +To make an XEmacs that can tell valgrind to do a memory leak check at +runtime, configure @code{--with-valgrind}. If XEmacs has been +configured @code{--with-newgc}, then valgrind must be invoked with +@code{--vex-iropt-precise-memory-exns=yes} in order to handle signals +properly. + @cindex error checking Before you go through the trouble, are you compiling with all debugging and error-checking off? If not, try that first. Be warned diff -r 07fa38c30fdf -r 4dd2389173fc man/lispref/hash-tables.texi --- a/man/lispref/hash-tables.texi Sun Jan 10 00:49:30 2010 -0600 +++ b/man/lispref/hash-tables.texi Sun Jan 10 01:06:15 2010 -0600 @@ -65,12 +65,15 @@ Hash tables can also be created by the lisp reader using structure syntax, for example: @example -#s(hash-table size 20 data (foo 1 bar 2)) +#s(hash-table :size 20 :data (foo 1 bar 2)) @end example -The structure syntax accepts the same keywords as @code{make-hash-table} -(without the @code{:} character), as well as the additional keyword -@code{data}, which specifies the initial hash table contents. +The structure syntax accepts the same keywords as +@code{make-hash-table}, as well as the additional keyword @code{data}, +which specifies the initial hash table contents. Older versions of +XEmacs required that the keywords not have the initial ``:'' in the +structure syntax, and this version of XEmacs still supports that syntax, +but you cannot mix the two styles within one structure. @defun make-hash-table &key @code{test} @code{size} @code{rehash-size} @code{rehash-threshold} @code{weakness} This function returns a new empty hash table object. diff -r 07fa38c30fdf -r 4dd2389173fc man/lispref/objects.texi --- a/man/lispref/objects.texi Sun Jan 10 00:49:30 2010 -0600 +++ b/man/lispref/objects.texi Sun Jan 10 01:06:15 2010 -0600 @@ -1320,7 +1320,7 @@ @example @group (make-hash-table :size 50) - @result{} # + @result{} # @end group @end example @@ -2424,3 +2424,56 @@ The test for equality is implemented recursively, and circular lists may therefore cause infinite recursion (leading to an error). + +@defun equalp object1 object2 +This function is like @code{equal}, but compares characters and strings +case-insensitively; numbers are compared using @code{=}; arrays (that +is, strings, bit-vectors and vectors) are regarded as being +@code{equalp} if their contents are @code{equalp}; and +@code{hash-tables} are @code{equalp} if their values are @code{equalp} +and they would otherwise be @code{equal}. + +@code{equalp} is recursive with vectors, lists and hash-tables, but not +with other complex types. For types without a defined @code{equalp} +behavior, @code{equalp} behaves as @code{equal} does. + +@example +@group +(equalp "asdf" "ASDF") + @result{} t +@end group +@group +(equalp "asdf" [?a ?s ?D ?F]) + @result{} t +@end group +@group +(equalp "asdf" [?a ?s ?D ?F ?g]) + @result{} nil +@end group +@group +(equalp "" (bit-vector)) + @result{} t +@end group +@group +(equalp #s(hash-table) (make-hash-table)) + @result{} t +@end group +@group +(equalp #s(hash-table data (t "hi there")) + (let ((ht (make-hash-table))) + (puthash t "HI THERE" ht) + ht)) + @result{} t +@group +@end group +(equalp #s(hash-table test eq data (1.0 "hi there")) + (let ((ht (make-hash-table :test 'eql))) + (puthash 1.0 "HI THERE" ht) + ht)) + @result{} nil +@end group +@end example +@end defun + +@code{equalp} can also provoke an error if handed a circular structure, +as with @code{equal}. diff -r 07fa38c30fdf -r 4dd2389173fc src/ChangeLog --- a/src/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/src/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,92 @@ +2010-01-09 Didier Verna + + * glyphs.c (query_string_font): Use proper domain for cachel + updating. + +2010-01-09 Didier Verna + + Fix query_string_geometry lookup domain. + * redisplay.c (redisplay_window_text_width_ichar_string): Formerly + named redisplay_text_width_ichar_string. + * redisplay.c (redisplay_window_text_width_string): Formerly named + redisplay_text_width_string. Make static. + * redisplay.c (redisplay_text_width_string): Formerly named + redisplay_frame_text_width_string. Generalize to accept any + Lisp_Object domain argument (instead of only frames). + * redisplay.c (add_ichar_rune_1): Update funcalls for the above + renaming. + * redisplay.c (generate_fstring_runes): Ditto. + * redisplay.h: Ditto. + * glyphs.c (query_string_geometry): Use proper domain for cachel + updating and in generalized version of redisplay_text_width_string. + +2010-01-08 Aidan Kehoe + + * mule-charset.c (Fmake_charset): + Change build_string with an Ibyte argument to build_intstring, + fixing the build on Visual C++. Thank you for the report, Vin. + +2010-01-07 Jerry James + + * font-mgr.c (Ffc_font_match): Initialize result to FcResultMatch + before calling FcFontMatch. + * objects-xlike-inc.c (xft_find_charset_font): Ditto. + +2010-01-07 Henrique Martins + + * dired.c (file_name_completion): If a file is too big to stat(), + ignore the error, since we don't use the size. + +2010-01-07 Aidan Kehoe + + * mule-charset.c: + (syms_of_mule_charset, complex_vars_of_mule_charset): + * lisp.h: + Restore the creation of arabic-iso8859-6 in C, having it in Lisp + isn't sufficient for X11 input to work. + +2010-01-06 Jerry James + + * emacs.c (main_1): Only call reinit_vars_of_number if + WITH_NUMBER_TYPES. + +2010-01-06 Jerry James + + * alloc.c: Include valgrind header if USE_VALGRIND. + (Fvalgrind_leak_check): New function. + (Fvalgrind_quick_leak_check): New function. + (syms_of_alloc): Declare the new functions. + * config.h.in (USE_VALGRIND): New define. + +2010-01-06 Jerry James + + * emacs.c: Fix FSF address. + (main_1): Call reinit_vars_of_number. + * number-gmp.c: Fix FSF address. + * number-gmp.h: Ditto. + * number-mp.c: Ditto. + * number-mp.h: Ditto. + * number.h: Ditto. + * number.c: Ditto. + (bignum_finalize): New function. + (ratio_finalize): New function. + (bigfloat_finalize): New function. + (vars_of_number): Don't create a bignum here. + (reinit_vars_of_number): New function; create a bignum here. + (init_number): Call reinit_vars_of_number if !PDUMP. + * symsinit.h: Fix FSF address. Declare reinit_vars_of_number. + +2010-01-05 Jerry James + + * font-mgr.c (Ffc_name_unparse): Return value of FcNameUnparse + must be freed. + +2009-12-31 Aidan Kehoe + + * eval.c (Ffunctionp): + Special forms no longer give t in this function, in accordance + with recent GNU Emacs and with Common Lisp. + 2009-12-21 Jerry James * config.h.in: Remove OffiX support. @@ -26,6 +115,16 @@ against msvcrt8. This fix was taken from the Mozilla project which experienced the same problem. +2009-12-19 Aidan Kehoe + + * symbols.c (reject_constant_symbols): + Indicate that accepting attempted modification of keywords is a + temporary thing. + +2009-12-23 Stephen J. Turnbull + + * fns.c (Fcompare_strings): Coerce bounds to be within strings. + 2009-12-18 Jerry James * ppc.ldscript: Remove, obsolete. @@ -91,11 +190,28 @@ * xmu.h: Ditto. * depend: Regenerate. +2010-01-01 Aidan Kehoe + + * mule-charset.c (Fmake_charset): + Don't intern the symbols used to refer to temporary character + sets, that doesn't bring us anything. + 2009-12-05 Stephen J. Turnbull * faces.c (complex_vars_of_faces): Explain why "*" isn't rewritten as a full XLFD. +2010-01-09 Aidan Kehoe + + * elhash.c: + (print_hash_table, print_hash_table_data) + (hash_table_instantiate) + (structure_type_create_hash_table_structure_name): + (syms_of_elhash): + Use keywords, not ordinary symbols, in the hash table read syntax, + for compatibility with Common Lisp and recent GNU Emacs. Accept + the non-keyword syntax, but don't allow mixing of the two styles. + 2009-11-19 Vin Shelton * sysdep.c (sys_subshell): Restore sys_subshell(); it's necessary diff -r 07fa38c30fdf -r 4dd2389173fc src/alloc.c --- a/src/alloc.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/alloc.c Sun Jan 10 01:06:15 2010 -0600 @@ -71,6 +71,9 @@ #ifdef DOUG_LEA_MALLOC #include #endif +#ifdef USE_VALGRIND +#include +#endif EXFUN (Fgarbage_collect, 0); @@ -4699,6 +4702,29 @@ } #endif /* ALLOC_TYPE_STATS */ +#ifdef USE_VALGRIND +DEFUN ("valgrind-leak-check", Fvalgrind_leak_check, 0, 0, "", /* +Ask valgrind to perform a memory leak check. +The results of the leak check are sent to stderr. +*/ + ()) +{ + VALGRIND_DO_LEAK_CHECK; + return Qnil; +} + +DEFUN ("valgrind-quick-leak-check", Fvalgrind_quick_leak_check, 0, 0, "", /* +Ask valgrind to perform a quick memory leak check. +This just prints a summary of leaked memory, rather than all the details. +The results of the leak check are sent to stderr. +*/ + ()) +{ + VALGRIND_DO_QUICK_LEAK_CHECK; + return Qnil; +} +#endif /* USE_VALGRIND */ + void recompute_funcall_allocation_flag (void) { @@ -5053,6 +5079,10 @@ #endif DEFSUBR (Ftotal_memory_usage); DEFSUBR (Fconsing_since_gc); +#ifdef USE_VALGRIND + DEFSUBR (Fvalgrind_leak_check); + DEFSUBR (Fvalgrind_quick_leak_check); +#endif } void diff -r 07fa38c30fdf -r 4dd2389173fc src/config.h.in --- a/src/config.h.in Sun Jan 10 00:49:30 2010 -0600 +++ b/src/config.h.in Sun Jan 10 01:06:15 2010 -0600 @@ -647,6 +647,10 @@ It is only intended for use by the developers. */ #undef PURIFY +/* Define USE_VALGRIND to compile valgrind hints into the code. + It is only intended for use by the developers. */ +#undef USE_VALGRIND + /* Define EXTERNAL_WIDGET to compile support for using the editor as a widget within another program. */ #undef EXTERNAL_WIDGET diff -r 07fa38c30fdf -r 4dd2389173fc src/dired.c --- a/src/dired.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/dired.c Sun Jan 10 01:06:15 2010 -0600 @@ -371,8 +371,10 @@ || 0 <= scmp (d_name, XSTRING_DATA (file), file_name_length)) continue; - if (file_name_completion_stat (directory, dp, &st) < 0) - continue; + /* Ignore file-too-large conditions; the mode is still filled in. */ + if (file_name_completion_stat (directory, dp, &st) < 0 && + errno != EOVERFLOW) + continue; directoryp = ((st.st_mode & S_IFMT) == S_IFDIR); if (directoryp) diff -r 07fa38c30fdf -r 4dd2389173fc src/elhash.c --- a/src/elhash.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/elhash.c Sun Jan 10 01:06:15 2010 -0600 @@ -92,7 +92,7 @@ /* obsolete as of 19990901 in xemacs-21.2 */ static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_or_value_weak; -static Lisp_Object Qnon_weak, Q_type; +static Lisp_Object Qnon_weak, Q_type, Q_data; struct Lisp_Hash_Table { @@ -304,15 +304,15 @@ syntax for hash tables. This means that a typical hash table will be readably printed in the form of: - #s(hash-table size 2 data (key1 value1 key2 value2)) + #s(hash-table :size 2 :data (key1 value1 key2 value2)) The supported hash table structure keywords and their values are: - `test' (eql (or nil), eq or equal) - `size' (a natnum or nil) - `rehash-size' (a float) - `rehash-threshold' (a float) - `weakness' (nil, key, value, key-and-value, or key-or-value) - `data' (a list) + `:test' (eql (or nil), eq or equal) + `:size' (a natnum or nil) + `:rehash-size' (a float) + `:rehash-threshold' (a float) + `:weakness' (nil, key, value, key-and-value, or key-or-value) + `:data' (a list) If `print-readably' is nil, then a simpler syntax is used, for example @@ -330,7 +330,7 @@ int count = 0; htentry *e, *sentinel; - write_c_string (printcharfun, " data ("); + write_c_string (printcharfun, " :data ("); for (e = ht->hentries, sentinel = e + ht->size; e < sentinel; e++) if (!HTENTRY_CLEAR_P (e)) @@ -364,9 +364,9 @@ Due to nature of hashing, you cannot use arbitrary test functions anyway. */ if (!ht->test_function) - write_c_string (printcharfun, " test eq"); + write_c_string (printcharfun, " :test eq"); else if (ht->test_function == lisp_object_equal_equal) - write_c_string (printcharfun, " test equal"); + write_c_string (printcharfun, " :test equal"); else if (ht->test_function == lisp_object_eql_equal) DO_NOTHING; else @@ -375,16 +375,16 @@ if (ht->count || !print_readably) { if (print_readably) - write_fmt_string (printcharfun, " size %ld", (long) ht->count); + write_fmt_string (printcharfun, " :size %ld", (long) ht->count); else - write_fmt_string (printcharfun, " size %ld/%ld", (long) ht->count, + write_fmt_string (printcharfun, " :size %ld/%ld", (long) ht->count, (long) ht->size); } if (ht->weakness != HASH_TABLE_NON_WEAK) { write_fmt_string - (printcharfun, " weakness %s", + (printcharfun, " :weakness %s", (ht->weakness == HASH_TABLE_WEAK ? "key-and-value" : ht->weakness == HASH_TABLE_KEY_WEAK ? "key" : ht->weakness == HASH_TABLE_VALUE_WEAK ? "value" : @@ -395,7 +395,7 @@ if (ht->rehash_size != HASH_TABLE_DEFAULT_REHASH_SIZE) { float_to_string (pigbuf, ht->rehash_size); - write_fmt_string (printcharfun, " rehash-size %s", pigbuf); + write_fmt_string (printcharfun, " :rehash-size %s", pigbuf); } if (ht->rehash_threshold @@ -403,7 +403,7 @@ ht->test_function)) { float_to_string (pigbuf, ht->rehash_threshold); - write_fmt_string (printcharfun, " rehash-threshold %s", pigbuf); + write_fmt_string (printcharfun, " :rehash-threshold %s", pigbuf); } if (ht->count) @@ -845,17 +845,40 @@ Lisp_Object weakness = Qnil; Lisp_Object data = Qnil; - PROPERTY_LIST_LOOP_3 (key, value, plist) + if (KEYWORDP (Fcar (plist))) { - if (EQ (key, Qtest)) test = value; - else if (EQ (key, Qsize)) size = value; - else if (EQ (key, Qrehash_size)) rehash_size = value; - else if (EQ (key, Qrehash_threshold)) rehash_threshold = value; - else if (EQ (key, Qweakness)) weakness = value; - else if (EQ (key, Qdata)) data = value; - else if (EQ (key, Qtype))/*obsolete*/ weakness = value; - else - ABORT (); + PROPERTY_LIST_LOOP_3 (key, value, plist) + { + if (EQ (key, Q_test)) test = value; + else if (EQ (key, Q_size)) size = value; + else if (EQ (key, Q_rehash_size)) rehash_size = value; + else if (EQ (key, Q_rehash_threshold)) rehash_threshold = value; + else if (EQ (key, Q_weakness)) weakness = value; + else if (EQ (key, Q_data)) data = value; + else if (!KEYWORDP (key)) + signal_error (Qinvalid_read_syntax, + "can't mix keyword and non-keyword hash table syntax", + key); + else ABORT(); + } + } + else + { + PROPERTY_LIST_LOOP_3 (key, value, plist) + { + if (EQ (key, Qtest)) test = value; + else if (EQ (key, Qsize)) size = value; + else if (EQ (key, Qrehash_size)) rehash_size = value; + else if (EQ (key, Qrehash_threshold)) rehash_threshold = value; + else if (EQ (key, Qweakness)) weakness = value; + else if (EQ (key, Qdata)) data = value; + else if (EQ (key, Qtype))/*obsolete*/ weakness = value; + else if (KEYWORDP (key)) + signal_error (Qinvalid_read_syntax, + "can't mix keyword and non-keyword hash table syntax", + key); + else ABORT(); + } } /* Create the hash table. */ @@ -891,6 +914,16 @@ struct structure_type *st; st = define_structure_type (structure_name, 0, hash_table_instantiate); + + /* First the keyword syntax: */ + define_structure_type_keyword (st, Q_test, hash_table_test_validate); + define_structure_type_keyword (st, Q_size, hash_table_size_validate); + define_structure_type_keyword (st, Q_rehash_size, hash_table_rehash_size_validate); + define_structure_type_keyword (st, Q_rehash_threshold, hash_table_rehash_threshold_validate); + define_structure_type_keyword (st, Q_weakness, hash_table_weakness_validate); + define_structure_type_keyword (st, Q_data, hash_table_data_validate); + + /* Next the mutually exclusive, older, non-keyword syntax: */ define_structure_type_keyword (st, Qtest, hash_table_test_validate); define_structure_type_keyword (st, Qsize, hash_table_size_validate); define_structure_type_keyword (st, Qrehash_size, hash_table_rehash_size_validate); @@ -1851,6 +1884,7 @@ DEFSYMBOL (Qvalue_weak); /* obsolete */ DEFSYMBOL (Qnon_weak); /* obsolete */ + DEFKEYWORD (Q_data); DEFKEYWORD (Q_test); DEFKEYWORD (Q_size); DEFKEYWORD (Q_rehash_size); diff -r 07fa38c30fdf -r 4dd2389173fc src/emacs.c --- a/src/emacs.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/emacs.c Sun Jan 10 01:06:15 2010 -0600 @@ -18,8 +18,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Mule 2.0, FSF 19.28. */ @@ -1895,6 +1895,9 @@ reinit_opaque_early (); #endif /* not NEW_GC */ reinit_eistring_early (); +#ifdef WITH_NUMBER_TYPES + reinit_vars_of_number (); +#endif reinit_console_type_create_stream (); #ifdef HAVE_TTY diff -r 07fa38c30fdf -r 4dd2389173fc src/eval.c --- a/src/eval.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/eval.c Sun Jan 10 01:06:15 2010 -0600 @@ -4144,7 +4144,9 @@ if (SYMBOLP (object)) object = indirect_function (object, 0); - if (COMPILED_FUNCTIONP (object) || SUBRP (object)) + if (COMPILED_FUNCTIONP (object) + || (SUBRP (object) + && (XSUBR (object)->max_args != UNEVALLED))) return Qt; if (CONSP (object)) { @@ -4152,7 +4154,8 @@ if (EQ (car, Qlambda)) return Qt; if (EQ (car, Qautoload) - && NILP (Fcar_safe (Fcdr_safe (Fcdr_safe (Fcdr_safe (XCDR (object))))))) + && NILP (Fcar_safe (Fcdr_safe(Fcdr_safe + (Fcdr_safe (XCDR (object))))))) return Qt; } return Qnil; diff -r 07fa38c30fdf -r 4dd2389173fc src/fns.c --- a/src/fns.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/fns.c Sun Jan 10 01:06:15 2010 -0600 @@ -315,9 +315,12 @@ Compare the contents of two strings, maybe ignoring case. In string STR1, skip the first START1 characters and stop at END1. In string STR2, skip the first START2 characters and stop at END2. -END1 and END2 default to the full lengths of the respective strings. - -Case is significant in this comparison if IGNORE-CASE is nil. +END1 and END2 default to the full lengths of the respective strings, +and arguments that are outside the string (negative STARTi or ENDi +greater than length) are coerced to 0 or string length as appropriate. + +Optional IGNORE-CASE non-nil means use case-insensitive comparison. +Case is significant by default. The value is t if the strings (or specified portions) match. If string STR1 is less, the value is a negative number N; @@ -335,9 +338,9 @@ CHECK_STRING (str1); CHECK_STRING (str2); get_string_range_char (str1, start1, end1, &ccstart1, &ccend1, - GB_HISTORICAL_STRING_BEHAVIOR); + GB_HISTORICAL_STRING_BEHAVIOR|GB_COERCE_RANGE); get_string_range_char (str2, start2, end2, &ccstart2, &ccend2, - GB_HISTORICAL_STRING_BEHAVIOR); + GB_HISTORICAL_STRING_BEHAVIOR|GB_COERCE_RANGE); bstart1 = string_index_char_to_byte (str1, ccstart1); blen1 = string_offset_char_to_byte_len (str1, bstart1, ccend1 - ccstart1); diff -r 07fa38c30fdf -r 4dd2389173fc src/font-mgr.c --- a/src/font-mgr.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/font-mgr.c Sun Jan 10 01:06:15 2010 -0600 @@ -260,8 +260,13 @@ */ (pattern)) { + FcChar8 *name; + Lisp_Object result; CHECK_FCPATTERN(pattern); - return build_fcapi_string (FcNameUnparse (XFCPATTERN_PTR (pattern))); + name = FcNameUnparse (XFCPATTERN_PTR (pattern)); + result = build_fcapi_string (name); + xfree (name, FcChar8 *); + return result; } DEFUN("fc-pattern-duplicate", Ffc_pattern_duplicate, 1, 1, 0, /* @@ -999,6 +1004,7 @@ FcConfigSubstitute (fcc, p, FcMatchPattern); FcDefaultSubstitute (p); + res = FcResultMatch; res_fcpat->fcpatPtr = FcFontMatch (fcc, p, &res); if (res_fcpat->fcpatPtr == NULL) diff -r 07fa38c30fdf -r 4dd2389173fc src/glyphs.c --- a/src/glyphs.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/glyphs.c Sun Jan 10 01:06:15 2010 -0600 @@ -2379,9 +2379,10 @@ { struct font_metric_info fm; unsigned char charsets[NUM_LEADING_BYTES]; - struct face_cachel frame_cachel; - struct face_cachel *cachel; - Lisp_Object frame = DOMAIN_FRAME (domain); + struct face_cachel cachel; + struct face_cachel *the_cachel; + Lisp_Object window = DOMAIN_WINDOW (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); CHECK_STRING (string); @@ -2396,18 +2397,22 @@ /* Fallback to the default face if none was provided. */ if (!NILP (face)) { - reset_face_cachel (&frame_cachel); - update_face_cachel_data (&frame_cachel, frame, face); - cachel = &frame_cachel; + reset_face_cachel (&cachel); + update_face_cachel_data (&cachel, + /* #### NOTE: in fact, I'm not sure if it's + #### possible to *not* get a window + #### here, but you never know... + #### -- dvl */ + NILP (window) ? frame : window, + face); + the_cachel = &cachel; } else - { - cachel = WINDOW_FACE_CACHEL (DOMAIN_XWINDOW (domain), - DEFAULT_INDEX); - } - - ensure_face_cachel_complete (cachel, domain, charsets); - face_cachel_charset_font_metric_info (cachel, charsets, &fm); + the_cachel = WINDOW_FACE_CACHEL (DOMAIN_XWINDOW (domain), + DEFAULT_INDEX); + + ensure_face_cachel_complete (the_cachel, domain, charsets); + face_cachel_charset_font_metric_info (the_cachel, charsets, &fm); *height = fm.ascent + fm.descent; /* #### descent only gets set if we query the height as well. */ @@ -2417,48 +2422,33 @@ /* Compute width */ if (width) - { - if (!NILP (face)) - *width = redisplay_frame_text_width_string (XFRAME (frame), - face, - 0, string, 0, -1); - else - *width = redisplay_frame_text_width_string (XFRAME (frame), - Vdefault_face, - 0, string, 0, -1); - } + *width = redisplay_text_width_string (domain, + NILP (face) ? Vdefault_face : face, + 0, string, 0, -1); } Lisp_Object query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain) { unsigned char charsets[NUM_LEADING_BYTES]; - struct face_cachel frame_cachel; - struct face_cachel *cachel; + struct face_cachel cachel; int i; - Lisp_Object frame = DOMAIN_FRAME (domain); + Lisp_Object window = DOMAIN_WINDOW (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); /* Compute string font info */ find_charsets_in_ibyte_string (charsets, - XSTRING_DATA (string), - XSTRING_LENGTH (string)); - - reset_face_cachel (&frame_cachel); - update_face_cachel_data (&frame_cachel, frame, face); - cachel = &frame_cachel; - - ensure_face_cachel_complete (cachel, domain, charsets); + XSTRING_DATA (string), + XSTRING_LENGTH (string)); + + reset_face_cachel (&cachel); + update_face_cachel_data (&cachel, NILP (window) ? frame : window, face); + ensure_face_cachel_complete (&cachel, domain, charsets); for (i = 0; i < NUM_LEADING_BYTES; i++) - { - if (charsets[i]) - { - return FACE_CACHEL_FONT (cachel, - charset_by_leading_byte (i + - MIN_LEADING_BYTE)); - - } - } + if (charsets[i]) + return FACE_CACHEL_FONT + ((&cachel), charset_by_leading_byte (i + MIN_LEADING_BYTE)); return Qnil; /* NOT REACHED */ } diff -r 07fa38c30fdf -r 4dd2389173fc src/lisp.h --- a/src/lisp.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/lisp.h Sun Jan 10 01:06:15 2010 -0600 @@ -5243,6 +5243,7 @@ extern Lisp_Object Vcharset_latin_iso8859_4; extern Lisp_Object Vcharset_thai_tis620; extern Lisp_Object Vcharset_greek_iso8859_7; +extern Lisp_Object Vcharset_arabic_iso8859_6; extern Lisp_Object Vcharset_hebrew_iso8859_8; extern Lisp_Object Vcharset_katakana_jisx0201; extern Lisp_Object Vcharset_latin_jisx0201; diff -r 07fa38c30fdf -r 4dd2389173fc src/mule-charset.c --- a/src/mule-charset.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/mule-charset.c Sun Jan 10 01:06:15 2010 -0600 @@ -47,6 +47,7 @@ Lisp_Object Vcharset_latin_iso8859_4; Lisp_Object Vcharset_thai_tis620; Lisp_Object Vcharset_greek_iso8859_7; +Lisp_Object Vcharset_arabic_iso8859_6; Lisp_Object Vcharset_hebrew_iso8859_8; Lisp_Object Vcharset_katakana_jisx0201; Lisp_Object Vcharset_latin_jisx0201; @@ -93,6 +94,7 @@ Qlatin_iso8859_4, Qthai_tis620, Qgreek_iso8859_7, + Qarabic_iso8859_6, Qhebrew_iso8859_8, Qkatakana_jisx0201, Qlatin_jisx0201, @@ -625,7 +627,7 @@ Ibyte tempname[80]; qxesprintf (tempname, "___temporary___%d__", id); - name = intern_int (tempname); + name = Fmake_symbol (build_intstring (tempname)); /* Uninterned. */ } if (NILP (doc_string)) doc_string = build_string (""); @@ -1103,6 +1105,7 @@ DEFSYMBOL (Qlatin_iso8859_4); DEFSYMBOL (Qthai_tis620); DEFSYMBOL (Qgreek_iso8859_7); + DEFSYMBOL (Qarabic_iso8859_6); DEFSYMBOL (Qhebrew_iso8859_8); DEFSYMBOL (Qkatakana_jisx0201); DEFSYMBOL (Qlatin_jisx0201); @@ -1226,6 +1229,15 @@ build_msg_string ("ISO8859-7 (Greek)"), build_msg_string ("ISO8859-7 (Greek)"), vector1(build_string("iso8859-7")), 0, 0); + staticpro (&Vcharset_arabic_iso8859_6); + Vcharset_arabic_iso8859_6 = + make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 2, + CHARSET_TYPE_96, 1, 1, 'G', + CHARSET_RIGHT_TO_LEFT, + build_string ("ISO8859-6"), + build_msg_string ("ISO8859-6 (Arabic)"), + build_msg_string ("ISO8859-6 (Arabic)"), + vector1(build_string ("iso8859-6")), 0, 0); staticpro (&Vcharset_hebrew_iso8859_8); Vcharset_hebrew_iso8859_8 = make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 2, diff -r 07fa38c30fdf -r 4dd2389173fc src/number-gmp.c --- a/src/number-gmp.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number-gmp.c Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ diff -r 07fa38c30fdf -r 4dd2389173fc src/number-gmp.h --- a/src/number-gmp.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number-gmp.h Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ diff -r 07fa38c30fdf -r 4dd2389173fc src/number-mp.c --- a/src/number-mp.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number-mp.c Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ @@ -221,7 +221,7 @@ mbase = MP_ITOM ((short) base); MP_MOVE (bignum_zero, b); - + for (digit = char_to_number (*s); digit >= 0 && digit < base; digit = char_to_number (*++s)) { diff -r 07fa38c30fdf -r 4dd2389173fc src/number-mp.h --- a/src/number-mp.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number-mp.h Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ diff -r 07fa38c30fdf -r 4dd2389173fc src/number.c --- a/src/number.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number.c Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ @@ -58,6 +58,21 @@ xfree (bstr, CIbyte *); } +#ifdef NEW_GC +static void +bignum_finalize (void *header, int for_disksave) +{ + if (!for_disksave) + { + struct Lisp_Bignum *num = (struct Lisp_Bignum *) header; + bignum_fini (num->data); + } +} +#define BIGNUM_FINALIZE bignum_finalize +#else +#define BIGNUM_FINALIZE 0 +#endif + static int bignum_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth)) { @@ -107,8 +122,9 @@ }; DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bignum", bignum, 1, 0, bignum_print, - 0, bignum_equal, bignum_hash, - bignum_description, Lisp_Bignum); + BIGNUM_FINALIZE, bignum_equal, + bignum_hash, bignum_description, + Lisp_Bignum); #endif /* HAVE_BIGNUM */ @@ -166,6 +182,21 @@ xfree (rstr, CIbyte *); } +#ifdef NEW_GC +static void +ratio_finalize (void *header, int for_disksave) +{ + if (!for_disksave) + { + struct Lisp_Ratio *num = (struct Lisp_Ratio *) header; + ratio_fini (num->data); + } +} +#define RATIO_FINALIZE ratio_finalize +#else +#define RATIO_FINALIZE 0 +#endif + static int ratio_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth)) { @@ -184,7 +215,7 @@ }; DEFINE_BASIC_LRECORD_IMPLEMENTATION ("ratio", ratio, 0, 0, ratio_print, - 0, ratio_equal, ratio_hash, + RATIO_FINALIZE, ratio_equal, ratio_hash, ratio_description, Lisp_Ratio); #endif /* HAVE_RATIO */ @@ -253,6 +284,21 @@ xfree (fstr, CIbyte *); } +#ifdef NEW_GC +static void +bigfloat_finalize (void *header, int for_disksave) +{ + if (!for_disksave) + { + struct Lisp_Bigfloat *num = (struct Lisp_Bigfloat *) header; + bigfloat_fini (num->bf); + } +} +#define BIGFLOAT_FINALIZE bigfloat_finalize +#else +#define BIGFLOAT_FINALIZE 0 +#endif + static int bigfloat_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth)) { @@ -271,7 +317,7 @@ }; DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bigfloat", bigfloat, 1, 0, - bigfloat_print, 0, + bigfloat_print, BIGFLOAT_FINALIZE, bigfloat_equal, bigfloat_hash, bigfloat_description, Lisp_Bigfloat); @@ -345,7 +391,7 @@ #ifdef HAVE_BIGFLOAT if (INTP (*val)) prec = XINT (*val); - else + else { if (!bignum_fits_ulong_p (XBIGNUM_DATA (*val))) args_out_of_range_3 (*val, Qzero, Vbigfloat_max_prec); @@ -655,7 +701,7 @@ 0UL); return type2; } - + if (type2 < type1) { *arg2 = internal_coerce_number (*arg2, type1, @@ -800,12 +846,9 @@ */); #ifdef HAVE_BIGFLOAT -#ifdef HAVE_BIGNUM - Vbigfloat_max_prec = make_bignum (0L); - bignum_set_ulong (XBIGNUM_DATA (Vbigfloat_max_prec), ULONG_MAX); -#else + /* Don't create a bignum here. Otherwise, we lose with NEW_GC + pdump. + See reinit_vars_of_number(). */ Vbigfloat_max_prec = make_int (EMACS_INT_MAX); -#endif #else Vbigfloat_max_prec = make_int (0); #endif /* HAVE_BIGFLOAT */ @@ -833,6 +876,15 @@ } void +reinit_vars_of_number (void) +{ +#if defined(HAVE_BIGFLOAT) && defined(HAVE_BIGNUM) + Vbigfloat_max_prec = make_bignum (0L); + bignum_set_ulong (XBIGNUM_DATA (Vbigfloat_max_prec), ULONG_MAX); +#endif +} + +void init_number (void) { if (!number_initialized) @@ -860,5 +912,9 @@ bigfloat_init (scratch_bigfloat); bigfloat_init (scratch_bigfloat2); #endif + +#ifndef PDUMP + reinit_vars_of_number (); +#endif } } diff -r 07fa38c30fdf -r 4dd2389173fc src/number.h --- a/src/number.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/number.h Sun Jan 10 01:06:15 2010 -0600 @@ -15,8 +15,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ diff -r 07fa38c30fdf -r 4dd2389173fc src/objects-xlike-inc.c --- a/src/objects-xlike-inc.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/objects-xlike-inc.c Sun Jan 10 01:06:15 2010 -0600 @@ -445,6 +445,7 @@ FcDefaultSubstitute (p); PRINT_XFT_PATTERN (3, "FcDefaultSubstitute'ed name is %s\n", p); /* #### check fcresult of following match? */ + fcresult = FcResultMatch; fontxft = FcFontMatch (fcc, p, &fcresult); switch (fcresult) { diff -r 07fa38c30fdf -r 4dd2389173fc src/redisplay.c --- a/src/redisplay.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/redisplay.c Sun Jan 10 01:06:15 2010 -0600 @@ -630,8 +630,8 @@ /***************************************************************************/ static int -redisplay_text_width_ichar_string (struct window *w, int findex, - Ichar *str, Charcount len) +redisplay_window_text_width_ichar_string (struct window *w, int findex, + Ichar *str, Charcount len) { unsigned char charsets[NUM_LEADING_BYTES]; Lisp_Object window; @@ -647,10 +647,10 @@ static Ichar_dynarr *rtw_ichar_dynarr; -int -redisplay_text_width_string (struct window *w, int findex, - Ibyte *nonreloc, Lisp_Object reloc, - Bytecount offset, Bytecount len) +static int +redisplay_window_text_width_string (struct window *w, int findex, + Ibyte *nonreloc, Lisp_Object reloc, + Bytecount offset, Bytecount len) { if (!rtw_ichar_dynarr) rtw_ichar_dynarr = Dynarr_new (Ichar); @@ -660,18 +660,19 @@ if (STRINGP (reloc)) nonreloc = XSTRING_DATA (reloc); convert_ibyte_string_into_ichar_dynarr (nonreloc, len, rtw_ichar_dynarr); - return redisplay_text_width_ichar_string + return redisplay_window_text_width_ichar_string (w, findex, Dynarr_atp (rtw_ichar_dynarr, 0), Dynarr_length (rtw_ichar_dynarr)); } int -redisplay_frame_text_width_string (struct frame *f, Lisp_Object face, - Ibyte *nonreloc, Lisp_Object reloc, - Bytecount offset, Bytecount len) -{ +redisplay_text_width_string (Lisp_Object domain, Lisp_Object face, + Ibyte *nonreloc, Lisp_Object reloc, + Bytecount offset, Bytecount len) +{ + Lisp_Object window = DOMAIN_WINDOW (domain); + Lisp_Object frame = DOMAIN_FRAME (domain); unsigned char charsets[NUM_LEADING_BYTES]; - Lisp_Object frame; struct face_cachel cachel; if (!rtw_ichar_dynarr) @@ -685,10 +686,13 @@ find_charsets_in_ibyte_string (charsets, nonreloc, len); reset_face_cachel (&cachel); cachel.face = face; - frame = wrap_frame (f); - ensure_face_cachel_complete (&cachel, frame, charsets); - return DEVMETH (XDEVICE (FRAME_DEVICE (f)), - text_width, (f, &cachel, Dynarr_atp (rtw_ichar_dynarr, 0), + ensure_face_cachel_complete (&cachel, + NILP (window) ? frame : window, + charsets); + return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))), + text_width, (XFRAME (frame), + &cachel, + Dynarr_atp (rtw_ichar_dynarr, 0), Dynarr_length (rtw_ichar_dynarr))); } @@ -1127,8 +1131,8 @@ Ichar ch = data->font_is_bogus ? '~' : data->ch; data->last_char_width = - redisplay_text_width_ichar_string (XWINDOW (data->window), - data->findex, &ch, 1); + redisplay_window_text_width_ichar_string + (XWINDOW (data->window), data->findex, &ch, 1); } else data->last_char_width = -1; @@ -1145,9 +1149,8 @@ width = data->last_char_width; if (width < 0) /* proportional fonts */ - width = redisplay_text_width_ichar_string (XWINDOW (data->window), - data->findex, - &data->ch, 1); + width = redisplay_window_text_width_ichar_string + (XWINDOW (data->window), data->findex, &data->ch, 1); } if (data->max_pixpos != -1 && (data->pixpos + width > data->max_pixpos)) @@ -4178,8 +4181,8 @@ SET_CURRENT_MODE_CHARS_PIXSIZE; dash_pixsize = - redisplay_text_width_string (w, findex, &ch, Qnil, 0, - 1); + redisplay_window_text_width_string + (w, findex, &ch, Qnil, 0, 1); if (dash_pixsize == 0) num_to_add = 0; diff -r 07fa38c30fdf -r 4dd2389173fc src/redisplay.h --- a/src/redisplay.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/redisplay.h Sun Jan 10 01:06:15 2010 -0600 @@ -719,14 +719,9 @@ /*************************************************************************/ EXFUN (Fredraw_frame, 2); -int redisplay_text_width_string (struct window *w, int findex, +int redisplay_text_width_string (Lisp_Object domain, Lisp_Object face, Ibyte *nonreloc, Lisp_Object reloc, Bytecount offset, Bytecount len); -int redisplay_frame_text_width_string (struct frame *f, - Lisp_Object face, - Ibyte *nonreloc, - Lisp_Object reloc, - Bytecount offset, Bytecount len); int redisplay_frame (struct frame *f, int preemption_check); void redisplay_no_pre_idle_hook (void); void redisplay (void); diff -r 07fa38c30fdf -r 4dd2389173fc src/symbols.c --- a/src/symbols.c Sun Jan 10 00:49:30 2010 -0600 +++ b/src/symbols.c Sun Jan 10 01:06:15 2010 -0600 @@ -600,7 +600,10 @@ !(unloading_module && UNBOUNDP(newval)) && #endif (symbol_is_constant (sym, val) - || (SYMBOL_IS_KEYWORD (sym) && !EQ (newval, sym)))) +#ifndef NO_NEED_TO_HANDLE_21_4_CODE + || (SYMBOL_IS_KEYWORD (sym) && !EQ (newval, sym)) +#endif + )) signal_error_1 (Qsetting_constant, UNBOUNDP (newval) ? list1 (sym) : list2 (sym, newval)); } diff -r 07fa38c30fdf -r 4dd2389173fc src/symsinit.h --- a/src/symsinit.h Sun Jan 10 00:49:30 2010 -0600 +++ b/src/symsinit.h Sun Jan 10 01:06:15 2010 -0600 @@ -16,8 +16,8 @@ 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. */ +the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, +Boston, MA 02111-1301, USA. */ /* Synched up with: Not in FSF. */ @@ -398,6 +398,7 @@ void reinit_vars_of_mule_wnn (void); void vars_of_nt (void); void vars_of_number (void); +void reinit_vars_of_number (void); void vars_of_objects (void); void vars_of_font_mgr (void); void reinit_vars_of_font_mgr (void); diff -r 07fa38c30fdf -r 4dd2389173fc tests/ChangeLog --- a/tests/ChangeLog Sun Jan 10 00:49:30 2010 -0600 +++ b/tests/ChangeLog Sun Jan 10 01:06:15 2010 -0600 @@ -1,3 +1,17 @@ +2010-01-01 Aidan Kehoe + + * automated/lisp-tests.el: + Test #'functionp, making sure it gives nil for special forms. + +2009-12-31 Aidan Kehoe + + * automated/lisp-tests.el: + Test much of the functionality of equalp; add a pointer to Paul + Dietz' ANSI test suite for this function, converted to Emacs + Lisp. Not including the tests themselves in XEmacs because who + owns the copyright on the files is unclear and the GCL people + didn't respond to my queries. + 2009-12-21 Jerry James * Dnd/README: Remove references to OffiX drag-and-drop. diff -r 07fa38c30fdf -r 4dd2389173fc tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Sun Jan 10 00:49:30 2010 -0600 +++ b/tests/automated/lisp-tests.el Sun Jan 10 01:06:15 2010 -0600 @@ -2085,14 +2085,100 @@ (* three one-four-one-five-nine))) "checking letf handles #'values in a basic sense")) -(Assert (equalp "hi there" "Hi There") - "checking equalp isn't case-sensitive") -(Assert (equalp 99 99.0) - "checking equalp compares numerical values of different types") -(Assert (null (equalp 99 ?c)) - "checking equalp does not convert characters to numbers") -;; Fixed in Hg d0ea57eb3de4. -(Assert (null (equalp "hi there" [hi there])) - "checking equalp doesn't error with string and non-string") +;; #'equalp tests. +(let ((string-variable "aBcDeeFgH\u00Edj") + (eacute-character ?\u00E9) + (Eacute-character ?\u00c9) + (+base-chars+ (loop + with res = (make-string 96 ?\x20) + for int-char from #x20 to #x7f + for char being each element in-ref res + do (setf char (int-to-char int-char)) + finally return res))) + (Assert (equalp "hi there" "Hi There") + "checking equalp isn't case-sensitive") + (Assert (equalp 99 99.0) + "checking equalp compares numerical values of different types") + (Assert (null (equalp 99 ?c)) + "checking equalp does not convert characters to numbers") + ;; Fixed in Hg d0ea57eb3de4. + (Assert (null (equalp "hi there" [hi there])) + "checking equalp doesn't error with string and non-string") + (Assert (eq t (equalp "ABCDEEFGH\u00CDJ" string-variable)) + "checking #'equalp is case-insensitive with an upcased constant") + (Assert (eq t (equalp "abcdeefgh\xedj" string-variable)) + "checking #'equalp is case-insensitive with a downcased constant") + (Assert (eq t (equalp string-variable string-variable)) + "checking #'equalp works when handed the same string twice") + (Assert (eq t (equalp string-variable "aBcDeeFgH\u00Edj")) + "check #'equalp is case-insensitive with a variable-cased constant") + (Assert (eq t (equalp "" (bit-vector))) + "check empty string and empty bit-vector are #'equalp.") + (Assert (eq t (equalp (string) (bit-vector))) + "check empty string and empty bit-vector are #'equalp, no constants") + (Assert (eq t (equalp "hi there" (vector ?h ?i ?\ ?t ?h ?e ?r ?e))) + "check string and vector with same contents #'equalp") + (Assert (eq t (equalp (string ?h ?i ?\ ?t ?h ?e ?r ?e) + (vector ?h ?i ?\ ?t ?h ?e ?r ?e))) + "check string and vector with same contents #'equalp, no constants") + (Assert (eq t (equalp [?h ?i ?\ ?t ?h ?e ?r ?e] + (string ?h ?i ?\ ?t ?h ?e ?r ?e))) + "check string and vector with same contents #'equalp, vector constant") + (Assert (eq t (equalp [0 1.0 0.0 0 1] + (bit-vector 0 1 0 0 1))) + "check vector and bit-vector with same contents #'equalp,\ + vector constant") + (Assert (eq t (equalp #*01001 + (vector 0 1.0 0.0 0 1))) + "check vector and bit-vector with same contents #'equalp,\ + bit-vector constant") + (Assert (eq t (equalp ?\u00E9 Eacute-character)) + "checking characters are case-insensitive, one constant") + (Assert (eq nil (equalp ?\u00E9 (aref (format "%c" ?a) 0))) + "checking distinct characters are not equalp, one constant") + (Assert (eq t (equalp t (and))) + "checking symbols are correctly #'equalp") + (Assert (eq nil (equalp t (or nil '#:t))) + "checking distinct symbols with the same name are not #'equalp") + (Assert (eq t (equalp #s(char-table type generic data (?\u0080 "hi-there")) + (let ((aragh (make-char-table 'generic))) + (put-char-table ?\u0080 "hi-there" aragh) + aragh))) + "checking #'equalp succeeds correctly, char-tables") + (Assert (eq nil (equalp #s(char-table type generic data (?\u0080 "hi-there")) + (let ((aragh (make-char-table 'generic))) + (put-char-table ?\u0080 "HI-THERE" aragh) + aragh))) + "checking #'equalp fails correctly, char-tables")) + +;; There are more tests available for equalp here: +;; +;; http://www.parhasard.net/xemacs/equalp-tests.el +;; +;; They are taken from Paul Dietz' GCL ANSI test suite, licensed under the +;; LGPL and part of GNU Common Lisp; the GCL people didn't respond to +;; several requests for information on who owned the copyright for the +;; files, so I haven't included the tests with XEmacs. Anyone doing XEmacs +;; development on equalp should still run them, though. Aidan Kehoe, Thu Dec +;; 31 14:53:52 GMT 2009. + +(loop + for special-form in '(multiple-value-call setq-default quote throw + save-current-buffer and or) + with not-special-form = nil + do + (Assert (special-form-p special-form) + (format "checking %S is a special operator" special-form)) + (setq not-special-form + (intern (format "%s-gMAu" (symbol-name special-form)))) + (Assert (not (special-form-p not-special-form)) + (format "checking %S is a special operator" special-form)) + (Assert (not (functionp special-form)) + (format "checking %S is not a function" special-form))) + +(loop + for real-function in '(find-file quote-maybe + - find-file-read-only) + do (Assert (functionp real-function) + (format "checking %S is a function" real-function))) ;;; end of lisp-tests.el