Mercurial > hg > xemacs-beta
changeset 4514:e8a9d6a10efa
Merge in pkg-docs. Fix up ChangeLog.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Sat, 25 Oct 2008 21:52:48 +0900 |
parents | 66411359ce4e (diff) 51fa2a054060 (current diff) |
children | bbce7f6de2d6 |
files | ChangeLog |
diffstat | 40 files changed, 1072 insertions(+), 689 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -2,6 +2,17 @@ * INSTALL: Give better pointers to package documentation. +2008-10-25 Stephen J. Turnbull <stephen@xemacs.org> + + * configure.ac (xemacs_cc_cc_mismatch): Improve g++ detection. + +2008-08-03 Mats Lidell <matsl@xemacs.org> + + * configure.ac: Fix typo xft_gauge to xft_gauges + + * configure.ac (XE_COMPLEX_ARG): Use different defaults for + with-xft and without-xft. + 2008-07-06 Ville Skyttä <scop@xemacs.org> * configure.ac (xe_fst):
--- a/configure Sat Oct 25 21:48:33 2008 +0900 +++ b/configure Sat Oct 25 21:52:48 2008 +0900 @@ -1538,7 +1538,8 @@ `gauges'. Prefix component with `no' to disable its use of Xft. Requires X11, Xft, Xrender, freetype, and fontconfig support. Default is `noemacs, - nomenubars, notabs, nogauges'. + nomenubars, notabs, nogauges'. The default when + selected is `emacs, nomenubars, notabs, nogauges'. --with-gtk Support GTK on the X Window System. (EXPERIMENTAL) --with-gnome Support GNOME on the X Window System. (EXPERIMENTAL) --with-msw Support MS Windows as a window system (only under @@ -2888,12 +2889,12 @@ fi; _xft_notfirst="" -_xft_emacs_default=no +_xft_emacs_default=yes _xft_menubars_default=no _xft_tabs_default=no _xft_gauges_default=no _xft_types="emacs menubars tabs gauges" -_xft_default="noemacs,nomenubars,notabs,nogauges" +_xft_default="emacs,nomenubars,notabs,nogauges" # If --with-xft or --without-xft were given then copy the value to the # equivalent enable_xft variable. @@ -2970,7 +2971,7 @@ eval "enable_xft_$y=\$_xft_${y}_default" unset _xft_${y}_default done - +with_xft_emacs=no fi; # If --with-gtk or --without-gtk were given then copy the value to the # equivalent enable_gtk variable. @@ -27332,11 +27333,11 @@ with_xft_tabs="no" fi fi -if test "$with_xft_gauge" != "no" ; then +if test "$with_xft_gauges" != "no" ; then if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then - with_xft_gauge="yes" - else - with_xft_gauge="no" + with_xft_gauges="yes" + else + with_xft_gauges="no" fi fi @@ -27528,8 +27529,8 @@ #define USE_XFT_TABS 1 _ACEOF -test "$with_xft_gauge" = "yes" && cat >>confdefs.h <<\_ACEOF -#define USE_XFT_GAUGE 1 +test "$with_xft_gauges" = "yes" && cat >>confdefs.h <<\_ACEOF +#define USE_XFT_GAUGES 1 _ACEOF @@ -39582,7 +39583,7 @@ echo " - Using Xft to render antialiased fonts in tab controls." echo " WARNING: This feature will be replaced with a face." fi -if test "$with_xft_gauge" = "yes"; then +if test "$with_xft_gauges" = "yes"; then echo " - Using Xft to render antialiased fonts in progress bars." echo " WARNING: This feature will be replaced with a face." echo " WARNING: This feature not yet implemented; setting ignored."
--- a/configure.ac Sat Oct 25 21:48:33 2008 +0900 +++ b/configure.ac Sat Oct 25 21:52:48 2008 +0900 @@ -690,9 +690,10 @@ [Xft], [`emacs' (buffers), `menubars', `tabs', and `gauges'], [X11, Xft, Xrender, freetype, and fontconfig], - [`noemacs, nomenubars, notabs, nogauges'])], - [],[], - [XE_COMPLEX_OPTION([emacs],[no]), + [`noemacs, nomenubars, notabs, nogauges'. + The default when selected is `emacs, nomenubars, notabs, nogauges'])], + [],[with_xft_emacs=no], + [XE_COMPLEX_OPTION([emacs],[yes]), XE_COMPLEX_OPTION([menubars],[no]), XE_COMPLEX_OPTION([tabs],[no]), XE_COMPLEX_OPTION([gauges],[no])]) @@ -2238,18 +2239,25 @@ dnl If we're specifying XEMACS_CC, it'd better be in the same family dnl as CC or the following flag calculations are bogus. -dnl #### We may want to actually error and abort here, but I am not sure. +dnl No error/abort; detection is too fragile. + +xemacs_cc_cc_mismatch=no if test "$CC" != "$XEMACS_CC"; then - if test "$XEMACS_CC" = "g++" -a "$GCC" != "yes"; then - AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes - elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then - AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes + case "$XEMACS_CC" in + *g++* ) + if test "$GCC" != "yes"; then + AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes ;; + esac + if test -n "$GCC"; then + case $XEMACS_CC in + *g++* ) + ;; + * ) + AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes ;; + esac dnl #### Add other detectable mismatches here. - else - xemacs_cc_cc_mismatch=no - fi fi dnl Calculate optimization flags. These will be off by default in beta @@ -3540,7 +3548,7 @@ AC_DEFINE(HAVE_FONTCONFIG) AC_DEFINE(USE_XFT) dnl Due to interactions with other libraries, must postpone AC_DEFINE - dnl of USE_XFT_MENUBARS, USE_XFT_TABS, and USE_XFT_GAUGE. + dnl of USE_XFT_MENUBARS, USE_XFT_TABS, and USE_XFT_GAUGES. unset xft_includes_found fi fi @@ -4429,11 +4437,11 @@ fi fi dnl this is not in xft reloaded #3 -if test "$with_xft_gauge" != "no" ; then +if test "$with_xft_gauges" != "no" ; then if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then - with_xft_gauge="yes" + with_xft_gauges="yes" else - with_xft_gauge="no" + with_xft_gauges="no" fi fi @@ -4526,7 +4534,7 @@ test "$with_xft_menubars" = "yes" && AC_DEFINE(USE_XFT_MENUBARS) test "$with_xft_tabs" = "yes" && AC_DEFINE(USE_XFT_TABS) -test "$with_xft_gauge" = "yes" && AC_DEFINE(USE_XFT_GAUGE) +test "$with_xft_gauges" = "yes" && AC_DEFINE(USE_XFT_GAUGES) dnl ---------------------- dnl Mule-dependent options @@ -6078,7 +6086,7 @@ echo " - Using Xft to render antialiased fonts in tab controls." echo " WARNING: This feature will be replaced with a face." fi -if test "$with_xft_gauge" = "yes"; then +if test "$with_xft_gauges" = "yes"; then echo " - Using Xft to render antialiased fonts in progress bars." echo " WARNING: This feature will be replaced with a face." echo " WARNING: This feature not yet implemented; setting ignored."
--- a/etc/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/etc/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -1,3 +1,12 @@ +2008-08-10 Aidan Kehoe <kehoea@parhasard.net> + + * HELLO: Add a coding cookie, now the UTF-8 sequences prevent the + file being recognised as ISO-2022-7 automatically. + +2008-08-05 Aidan Kehoe <kehoea@parhasard.net> + + * HELLO: Encode the Arabic using UTF-8 sequences, not ISO-8859-6. + 2008-02-21 Stephen J. Turnbull <stephen@xemacs.org> * README: Add descriptions of Daniel Polansky's icons.
--- a/etc/HELLO Sat Oct 25 21:48:33 2008 +0900 +++ b/etc/HELLO Sat Oct 25 21:52:48 2008 +0900 @@ -1,9 +1,11 @@ +-*- coding: iso-2022-7 -*- + You need many fonts to read all. Please correct this incomplete list and add more! --------------------------------------------------------- Amharic ($(3"c!<!N"^(B) $(3!A!,!>(B -Arabic [2](38R(47d(3T!JSa(4W(3W[0](B +Arabic (%Gةّيبرعلا%@) %Gمكيلع%@ %Gمالّسلا%@ Croatian (Hrvatski) Bog (Bok), Dobar dan Czech (,Bh(Besky) Dobr,B}(B den Danish (Dansk) Hej, Goddag
--- a/lib-src/config.values.in Sat Oct 25 21:48:33 2008 +0900 +++ b/lib-src/config.values.in Sat Oct 25 21:52:48 2008 +0900 @@ -15,178 +15,6 @@ ;;; Variables defined in configure by AC_SUBST follow: ;;; (These are used in Makefiles) -ALLOCA "@ALLOCA@" -ARCHLIBDIR "@ARCHLIBDIR@" -ARCHLIBDIR_USER_DEFINED "@ARCHLIBDIR_USER_DEFINED@" -CC "@CC@" -CFLAGS "@CFLAGS@" -CPP "@CPP@" -CPPFLAGS "@CPPFLAGS@" -DEFS "@DEFS@" -DOCDIR "@DOCDIR@" -DOCDIR_USER_DEFINED "@DOCDIR_USER_DEFINED@" -EARLY_PACKAGE_DIRECTORIES "@EARLY_PACKAGE_DIRECTORIES@" -EARLY_PACKAGE_DIRECTORIES_USER_DEFINED "@EARLY_PACKAGE_DIRECTORIES_USER_DEFINED@" -ECHO_C "@ECHO_C@" -ECHO_N "@ECHO_N@" -ECHO_T "@ECHO_T@" -EGREP "@EGREP@" -ETCDIR "@ETCDIR@" -ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@" -EXEC_PREFIX "@EXEC_PREFIX@" -EXEC_PREFIX_USER_DEFINED "@EXEC_PREFIX_USER_DEFINED@" -EXEEXT "@EXEEXT@" -GTK_CONFIG "@GTK_CONFIG@" -INFODIR "@INFODIR@" -INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@" -INFOPATH "@INFOPATH@" -INFOPATH_USER_DEFINED "@INFOPATH_USER_DEFINED@" -INSTALL "@INSTALL@" -INSTALLPATH "@INSTALLPATH@" -INSTALL_ARCH_DEP_SUBDIR "@INSTALL_ARCH_DEP_SUBDIR@" -INSTALL_DATA "@INSTALL_DATA@" -INSTALL_PROGRAM "@INSTALL_PROGRAM@" -INSTALL_SCRIPT "@INSTALL_SCRIPT@" -LAST_PACKAGE_DIRECTORIES "@LAST_PACKAGE_DIRECTORIES@" -LAST_PACKAGE_DIRECTORIES_USER_DEFINED "@LAST_PACKAGE_DIRECTORIES_USER_DEFINED@" -LATE_PACKAGE_DIRECTORIES "@LATE_PACKAGE_DIRECTORIES@" -LATE_PACKAGE_DIRECTORIES_USER_DEFINED "@LATE_PACKAGE_DIRECTORIES_USER_DEFINED@" -LDFLAGS "@LDFLAGS@" -LIBOBJS "@LIBOBJS@" -LIBS "@LIBS@" -LIBSTDCPP "@LIBSTDCPP@" -LISPDIR "@LISPDIR@" -LISPDIR_USER_DEFINED "@LISPDIR_USER_DEFINED@" -LN_S "@LN_S@" -LTLIBOBJS "@LTLIBOBJS@" -MAKE_DOCFILE "@MAKE_DOCFILE@" -MAKE_SUBDIR "@MAKE_SUBDIR@" -MODARCHDIR "@MODARCHDIR@" -MODCFLAGS "@MODCFLAGS@" -MODULEDIR "@MODULEDIR@" -MODULEDIR_USER_DEFINED "@MODULEDIR_USER_DEFINED@" -MOD_CC "@MOD_CC@" -MOD_INSTALL_PROGRAM "@MOD_INSTALL_PROGRAM@" -OBJECT_TO_BUILD "@OBJECT_TO_BUILD@" -OBJEXT "@OBJEXT@" -PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" -PACKAGE_NAME "@PACKAGE_NAME@" -PACKAGE_PATH "@PACKAGE_PATH@" -PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@" -PACKAGE_STRING "@PACKAGE_STRING@" -PACKAGE_TARNAME "@PACKAGE_TARNAME@" -PACKAGE_VERSION "@PACKAGE_VERSION@" -PATH_SEPARATOR "@PATH_SEPARATOR@" -PREFIX "@PREFIX@" -PREFIX_USER_DEFINED "@PREFIX_USER_DEFINED@" -PROGNAME "@PROGNAME@" -RANLIB "@RANLIB@" -RECURSIVE_MAKE_ARGS "@RECURSIVE_MAKE_ARGS@" -SET_MAKE "@SET_MAKE@" -SHELL "@SHELL@" -SITELISPDIR "@SITELISPDIR@" -SITELISPDIR_USER_DEFINED "@SITELISPDIR_USER_DEFINED@" -SITEMODULEDIR "@SITEMODULEDIR@" -SITEMODULEDIR_USER_DEFINED "@SITEMODULEDIR_USER_DEFINED@" -SRC_SUBDIR_DEPS "@SRC_SUBDIR_DEPS@" -SUBDIR_MAKEFILES "@SUBDIR_MAKEFILES@" -XEMACS_CC "@XEMACS_CC@" -XE_CFLAGS "@XE_CFLAGS@" -X_CFLAGS "@X_CFLAGS@" -X_EXTRA_LIBS "@X_EXTRA_LIBS@" -X_LIBS "@X_LIBS@" -X_PRE_LIBS "@X_PRE_LIBS@" -YACC "@YACC@" -abs_builddir "@abs_builddir@" -abs_srcdir "@abs_srcdir@" -abs_top_builddir "@abs_top_builddir@" -abs_top_srcdir "@abs_top_srcdir@" -ac_ct_CC "@ac_ct_CC@" -ac_ct_RANLIB "@ac_ct_RANLIB@" -archlibdir "@archlibdir@" -bindir "@bindir@" -bitmapdir "@bitmapdir@" -blddir "@blddir@" -build "@build@" -build_alias "@build_alias@" -build_cpu "@build_cpu@" -build_os "@build_os@" -build_vendor "@build_vendor@" -builddir "@builddir@" -c_switch_all "@c_switch_all@" -c_switch_general "@c_switch_general@" -c_switch_window_system "@c_switch_window_system@" -canna_libs "@canna_libs@" -configuration "@configuration@" -configure_input "@configure_input@" -datadir "@datadir@" -datarootdir "@datarootdir@" -dll_cflags "@dll_cflags@" -dll_ld "@dll_ld@" -dll_ldflags "@dll_ldflags@" -dll_ldo "@dll_ldo@" -dll_post "@dll_post@" -dnd_objs "@dnd_objs@" -docdir "@docdir@" -dynodump_arch "@dynodump_arch@" -early_packages "@early_packages@" -etcdir "@etcdir@" -exec_prefix "@exec_prefix@" -extra_includes "@extra_includes@" -extra_objs "@extra_objs@" -have_esd_config "@have_esd_config@" -host_alias "@host_alias@" -includedir "@includedir@" -infodir "@infodir@" -infopath "@infopath@" -install_pp "@install_pp@" -inststaticdir "@inststaticdir@" -instvardir "@instvardir@" -internal_makefile_list "@internal_makefile_list@" -last_packages "@last_packages@" -late_packages "@late_packages@" -ld "@ld@" -ld_dynamic_link_flags "@ld_dynamic_link_flags@" -ld_libs_all "@ld_libs_all@" -ld_libs_general "@ld_libs_general@" -ld_libs_window_system "@ld_libs_window_system@" -ld_switch_all "@ld_switch_all@" -ld_switch_general "@ld_switch_general@" -ld_switch_shared "@ld_switch_shared@" -ld_switch_window_system "@ld_switch_window_system@" -ldap_libs "@ldap_libs@" -lib_gcc "@lib_gcc@" -libdir "@libdir@" -libexecdir "@libexecdir@" -libs_xauth "@libs_xauth@" -lispdir "@lispdir@" -localstatedir "@localstatedir@" -lwlib_objs "@lwlib_objs@" -machfile "@machfile@" -mandir "@mandir@" -moduledir "@moduledir@" -native_sound_lib "@native_sound_lib@" -oldincludedir "@oldincludedir@" -opsysfile "@opsysfile@" -package_path "@package_path@" -postgresql_libs "@postgresql_libs@" -prefix "@prefix@" -program_transform_name "@program_transform_name@" -sbindir "@sbindir@" -sharedstatedir "@sharedstatedir@" -sitelispdir "@sitelispdir@" -sitemoduledir "@sitemoduledir@" -sound_cflags "@sound_cflags@" -srcdir "@srcdir@" -start_files "@start_files@" -start_flags "@start_flags@" -statedir "@statedir@" -sysconfdir "@sysconfdir@" -target_alias "@target_alias@" -top_builddir "@top_builddir@" -top_srcdir "@top_srcdir@" -version "@version@" -with_modules "@with_modules@" ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow: ;;; (These are used in C code)
--- a/lisp/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -1,3 +1,100 @@ +2008-08-31 Aidan Kehoe <kehoea@parhasard.net> + + * window.el (only-window-p): New. + Check if WINDOW is the only window in some context, normally its + frame. + (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. + (fit-window-to-buffer): Uncomment this, correct its implementation + 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 + #'shrink-window-if-larger-than-buffer. + * dumped-lisp.el (preloaded-file-list): Move easy-mmode before + help, now that the latter uses #'define-minor-mode. + * 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. + +2008-08-27 Aidan Kehoe <kehoea@parhasard.net> + + * 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. + +2008-08-23 Aidan Kehoe <kehoea@parhasard.net> + + * custom.el: Move #'custom-variable-p to C, since it's now called + from #'user-variable-p. + +2008-08-09 Aidan Kehoe <kehoea@parhasard.net> + + * 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. + +2008-08-09 Aidan Kehoe <kehoea@parhasard.net> + + * mule/cyril-util.el: Remove. Use the version in packages instead. + +2008-08-08 Aidan Kehoe <kehoea@parhasard.net> + + * unicode.el: + * mule/mule-cmds.el: + * mule/latin.el: + * mule/cyrillic.el: + Rework the various identifiers using error-sequence to use + invalid-sequence instead. + +2008-08-05 Aidan Kehoe <kehoea@parhasard.net> + + * specifier.el (current-display-table): Initialise this here, not + 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): + 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): + 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"): + ("Cyrillic-ALT"): Add support for error-sequence-coding-system for + all these languages. + * mule/latin.el: + Add support for error-sequence-coding-system for the + Latin-alphabet language environments. + +2008-08-05 Aidan Kehoe <kehoea@parhasard.net> + + * 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): + Add iso-8859-6, windows-1256 implementations using + make-8-bit-coding-system. Remove our non-standard Mule character + 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. + 2008-07-26 Aidan Kehoe <kehoea@parhasard.net> * x-init.el (x-initialize-compose):
--- a/lisp/custom.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/custom.el Sat Oct 25 21:52:48 2008 +0900 @@ -514,11 +514,9 @@ (put symbol 'custom-autoload t) (custom-add-load symbol load)) -;; This test is also in the C code of `user-variable-p'. -(defun custom-variable-p (variable) - "Return non-nil if VARIABLE is a custom variable." - (or (get variable 'standard-value) - (get variable 'custom-autoload))) +;; XEmacs; +;; #'custom-variable-p is in symbols.c, since it's called from +;; #'user-variable-p. ;;; Loading files needed to customize a symbol. ;;; This is in custom.el because menu-bar.el needs it for toggle cmds.
--- a/lisp/dumped-lisp.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/dumped-lisp.el Sat Oct 25 21:52:48 2008 +0900 @@ -95,7 +95,6 @@ ;; (pureload "profile") "loadhist" ; Must be dumped before loaddefs is loaded ; Used by help. - "help" ;; (pureload "hyper-apropos") Soon... "files" "lib-complete" @@ -110,7 +109,8 @@ "register" "iso8859-1" ; This must be before any modes ; (sets standard syntax table.) - "easy-mmode" ; Added for 21.5. + "easy-mmode" ; Added for 21.5. Used by help. + "help" "easymenu" ; Added for 20.3. "lisp-mode" "text-mode"
--- a/lisp/frame.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/frame.el Sat Oct 25 21:52:48 2008 +0900 @@ -1850,6 +1850,8 @@ :type 'number :group 'frames) +;; See also #'temp-buffer-resize-mode in help.el. + (defun show-temp-buffer-in-current-frame (buffer) "For use as the value of `temp-buffer-show-function': always displays the buffer in the selected frame, regardless of the behavior
--- a/lisp/help.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/help.el Sat Oct 25 21:52:48 2008 +0900 @@ -1878,4 +1878,21 @@ (find-variable (extent-property e 'find-variable-symbol))) (mouse-track event))))) +(define-minor-mode temp-buffer-resize-mode + "Toggle the mode which makes windows smaller for temporary buffers. +With prefix argument ARG, turn the resizing of windows displaying temporary +buffers on if ARG is positive or off otherwise. +This makes the window the right height for its contents, but never +less than `window-min-height' nor a higher proportion of its frame than +`temp-buffer-max-height'. (Note the differing semantics of the latter +versus GNU Emacs, where `temp-buffer-max-height' is an integer number of +lines.) +This applies to `help', `apropos' and `completion' buffers, and some others." + :global t :group 'help + ;; XEmacs; our implementation of this is very different. + (setq temp-buffer-shrink-to-fit temp-buffer-resize-mode)) + +;; GNU name for this function. +(defalias 'resize-temp-buffer-window 'shrink-window-if-larger-than-buffer) + ;;; help.el ends here
--- a/lisp/mule/arabic.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/arabic.el Sat Oct 25 21:52:48 2008 +0900 @@ -28,79 +28,204 @@ ;;; Code: -; (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" -; )) +;; See iso-with-esc.el for commentary on the ISO standard Arabic character +;; set. -;; For Arabic, we need three different types of character sets. -;; Digits are of direction left-to-right and of width 1-column. -;; Others are of direction right-to-left and of width 1-column or -;; 2-column. -(make-charset 'arabic-digit "Arabic digit" - '(dimension 1 - registries ["MuleArabic-0"] - chars 94 - columns 1 - direction l2r - final ?2 - graphic 0 - short-name "Arabic digit" - long-name "Arabic digit" - )) +(make-8-bit-coding-system + 'iso-8859-6 + '((#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xAC ?\u060C) ;; ARABIC COMMA + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xBB ?\u061B) ;; ARABIC SEMICOLON + (#xBF ?\u061F) ;; ARABIC QUESTION MARK + (#xC1 ?\u0621) ;; ARABIC LETTER HAMZA + (#xC2 ?\u0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 ?\u0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 ?\u0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 ?\u0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 ?\u0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 ?\u0627) ;; ARABIC LETTER ALEF + (#xC8 ?\u0628) ;; ARABIC LETTER BEH + (#xC9 ?\u0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA ?\u062A) ;; ARABIC LETTER TEH + (#xCB ?\u062B) ;; ARABIC LETTER THEH + (#xCC ?\u062C) ;; ARABIC LETTER JEEM + (#xCD ?\u062D) ;; ARABIC LETTER HAH + (#xCE ?\u062E) ;; ARABIC LETTER KHAH + (#xCF ?\u062F) ;; ARABIC LETTER DAL + (#xD0 ?\u0630) ;; ARABIC LETTER THAL + (#xD1 ?\u0631) ;; ARABIC LETTER REH + (#xD2 ?\u0632) ;; ARABIC LETTER ZAIN + (#xD3 ?\u0633) ;; ARABIC LETTER SEEN + (#xD4 ?\u0634) ;; ARABIC LETTER SHEEN + (#xD5 ?\u0635) ;; ARABIC LETTER SAD + (#xD6 ?\u0636) ;; ARABIC LETTER DAD + (#xD7 ?\u0637) ;; ARABIC LETTER TAH + (#xD8 ?\u0638) ;; ARABIC LETTER ZAH + (#xD9 ?\u0639) ;; ARABIC LETTER AIN + (#xDA ?\u063A) ;; ARABIC LETTER GHAIN + (#xE0 ?\u0640) ;; ARABIC TATWEEL + (#xE1 ?\u0641) ;; ARABIC LETTER FEH + (#xE2 ?\u0642) ;; ARABIC LETTER QAF + (#xE3 ?\u0643) ;; ARABIC LETTER KAF + (#xE4 ?\u0644) ;; ARABIC LETTER LAM + (#xE5 ?\u0645) ;; ARABIC LETTER MEEM + (#xE6 ?\u0646) ;; ARABIC LETTER NOON + (#xE7 ?\u0647) ;; ARABIC LETTER HEH + (#xE8 ?\u0648) ;; ARABIC LETTER WAW + (#xE9 ?\u0649) ;; ARABIC LETTER ALEF MAKSURA + (#xEA ?\u064A) ;; ARABIC LETTER YEH + (#xEB ?\u064B) ;; ARABIC FATHATAN + (#xEC ?\u064C) ;; ARABIC DAMMATAN + (#xED ?\u064D) ;; ARABIC KASRATAN + (#xEE ?\u064E) ;; ARABIC FATHA + (#xEF ?\u064F) ;; ARABIC DAMMA + (#xF0 ?\u0650) ;; ARABIC KASRA + (#xF1 ?\u0651) ;; ARABIC SHADDA + (#xF2 ?\u0652)) ;; ARABIC SUKUN + "ISO 8859-6 (Arabic)" +'(mnemonic "ArISO")) -(make-charset 'arabic-1-column "Arabic 1-column" - '(dimension - 1 - registries ["MuleArabic-1"] - chars 94 - columns 1 - direction r2l - final ?3 - graphic 0 - short-name "Arabic 1-col" - long-name "Arabic 1-column" - )) +(make-8-bit-coding-system + 'windows-1256 + '((#x80 ?\u20AC) ;; EURO SIGN + (#x81 ?\u067E) ;; ARABIC LETTER PEH + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0192) ;; LATIN SMALL LETTER F WITH HOOK + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x88 ?\u02C6) ;; MODIFIER LETTER CIRCUMFLEX ACCENT + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u0679) ;; ARABIC LETTER TTEH + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#x8D ?\u0686) ;; ARABIC LETTER TCHEH + (#x8E ?\u0698) ;; ARABIC LETTER JEH + (#x8F ?\u0688) ;; ARABIC LETTER DDAL + (#x90 ?\u06AF) ;; ARABIC LETTER GAF + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x98 ?\u06A9) ;; ARABIC LETTER KEHEH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9A ?\u0691) ;; ARABIC LETTER RREH + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u0153) ;; LATIN SMALL LIGATURE OE + (#x9D ?\u200C) ;; ZERO WIDTH NON-JOINER + (#x9E ?\u200D) ;; ZERO WIDTH JOINER + (#x9F ?\u06BA) ;; ARABIC LETTER NOON GHUNNA + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u060C) ;; ARABIC COMMA + (#xA2 ?\u00A2) ;; CENT SIGN + (#xA3 ?\u00A3) ;; POUND SIGN + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u00A5) ;; YEN SIGN + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xA8 ?\u00A8) ;; DIAERESIS + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAA ?\u06BE) ;; ARABIC LETTER HEH DOACHASHMEE + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xAF ?\u00AF) ;; MACRON + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u00B2) ;; SUPERSCRIPT TWO + (#xB3 ?\u00B3) ;; SUPERSCRIPT THREE + (#xB4 ?\u00B4) ;; ACUTE ACCENT + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB8 ?\u00B8) ;; CEDILLA + (#xB9 ?\u00B9) ;; SUPERSCRIPT ONE + (#xBA ?\u061B) ;; ARABIC SEMICOLON + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u00BC) ;; VULGAR FRACTION ONE QUARTER + (#xBD ?\u00BD) ;; VULGAR FRACTION ONE HALF + (#xBE ?\u00BE) ;; VULGAR FRACTION THREE QUARTERS + (#xBF ?\u061F) ;; ARABIC QUESTION MARK + (#xC0 ?\u06C1) ;; ARABIC LETTER HEH GOAL + (#xC1 ?\u0621) ;; ARABIC LETTER HAMZA + (#xC2 ?\u0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 ?\u0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 ?\u0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 ?\u0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 ?\u0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 ?\u0627) ;; ARABIC LETTER ALEF + (#xC8 ?\u0628) ;; ARABIC LETTER BEH + (#xC9 ?\u0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA ?\u062A) ;; ARABIC LETTER TEH + (#xCB ?\u062B) ;; ARABIC LETTER THEH + (#xCC ?\u062C) ;; ARABIC LETTER JEEM + (#xCD ?\u062D) ;; ARABIC LETTER HAH + (#xCE ?\u062E) ;; ARABIC LETTER KHAH + (#xCF ?\u062F) ;; ARABIC LETTER DAL + (#xD0 ?\u0630) ;; ARABIC LETTER THAL + (#xD1 ?\u0631) ;; ARABIC LETTER REH + (#xD2 ?\u0632) ;; ARABIC LETTER ZAIN + (#xD3 ?\u0633) ;; ARABIC LETTER SEEN + (#xD4 ?\u0634) ;; ARABIC LETTER SHEEN + (#xD5 ?\u0635) ;; ARABIC LETTER SAD + (#xD6 ?\u0636) ;; ARABIC LETTER DAD + (#xD7 ?\u00D7) ;; MULTIPLICATION SIGN + (#xD8 ?\u0637) ;; ARABIC LETTER TAH + (#xD9 ?\u0638) ;; ARABIC LETTER ZAH + (#xDA ?\u0639) ;; ARABIC LETTER AIN + (#xDB ?\u063A) ;; ARABIC LETTER GHAIN + (#xDC ?\u0640) ;; ARABIC TATWEEL + (#xDD ?\u0641) ;; ARABIC LETTER FEH + (#xDE ?\u0642) ;; ARABIC LETTER QAF + (#xDF ?\u0643) ;; ARABIC LETTER KAF + (#xE0 ?\u00E0) ;; LATIN SMALL LETTER A WITH GRAVE + (#xE1 ?\u0644) ;; ARABIC LETTER LAM + (#xE2 ?\u00E2) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX + (#xE3 ?\u0645) ;; ARABIC LETTER MEEM + (#xE4 ?\u0646) ;; ARABIC LETTER NOON + (#xE5 ?\u0647) ;; ARABIC LETTER HEH + (#xE6 ?\u0648) ;; ARABIC LETTER WAW + (#xE7 ?\u00E7) ;; LATIN SMALL LETTER C WITH CEDILLA + (#xE8 ?\u00E8) ;; LATIN SMALL LETTER E WITH GRAVE + (#xE9 ?\u00E9) ;; LATIN SMALL LETTER E WITH ACUTE + (#xEA ?\u00EA) ;; LATIN SMALL LETTER E WITH CIRCUMFLEX + (#xEB ?\u00EB) ;; LATIN SMALL LETTER E WITH DIAERESIS + (#xEC ?\u0649) ;; ARABIC LETTER ALEF MAKSURA + (#xED ?\u064A) ;; ARABIC LETTER YEH + (#xEE ?\u00EE) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX + (#xEF ?\u00EF) ;; LATIN SMALL LETTER I WITH DIAERESIS + (#xF0 ?\u064B) ;; ARABIC FATHATAN + (#xF1 ?\u064C) ;; ARABIC DAMMATAN + (#xF2 ?\u064D) ;; ARABIC KASRATAN + (#xF3 ?\u064E) ;; ARABIC FATHA + (#xF4 ?\u00F4) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX + (#xF5 ?\u064F) ;; ARABIC DAMMA + (#xF6 ?\u0650) ;; ARABIC KASRA + (#xF7 ?\u00F7) ;; DIVISION SIGN + (#xF8 ?\u0651) ;; ARABIC SHADDA + (#xF9 ?\u00F9) ;; LATIN SMALL LETTER U WITH GRAVE + (#xFA ?\u0652) ;; ARABIC SUKUN + (#xFB ?\u00FB) ;; LATIN SMALL LETTER U WITH CIRCUMFLEX + (#xFC ?\u00FC) ;; LATIN SMALL LETTER U WITH DIAERESIS + (#xFD ?\u200E) ;; LEFT-TO-RIGHT MARK + (#xFE ?\u200F) ;; RIGHT-TO-LEFT MARK + (#xFF ?\u06D2));; ARABIC LETTER YEH BARREE + "Windows-1256 (Arabic)" + '(mnemonic "cp1256" + documentation + "This is the much Windows encoding for Arabic, much superior to the ISO +standard one." + aliases (cp1256))) -(make-charset 'arabic-2-column "Arabic 2-column" - '(dimension - 1 - registries ["MuleArabic-2"] - chars 94 - columns 2 - direction r2l - final ?4 - graphic 0 - short-name "Arabic 2-col" - long-name "Arabic 2-column" - )) +;; The Mac Arabic coding systems don't have defined MIME names. -(make-coding-system 'iso-8859-6 'iso2022 - "ISO-8859-6 (Arabic)" - '(charset-g0 ascii - charset-g1 arabic-iso8859-6 - charset-g2 t - charset-g3 t - no-iso6429 t - mnemonic "MIME/Arbc" - )) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; ARABIC -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; (define-language-environment 'arabic -;; "Arabic" -;; (lambda () -;; (require 'arabic))) +;; #### Decide what to do about the syntax of the Arabic punctuation. ;;; arabic.el ends here
--- a/lisp/mule/cyril-util.el Sat Oct 25 21:48:33 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -;;; cyril-util.el --- utilities for Cyrillic scripts -*- coding: iso-2022-7bit; -*- - -;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Copyright (C) 2002 Ben Wing. - -;; Keywords: mule, multilingual, Cyrillic - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: Emacs 21.1 (language/cyril-util.el). - -;;; Commentary: - -;;; #### Remove this, use the one in packages instead, but with the below -;;; standard-display-cyrillic-translit. This file is unfortunately shadowed -;;; if you have the Mule packages installed! - -;;; Code: - - -;; Display - -;; Written by Valery Alexeev <valery@math.uga.edu>. - -(defvar cyrillic-language-alist - '(("Belorussian") ("Bulgarian") ("Macedonian") ("Russian") ("Serbian") - ("Ukrainian")) - "*List of known Cyrillic languages") - -;;;###autoload -(defun standard-display-cyrillic-translit (&optional cyrillic-language - disable) - "Display a cyrillic buffer using a transliteration. -For readability, the table is slightly -different from the one used for the input method `cyrillic-translit'. - -The argument is a string which specifies which language you are using; -that affects the choice of transliterations slightly. -Possible values are listed in 'cyrillic-language-alist'. - -Specifying a prefix arg, by preceding -\\[standard-display-cyrillic-translit] with \\[universal-argument] -turns off Cyrillic display. Noninteractively, the DISABLE argument -does the same thing. " - (interactive - (list - (let* ((completion-ignore-case t) - (default-language (if (assoc-ignore-case - current-language-environment - cyrillic-language-alist) - current-language-environment - "Russian"))) - (or current-prefix-arg - (completing-read - (format "Cyrillic language (default %s): " default-language) - cyrillic-language-alist nil t nil nil default-language))))) - (frob-display-table - (lambda (display-table) - (if (or disable current-prefix-arg) - (if (char-table-p display-table) - (remove-char-table 'cyrillic-iso8859-5 display-table)) - (put-display-table ?,LP(B "a" display-table) - (put-display-table ?,LQ(B "b" display-table) - (put-display-table ?,LR(B "v" display-table) - (put-display-table ?,LS(B "g" display-table) - (put-display-table ?,LT(B "d" display-table) - (put-display-table ?,LU(B "e" display-table) - (put-display-table ?,Lq(B "yo" display-table) - (put-display-table ?,LV(B "zh" display-table) - (put-display-table ?,LW(B "z" display-table) - (put-display-table ?,LX(B "i" display-table) - (put-display-table ?,LY(B "j" display-table) - (put-display-table ?,LZ(B "k" display-table) - (put-display-table ?,L[(B "l" display-table) - (put-display-table ?,L\(B "m" display-table) - (put-display-table ?,L](B "n" display-table) - (put-display-table ?,L^(B "o" display-table) - (put-display-table ?,L_(B "p" display-table) - (put-display-table ?,L`(B "r" display-table) - (put-display-table ?,La(B "s" display-table) - (put-display-table ?,Lb(B "t" display-table) - (put-display-table ?,Lc(B "u" display-table) - (put-display-table ?,Ld(B "f" display-table) - (put-display-table ?,Le(B "kh" display-table) - (put-display-table ?,Lf(B "ts" display-table) - (put-display-table ?,Lg(B "ch" display-table) - (put-display-table ?,Lh(B "sh" display-table) - (put-display-table ?,Li(B "sch" display-table) - (put-display-table ?,Lj(B "~" display-table) - (put-display-table ?,Lk(B "y" display-table) - (put-display-table ?,Ll(B "'" display-table) - (put-display-table ?,Lm(B "e'" display-table) - (put-display-table ?,Ln(B "yu" display-table) - (put-display-table ?,Lo(B "ya" display-table) - (put-display-table ?,L0(B "A" display-table) - (put-display-table ?,L1(B "B" display-table) - (put-display-table ?,L2(B "V" display-table) - (put-display-table ?,L3(B "G" display-table) - (put-display-table ?,L4(B "D" display-table) - (put-display-table ?,L5(B "E" display-table) - (put-display-table ?,L!(B "Yo" display-table) - (put-display-table ?,L6(B "Zh" display-table) - (put-display-table ?,L7(B "Z" display-table) - (put-display-table ?,L8(B "I" display-table) - (put-display-table ?,L9(B "J" display-table) - (put-display-table ?,L:(B "K" display-table) - (put-display-table ?,L;(B "L" display-table) - (put-display-table ?,L<(B "M" display-table) - (put-display-table ?,L=(B "N" display-table) - (put-display-table ?,L>(B "O" display-table) - (put-display-table ?,L?(B "P" display-table) - (put-display-table ?,L@(B "R" display-table) - (put-display-table ?,LA(B "S" display-table) - (put-display-table ?,LB(B "T" display-table) - (put-display-table ?,LC(B "U" display-table) - (put-display-table ?,LD(B "F" display-table) - (put-display-table ?,LE(B "Kh" display-table) - (put-display-table ?,LF(B "Ts" display-table) - (put-display-table ?,LG(B "Ch" display-table) - (put-display-table ?,LH(B "Sh" display-table) - (put-display-table ?,LI(B "Sch" display-table) - (put-display-table ?,LJ(B "~" display-table) - (put-display-table ?,LK(B "Y" display-table) - (put-display-table ?,LL(B "'" display-table) - (put-display-table ?,LM(B "E'" display-table) - (put-display-table ?,LN(B "Yu" display-table) - (put-display-table ?,LO(B "Ya" display-table) - (put-display-table ?,Lt(B "ie" display-table) - (put-display-table ?,Lw(B "i" display-table) - (put-display-table ?,L~(B "u" display-table) - (put-display-table ?,Lr(B "dj" display-table) - (put-display-table ?,L{(B "chj" display-table) - (put-display-table ?,Ls(B "gj" display-table) - (put-display-table ?,Lu(B "s" display-table) - (put-display-table ?,L|(B "k" display-table) - (put-display-table ?,Lv(B "i" display-table) - (put-display-table ?,Lx(B "j" display-table) - (put-display-table ?,Ly(B "lj" display-table) - (put-display-table ?,Lz(B "nj" display-table) - (put-display-table ?,L(B "dz" display-table) - (put-display-table ?,L$(B "Ye" display-table) - (put-display-table ?,L'(B "Yi" display-table) - (put-display-table ?,L.(B "U" display-table) - (put-display-table ?,L"(B "Dj" display-table) - (put-display-table ?,L+(B "Chj" display-table) - (put-display-table ?,L#(B "Gj" display-table) - (put-display-table ?,L%(B "S" display-table) - (put-display-table ?,L,(B "K" display-table) - (put-display-table ?,L&(B "I" display-table) - (put-display-table ?,L((B "J" display-table) - (put-display-table ?,L)(B "Lj" display-table) - (put-display-table ?,L*(B "Nj" display-table) - (put-display-table ?,L/(B "Dj" display-table) - - (when (equal cyrillic-language "Bulgarian") - (put-display-table ?,Li(B "sht" display-table) - (put-display-table ?,LI(B "Sht" display-table) - (put-display-table ?,Ln(B "iu" display-table) - (put-display-table ?,LN(B "Iu" display-table) - (put-display-table ?,Lo(B "ia" display-table) - (put-display-table ?,LO(B "Ia" display-table)) - - (when (equal cyrillic-language "Ukrainian") ; based on the official - ; transliteration table - (put-display-table ?,LX(B "y" display-table) - (put-display-table ?,L8(B "Y" display-table) - (put-display-table ?,LY(B "i" display-table) - (put-display-table ?,L9(B "Y" display-table) - (put-display-table ?,Ln(B "iu" display-table) - (put-display-table ?,Lo(B "ia" display-table)))) nil)) -;; -(provide 'cyril-util) - -;; Local Variables: -;; coding: iso-2022-7bit -;; End: - -;;; cyril-util.el ends here
--- a/lisp/mule/cyrillic.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/cyrillic.el Sat Oct 25 21:52:48 2008 +0900 @@ -370,6 +370,7 @@ (coding-system koi8-r) (native-coding-system koi8-r) (coding-priority koi8-r) + (invalid-sequence-coding-system koi8-r) (input-method . "cyrillic-yawerty") (features cyril-util) (locale "ru") @@ -543,6 +544,7 @@ "Ukrainian" '((coding-system koi8-u) (coding-priority koi8-u) (locale "uk") + (invalid-sequence-coding-system koi8-u) (input-method . "cyrillic-ukrainian") (documentation . "Support for Ukrainian.")) @@ -689,6 +691,7 @@ (set-language-info-alist "Bulgarian" '((coding-system windows-1251) (coding-priority windows-1251) + (invalid-sequence-coding-system windows-1251) (input-method . "bulgarian-bds") (locale "bg") (documentation @@ -699,6 +702,7 @@ (set-language-info-alist "Belarusian" '((coding-system windows-1251) (coding-priority windows-1251) + (invalid-sequence-coding-system windows-1251) (locale "be") (input-method . "belarusian") (documentation @@ -845,6 +849,7 @@ "Cyrillic-ALT" '((charset cyrillic-iso8859-5) (coding-system alternativnyj) (native-coding-system alternativnyj) + (invalid-sequence-coding-system alternativnyj) (coding-priority alternativnyj) (input-method . "cyrillic-yawerty") (features cyril-util)
--- a/lisp/mule/greek.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/greek.el Sat Oct 25 21:52:48 2008 +0900 @@ -328,6 +328,7 @@ (coding-system iso-8859-7) (coding-priority iso-8859-7) (native-coding-system iso-8859-7) + (invalid-sequence-coding-system iso-8859-7) (locale "el") (input-method . "greek") (sample-text . "Greek (,FGkk]mija(B) ,FCei\(B ,Fsar(B")
--- a/lisp/mule/iso-with-esc.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/iso-with-esc.el Sat Oct 25 21:52:48 2008 +0900 @@ -98,3 +98,108 @@ charset-g3 t no-iso6429 t mnemonic "MIME/Hbrw")) + +;;;###autoload +(make-coding-system + 'greek-iso-8bit-with-esc 'iso2022 "MIME ISO-8859-7" + '(charset-g0 ascii + charset-g1 greek-iso8859-7 + charset-g2 t + charset-g3 t + mnemonic "Grk")) + +;; 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. + +(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")) + +(loop + for (iso8859-6 unicode) + in '((#xA0 #x00A0) ;; NO-BREAK SPACE + (#xA4 #x00A4) ;; CURRENCY SIGN + (#xAC #x060C) ;; ARABIC COMMA + (#xAD #x00AD) ;; SOFT HYPHEN + (#xBB #x061B) ;; ARABIC SEMICOLON + (#xBF #x061F) ;; ARABIC QUESTION MARK + (#xC1 #x0621) ;; ARABIC LETTER HAMZA + (#xC2 #x0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 #x0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 #x0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 #x0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 #x0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 #x0627) ;; ARABIC LETTER ALEF + (#xC8 #x0628) ;; ARABIC LETTER BEH + (#xC9 #x0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA #x062A) ;; ARABIC LETTER TEH + (#xCB #x062B) ;; ARABIC LETTER THEH + (#xCC #x062C) ;; ARABIC LETTER JEEM + (#xCD #x062D) ;; ARABIC LETTER HAH + (#xCE #x062E) ;; ARABIC LETTER KHAH + (#xCF #x062F) ;; ARABIC LETTER DAL + (#xD0 #x0630) ;; ARABIC LETTER THAL + (#xD1 #x0631) ;; ARABIC LETTER REH + (#xD2 #x0632) ;; ARABIC LETTER ZAIN + (#xD3 #x0633) ;; ARABIC LETTER SEEN + (#xD4 #x0634) ;; ARABIC LETTER SHEEN + (#xD5 #x0635) ;; ARABIC LETTER SAD + (#xD6 #x0636) ;; ARABIC LETTER DAD + (#xD7 #x0637) ;; ARABIC LETTER TAH + (#xD8 #x0638) ;; ARABIC LETTER ZAH + (#xD9 #x0639) ;; ARABIC LETTER AIN + (#xDA #x063A) ;; ARABIC LETTER GHAIN + (#xE0 #x0640) ;; ARABIC TATWEEL + (#xE1 #x0641) ;; ARABIC LETTER FEH + (#xE2 #x0642) ;; ARABIC LETTER QAF + (#xE3 #x0643) ;; ARABIC LETTER KAF + (#xE4 #x0644) ;; ARABIC LETTER LAM + (#xE5 #x0645) ;; ARABIC LETTER MEEM + (#xE6 #x0646) ;; ARABIC LETTER NOON + (#xE7 #x0647) ;; ARABIC LETTER HEH + (#xE8 #x0648) ;; ARABIC LETTER WAW + (#xE9 #x0649) ;; ARABIC LETTER ALEF MAKSURA + (#xEA #x064A) ;; ARABIC LETTER YEH + (#xEB #x064B) ;; ARABIC FATHATAN + (#xEC #x064C) ;; ARABIC DAMMATAN + (#xED #x064D) ;; ARABIC KASRATAN + (#xEE #x064E) ;; ARABIC FATHA + (#xEF #x064F) ;; ARABIC DAMMA + (#xF0 #x0650) ;; ARABIC KASRA + (#xF1 #x0651) ;; ARABIC SHADDA + (#xF2 #x0652));; ARABIC SUKUN + do (set-unicode-conversion (make-char 'arabic-iso8859-6 iso8859-6) + unicode)) + +;;;###autoload +(make-coding-system + 'arabic-iso-8bit-with-esc 'iso2022 ;; GNU's iso-8859-6 is + ;; iso2022-compatible. + "ISO-8859-6 (Arabic)" + '(charset-g0 ascii + charset-g1 arabic-iso8859-6 + charset-g2 t + charset-g3 t + no-iso6429 t + mnemonic "MIME/Arbc")) +
--- a/lisp/mule/latin.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/latin.el Sat Oct 25 21:52:48 2008 +0900 @@ -957,11 +957,12 @@ for ((charset codesys default-input nice-charset-1 nice-charset-2 ;; supported-langs is a list if the doc string is replaced ;; entirely - supported-langs) + supported-langs invalid-sequence-coding-system) langenvs) in '(((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1" " Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, - Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.") + Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish." + windows-1252) (("Danish" "da") ("Dutch" "nl" "TUTORIAL.nl") ("Faeroese" "fo") @@ -1024,6 +1025,8 @@ (coding-system ,codesys) (coding-priority ,codesys) (native-coding-system ,codesys) + (invalid-sequence-coding-system ,(or invalid-sequence-coding-system + codesys)) (documentation . ,(if (listp supported-langs) (car supported-langs) (format "\ Generic language environment for %s (%s)." nice-charset-1 nice-charset-2))))
--- a/lisp/mule/mule-category.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/mule-category.el Sat Oct 25 21:52:48 2008 +0900 @@ -244,7 +244,6 @@ (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")
--- a/lisp/mule/mule-cmds.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/mule-cmds.el Sat Oct 25 21:52:48 2008 +0900 @@ -225,7 +225,15 @@ If there is no value for this property, the MS Windows locale is assumed to have the same name as the - language environment." + language environment. + + invalid-sequence-coding-system + VALUE is a fixed-width 8-bit coding system used to + display Unicode error sequences (using a face to make + it clear that the data is invalid). In Western Europe + this is normally windows-1252; in the Russia and the + former Soviet Union koi8-ru or windows-1251 makes more + sense." (if (symbolp lang-env) (setq lang-env (symbol-name lang-env))) (let (lang-slot prop-slot) @@ -760,6 +768,25 @@ (if (functionp func) (funcall func))) + (let ((invalid-sequence-coding-system + (get-language-info language-name 'invalid-sequence-coding-system)) + (disp-table (specifier-instance current-display-table)) + glyph) + (when (consp invalid-sequence-coding-system) + (setq invalid-sequence-coding-system + (car invalid-sequence-coding-system))) + (map-char-table + #'(lambda (key entry) + (setq glyph (make-glyph + (vector + 'string :data + (decode-coding-string (string entry) + invalid-sequence-coding-system)))) + (set-glyph-face glyph 'unicode-invalid-sequence-warning-face) + (put-char-table key glyph disp-table) + nil) + unicode-error-default-translation-table)) + ;; Fit the charsets preferences in unicode conversions for the ;; language environment. (set-language-unicode-precedence-list
--- a/lisp/mule/mule-msw-init-late.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/mule-msw-init-late.el Sat Oct 25 21:52:48 2008 +0900 @@ -37,7 +37,6 @@ (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")
--- a/lisp/mule/mule-win32-init.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/mule/mule-win32-init.el Sat Oct 25 21:52:48 2008 +0900 @@ -162,7 +162,8 @@ ; ("ANSI" 1253 no-conversion "Windows 3.1 Greek") ("ANSI" 1254 no-conversion "Windows 3.1 Turkish") ("ANSI" 1255 no-conversion "Hebrew") - ("ANSI" 1256 no-conversion "Arabic") + ;; We implement these ourselves. + ; ("ANSI" 1256 no-conversion "Arabic") ("ANSI" 1257 no-conversion "Baltic") ("ANSI" 1258 no-conversion "VietNam") ;; #### Is this category right? I don't have Lunde to hand, and the
--- a/lisp/specifier.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/specifier.el Sat Oct 25 21:52:48 2008 +0900 @@ -988,4 +988,18 @@ (specifier-instance specifier domain)))) (list (cons nil inst)))))))))) +;; Character 160 (octal 0240) displays incorrectly under some X +;; installations apparently due to a universally crocked font width +;; specification. Display it as a space since that's what's expected. +;; +;; (make-char-table 'generic) instead of (make-display-table) because +;; make-display-table isn't dumped, and this file is. +;; +;; We also want the global display table to be actually globally +;; initialised; that's why this is here, and not in x-init.el, these days. + +(set-specifier current-display-table + #s(char-table type generic data (?\xA0 ?\x20)) + 'global) + ;;; specifier.el ends here
--- a/lisp/subr.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/subr.el Sat Oct 25 21:52:48 2008 +0900 @@ -1722,4 +1722,23 @@ ;; define-mail-user-agent is in simple.el. +;; XEmacs; added. +(defun skip-chars-quote (string) + "Return a string that means all characters in STRING will be skipped, +if passed to `skip-chars-forward' or `skip-chars-backward'. + +Ranges and carets are not treated specially. This implementation is +in Lisp; do not use it in performance-critical code." + (let ((list (delete-duplicates (string-to-list string) :test #'=))) + (when (/= 1 (length list)) ;; No quoting needed in a string of length 1. + (when (eq ?^ (car list)) + (setq list (nconc (cdr list) '(?^)))) + (when (memq ?\\ list) + (setq list (delq ?\\ list) + list (nconc (list ?\\ ?\\) list))) + (when (memq ?- list) + (setq list (delq ?- list) + list (nconc list '(?\\ ?-))))) + (apply #'string list))) + ;;; subr.el ends here
--- a/lisp/unicode.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/unicode.el Sat Oct 25 21:52:48 2008 +0900 @@ -73,7 +73,6 @@ ("8859-3.TXT" latin-iso8859-3 #xA0 #xFF #x-80) ("8859-4.TXT" latin-iso8859-4 #xA0 #xFF #x-80) ("8859-5.TXT" cyrillic-iso8859-5 #xA0 #xFF #x-80) - ("8859-6.TXT" arabic-iso8859-6 #xA0 #xFF #x-80) ("8859-7.TXT" greek-iso8859-7 #xA0 #xFF #x-80) ("8859-8.TXT" hebrew-iso8859-8 #xA0 #xFF #x-80) ("8859-9.TXT" latin-iso8859-9 #xA0 #xFF #x-80) @@ -154,12 +153,12 @@ '(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 arabic-iso8859-6 + vietnamese-viscii-lower vietnamese-viscii-upper 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 indian-is13194 korean-ksc5601 chinese-cns11643-1 chinese-cns11643-2 - chinese-isoir165 arabic-1-column arabic-2-column arabic-digit + chinese-isoir165 composite ethiopic indian-1-column indian-2-column jit-ucs-charset-0 katakana-jisx0201 lao thai-tis620 thai-xtis tibetan tibetan-1-column latin-jisx0201 chinese-cns11643-3 chinese-cns11643-4 @@ -526,7 +525,7 @@ To transform XEmacs Unicode error sequences to the Latin-1 characters that correspond to the octets on disk, you can use this variable. ") -(defvar unicode-error-sequence-regexp-range +(defvar unicode-invalid-sequence-regexp-range (and (featurep 'mule) (format "%c%c-%c" (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 0) @@ -564,7 +563,7 @@ ;; Comment out until the issue in ;; 18179.49815.622843.336527@parhasard.net is fixed. (assert t ; (re-search-forward (concat "[" - ; unicode-error-sequence-regexp-range + ; unicode-invalid-sequence-regexp-range ; "]")) nil (format "Could not find char ?\\x%x in buffer" i)))) @@ -586,12 +585,12 @@ (setq begin (progn (skip-chars-forward - (concat "^" unicode-error-sequence-regexp-range)) + (concat "^" unicode-invalid-sequence-regexp-range)) (point)) end (and (not (= (point) (point-max))) (progn (skip-chars-forward - unicode-error-sequence-regexp-range) + unicode-invalid-sequence-regexp-range) (point)))) (if end (funcall frob-function begin end)))))) @@ -611,6 +610,9 @@ (translate-region start finish table)) begin end buffer)) +;; Sure would be nice to be able to use defface here. +(copy-face 'highlight 'unicode-invalid-sequence-warning-face) + (unless (featurep 'mule) ;; We do this in such a roundabout way--instead of having the above defun ;; and defvar calls inside a (when (featurep 'mule) ...) form--to have @@ -619,8 +621,8 @@ ;; Lisp. (mapcar #'unintern '(ccl-encode-to-ucs-2 unicode-error-default-translation-table - unicode-error-sequence-regexp-range - frob-unicode-errors-region unicode-error-translate-region))) + unicode-invalid-regexp-range frob-unicode-errors-region + unicode-error-translate-region))) ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's ;; an implementation in appendix A.1 of the Unicode Standard, Version
--- a/lisp/window.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/window.el Sat Oct 25 21:52:48 2008 +0900 @@ -33,16 +33,19 @@ ;;;; Window tree functions. -(defun one-window-p (&optional nomini which-frames which-devices) - "Return non-nil if the selected window is the only window (in its frame). -Optional arg NOMINI non-nil means don't count the minibuffer -even if it is active. +;; XEmacs addition, to expose WINDOW. +(defun only-window-p (&optional window nomini which-frames which-devices) + "Return non-nil if WINDOW is the only window in some context, +normally its frame. Optional arg NOMINI non-nil means don't count the +minibuffer even if it is active. -By default, only the windows in the selected frame are considered. -The optional argument WHICH-FRAMES changes this behavior: -WHICH-FRAMES nil or omitted means count only the selected frame, +The optional argument WHICH-FRAMES changes the frames that are considered: + +WHICH-FRAMES nil or omitted means count only WINDOW's frame, plus the minibuffer it uses (which may be on another frame). -WHICH-FRAMES = `visible' means include windows on all visible frames. +\(But, for all values of WHICH-FRAMES, see the documentation for the +WHICH-DEVICES argument.) +WHICH-FRAMES = `visible' means include windows on all visible frames WHICH-FRAMES = 0 means include windows on all visible and iconified frames. WHICH-FRAMES = t means include windows on all frames including invisible frames. If WHICH-FRAMES is any other value, count only the selected frame. @@ -56,12 +59,20 @@ If a device type, search all devices of that type. If `window-system', search all devices on window-system consoles. Any other non-nil value means search all devices." - (let ((base-window (selected-window))) - (if (and nomini (eq base-window (minibuffer-window))) + (let ((base-window (or window (selected-window)))) + (if (and nomini (eq base-window + (minibuffer-window (window-frame base-window)))) (setq base-window (next-window base-window))) (eq base-window (next-window base-window (if nomini 'arg) which-frames which-devices)))) +(defun one-window-p (&optional nomini which-frames which-devices) + "Return the result of calling `only-window-p' on the selected window. + +See that function's documentation for the meaning of the NOMINI, +WHICH-FRAMES and WHICH-DEVICES arguments." + (only-window-p (selected-window) nomini which-frames which-devices)) + (defun walk-windows (function &optional minibuf which-frames which-devices) "Cycle through all visible windows, calling FUNCTION for each one. FUNCTION is called with a window as argument. @@ -351,24 +362,18 @@ (interactive "p") (shrink-window arg t)) -; (defun window-buffer-height (window) -; "Return the height (in screen lines) of the buffer that WINDOW is displaying." -; (save-excursion -; (set-buffer (window-buffer window)) -; (goto-char (point-min)) -; (let ((ignore-final-newline -; ;; If buffer ends with a newline, ignore it when counting height -; ;; unless point is after it. -; (and (not (eobp)) (eq ?\n (char-after (1- (point-max))))))) -; (+ 1 (nth 2 (compute-motion (point-min) -; '(0 . 0) -; (- (point-max) (if ignore-final-newline 1 0)) -; (cons 0 100000000) -; (window-width window) -; nil -; window)))))) - -(defun count-screen-lines (&optional beg end count-final-newline window) +(defun window-buffer-height (window) + "Return the height (in screen lines) of the buffer that WINDOW is displaying." + (with-current-buffer (window-buffer window) + (max 1 + (count-screen-lines (point-min) (point-max) + ;; If buffer ends with a newline, ignore it when + ;; counting height unless point is after it. + (eobp) + window)))) +;; XEmacs change; accept BUFFER. +(defun count-screen-lines (&optional beg end count-final-newline + window buffer) "Return the number of screen lines in the region. The number of screen lines may be different from the number of actual lines, due to line breaking, display table, etc. @@ -383,112 +388,120 @@ parameters such as width, horizontal scrolling, and so on. The default is to use the selected window's parameters. -Like `vertical-motion', `count-screen-lines' always uses the current buffer, -regardless of which buffer is displayed in WINDOW. This makes possible to use -`count-screen-lines' in any buffer, whether or not it is currently displayed -in some window." +Optional argument BUFFER is the buffer to check, and defaults to the current +buffer. See `vertical-motion' for some caveats on the differences between +this behaviour and that of GNU Emacs." (unless beg - (setq beg (point-min))) + (setq beg (point-min buffer))) (unless end - (setq end (point-max))) + (setq end (point-max buffer))) + (unless buffer + (setq buffer (current-buffer))) (if (= beg end) 0 (save-excursion (save-restriction - (widen) - (narrow-to-region (min beg end) - (if (and (not count-final-newline) - (= ?\n (char-before (max beg end)))) - (1- (max beg end)) - (max beg end))) - (goto-char (point-min)) - (1+ (vertical-motion (buffer-size) window)))))) + (let ((old-window-buffer (window-buffer window))) + (unwind-protect + (progn + (set-window-buffer window buffer) + (set-buffer buffer) + (widen) + (narrow-to-region (min beg end) + (if (and (not count-final-newline) + (= ?\n (char-before (max beg end)))) + (1- (max beg end)) + (max beg end))) + (goto-char (point-min)) + (1+ (vertical-motion (buffer-size) window))) + (set-window-buffer window old-window-buffer))))))) -; (defun fit-window-to-buffer (&optional window max-height min-height) -; "Make WINDOW the right size to display its contents exactly. -; If WINDOW is omitted or nil, it defaults to the selected window. -; If the optional argument MAX-HEIGHT is supplied, it is the maximum height -; the window is allowed to be, defaulting to the frame height. -; If the optional argument MIN-HEIGHT is supplied, it is the minimum -; height the window is allowed to be, defaulting to `window-min-height'. +(defun fit-window-to-buffer (&optional window max-height min-height) + "Make WINDOW the right height to display its contents exactly. +If WINDOW is omitted or nil, it defaults to the selected window. +If the optional argument MAX-HEIGHT is supplied, it is the maximum height + the window is allowed to be, defaulting to the frame height. +If the optional argument MIN-HEIGHT is supplied, it is the minimum + height the window is allowed to be, defaulting to `window-min-height'. -; The heights in MAX-HEIGHT and MIN-HEIGHT include the mode-line and/or -; header-line." -; (interactive) +The heights in MAX-HEIGHT and MIN-HEIGHT include the mode-line and/or +header-line." + (interactive) -; (when (null window) -; (setq window (selected-window))) -; (when (null max-height) -; (setq max-height (frame-height (window-frame window)))) + (when (null window) + (setq window (selected-window))) + (when (null max-height) + (setq max-height (frame-height (window-frame window)))) -; (let* ((buf -; ;; Buffer that is displayed in WINDOW -; (window-buffer window)) -; (window-height -; ;; The current height of WINDOW -; (window-height window)) -; (desired-height -; ;; The height necessary to show the buffer displayed by WINDOW -; ;; (`count-screen-lines' always works on the current buffer). -; (with-current-buffer buf -; (+ (count-screen-lines) -; ;; If the buffer is empty, (count-screen-lines) is -; ;; zero. But, even in that case, we need one text line -; ;; for cursor. -; (if (= (point-min) (point-max)) -; 1 0) -; ;; For non-minibuffers, count the mode-line, if any -; (if (and (not (window-minibuffer-p window)) -; mode-line-format) -; 1 0) -; ;; Count the header-line, if any -; (if header-line-format 1 0)))) -; (delta -; ;; Calculate how much the window height has to change to show -; ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. -; (- (max (min desired-height max-height) -; (or min-height window-min-height)) -; window-height)) -; ;; We do our own height checking, so avoid any restrictions due to -; ;; window-min-height. -; (window-min-height 1)) + (let* ((buf + ;; Buffer that is displayed in WINDOW + (window-buffer window)) + (window-height + ;; The current height of WINDOW + (window-height window)) + (desired-height + ;; The height necessary to show the buffer displayed by WINDOW + ;; (`count-screen-lines' always works on the current buffer). + ;; XEmacs; it does in GNU, we provide a BUFFER argument, but we're + ;; not changing the implementation. + (with-current-buffer buf + (+ (count-screen-lines) + ;; If the buffer is empty, (count-screen-lines) is + ;; zero. But, even in that case, we need one text line + ;; for cursor. + (if (= (point-min) (point-max)) + 1 0) + ;; For non-minibuffers, count the mode-line, if any + (if (and (not (window-minibuffer-p window)) + mode-line-format) + 1 0) + ;; Count the header-line, if any + ;; XEmacs change; we don't have header-line-format. + ;; (if header-line-format 1 0)))) + (if (specifier-instance top-gutter) 1 0)))) + (delta + ;; Calculate how much the window height has to change to show + ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. + (- (max (min desired-height max-height) + (or min-height window-min-height)) + window-height))) -; ;; Don't try to redisplay with the cursor at the end -; ;; on its own line--that would force a scroll and spoil things. -; (when (with-current-buffer buf -; (and (eobp) (bolp) (not (bobp)))) -; (set-window-point window (1- (window-point window)))) + ;; Don't try to redisplay with the cursor at the end + ;; on its own line--that would force a scroll and spoil things. + (when (with-current-buffer buf + (and (eobp) (bolp) (not (bobp)))) + (set-window-point window (1- (window-point window)))) -; (save-selected-window -; (select-window window) - -; ;; Adjust WINDOW to the nominally correct size (which may actually -; ;; be slightly off because of variable height text, etc). -; (unless (zerop delta) -; (enlarge-window delta)) + ;; Adjust WINDOW to the nominally correct size (which may actually + ;; be slightly off because of variable height text, etc). + (unless (zerop delta) + (enlarge-window delta nil window)) -; ;; Check if the last line is surely fully visible. If not, -; ;; enlarge the window. -; (let ((end (with-current-buffer buf -; (save-excursion -; (goto-char (point-max)) -; (when (and (bolp) (not (bobp))) -; ;; Don't include final newline -; (backward-char 1)) -; (when truncate-lines -; ;; If line-wrapping is turned off, test the -; ;; beginning of the last line for visibility -; ;; instead of the end, as the end of the line -; ;; could be invisible by virtue of extending past -; ;; the edge of the window. -; (forward-line 0)) -; (point))))) -; (set-window-vscroll window 0) -; (while (and (< desired-height max-height) -; (= desired-height (window-height window)) -; (not (pos-visible-in-window-p end window))) -; (enlarge-window 1) -; (setq desired-height (1+ desired-height))))))) + ;; Check if the last line is surely fully visible. If not, + ;; enlarge the window. + (let ((end (with-current-buffer buf + (save-excursion + (goto-char (point-max)) + (when (and (bolp) (not (bobp))) + ;; Don't include final newline + (backward-char 1)) + (when truncate-lines + ;; If line-wrapping is turned off, test the + ;; beginning of the last line for visibility + ;; instead of the end, as the end of the line + ;; could be invisible by virtue of extending past + ;; the edge of the window. + (forward-line 0)) + (point)))) + ;; XEmacs change; bind window-pixel-vscroll-increment, we don't + ;; have #'set-window-vscroll. + (window-pixel-scroll-increment 0)) + ; (set-window-vscroll window 0) + (while (and (< desired-height max-height) + (= desired-height (window-height window)) + (not (pos-visible-in-window-p end window))) + (enlarge-window 1 nil window) + (setq desired-height (1+ desired-height)))))) (defun shrink-window-if-larger-than-buffer (&optional window) "Shrink the WINDOW to be as small as possible to display its contents.
--- a/lisp/x-init.el Sat Oct 25 21:48:33 2008 +0900 +++ b/lisp/x-init.el Sat Oct 25 21:52:48 2008 +0900 @@ -312,15 +312,4 @@ (if (equal display "") (setq display nil)) (make-frame-on-device 'x display props)) -;; Character 160 (octal 0240) displays incorrectly under X apparently -;; due to a universally crocked font width specification. Display it -;; as a space since that's what seems to be expected. -;; -;; (make-char-table 'generic) instead of (make-display-table) because -;; make-display-table isn't dumped, and this file is. - -(let ((tab (make-char-table 'generic))) - (put-char-table 160 " " tab) - (set-specifier current-display-table tab 'global 'x)) - ;;; x-init.el ends here
--- a/man/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/man/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -1,3 +1,15 @@ +2008-10-04 Stephen J. Turnbull <stephen@xemacs.org> + + * xemacs-faq.texi (Q5.0.7): Fix broken instructions on use of + antialiased fonts. + +2008-08-31 Aidan Kehoe <kehoea@parhasard.net> + + * xemacs-faq.texi (Q5.0.7): Add a section on how one can use + antialiased fonts under X11; thank you Giacomo Boffi. + (Q1.0.3): Clarify pronunciation using a serious phonetic + alphabet. + 2008-07-26 Ville Skyttä <scop@xemacs.org> * xemacs/custom.texi, xemacs/frame.texi, xemacs/mule.texi,
--- a/man/xemacs-faq.texi Sat Oct 25 21:48:33 2008 +0900 +++ b/man/xemacs-faq.texi Sat Oct 25 21:52:48 2008 +0900 @@ -433,6 +433,7 @@ * Q5.0.4:: How can I have the window title area display the full path? * Q5.0.5:: @samp{xemacs -name junk} doesn't work? * Q5.0.6:: @samp{-iconic} doesn't work. +* Q5.0.7:: How can I use antialiased fonts under X11? 5.1: Microsoft Windows * Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? @@ -715,7 +716,10 @@ @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction @unnumberedsubsec Q1.0.3: How do you pronounce XEmacs? -The most common pronounciation is @samp{Eks eemax}. +The most common pronounciation is @samp{Eks eemax}, @samp{Eks'im&ks} in +Kirshenbaum IPA. (See +@uref{http://www.kirshenbaum.net/IPA/ascii-ipa.pdf} if you know the IPA +already and want to know how to map from Kirshenbaum to it.) @node Q1.0.4, Q1.0.5, Q1.0.3, Introduction @unnumberedsubsec Q1.0.4: What does XEmacs look like? @@ -6113,6 +6117,7 @@ * Q5.0.4:: How can I have the window title area display the full path? * Q5.0.5:: @samp{xemacs -name junk} doesn't work? * Q5.0.6:: @samp{-iconic} doesn't work. +* Q5.0.7:: How can I use antialiased fonts under X11? 5.1: Microsoft Windows * Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? @@ -6261,7 +6266,7 @@ (make-frame '((name . "the-name"))) @end lisp -@node Q5.0.6, Q5.1.1, Q5.0.5, External Subsystems +@node Q5.0.6, Q5.0.7, Q5.0.5, External Subsystems @unnumberedsubsec Q5.0.6: @samp{-iconic} doesn't work. When I start up XEmacs using @samp{-iconic} it doesn't work right. @@ -6276,9 +6281,60 @@ bugs... @end quotation +@node Q5.0.7, Q5.1.1, Q5.0.6, External Subsystems +@unnumberedsubsec Q5.0.7: How can I use antialiased fonts under X11? + +The X11 version of XEmacs can use antialiased fonts via the Xft, +fontconfig, and freetype libraries. To configure this you need a recent +beta version (at least 21.5.24); the more recent, the better. This is +beta software, the usual caveats apply. Rebuild xemacs using the +following configure options, plus any others you normally use: + +@samp{--enable-mule --with-xft=emacs,menubars} + +Xft @emph{may} work without Mule but the developers working on the Xft +code invariably build with Mule. The tab control also supports Xft, and +at some date the progress gauge will as well. If they are configured in +to XEmacs, you may add @samp{tabs} and @samp{gauges} to the value of the +@samp{--with-xft} option (with a comma separating each value from the +previous ones). For further details on the XEmacs widgets that support +XFT, see the output of @code{./configure --help}. If you use a package +manager from your OS distribution, you may need to install development +packages for @file{fontconfig} and @file{Xft}, and possibly for their +prequisites. + +To specify a particular antialiased font, put something like the +following lines in your @file{~/.Xdefaults} or @file{~/.Xresources}: + +@example + XEmacs.default.attributeFont: monospace-12 + XEmacs.bold.attributeFont: monospace-12:style=Bold + XEmacs.italic.attributeFont: monospace-12:style=Oblique +XEmacs.bold-italic.attributeFont: monospace-12:style=Bold Oblique + XEmacs.modeline.attributeFont: sans-serif-11 + XEmacs.menubar.xftFont: sans-serif-11 + XEmacs*XftFont: sans-serif-11 +@end example + +@strong{Warning}: These resource naming conventions are just hacks to +get the code running; you should expect them to change. (Sorry about +that, but this @emph{is} beta software!) + +Then run @code{xrdb -merge} before starting the new, XFT-enabled +xemacs. You can choose the available fonts from the list given by +@code{fc-list}; try @code{xfd -fa FONTNAME-SIZE} to preview a given +font. Note that ``monospace'' and ``sans-serif'' are generic aliases +defined by fontconfig which may correspond to any of many real fonts +based on local configuration and availability of the aliased fonts, +and so are likely to give good results in a well-set-up system. + +Although Customize does not yet handle fontconfig fontspecs, you can +pass them as strings directly to @samp{set-face-font} to set fonts from +Lisp. + @unnumberedsec 5.1: Microsoft Windows -@node Q5.1.1, Q5.1.2, Q5.0.6, External Subsystems +@node Q5.1.1, Q5.1.2, Q5.0.7, External Subsystems @unnumberedsubsec Q5.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*}
--- a/src/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/src/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -1,3 +1,67 @@ +2008-10-25 Stephen J. Turnbull <stephen@xemacs.org> + + * lisp.h (static_pro): Cast out a warning. + g++ 4.3 complains about the conversion of const char to char. + These end up in a dynarray, so we would need to define a whole new + class of dynarray just to handle the const char stuff. + +2008-08-27 Aidan Kehoe <kehoea@parhasard.net> + + * symbols.c (Fuser_variable_p): + (map_varalias_chain): + Use EQ() and !EQ(), don't compare two Lisp_Objects using == and + !=. Fixes the union build, thank you Robert Delius Royar. + +2008-08-23 Aidan Kehoe <kehoea@parhasard.net> + + * eval.c (Fuser_variable_p): Moved to symbols.c + * symbols.c (Fcustom_variable_p): Moved here from custom.el. + (user_variable_alias_check_fun): Mapper function used in + `user-variable-p'. + (Fuser_variable_p): Moved here from eval.c, to allow it to examine + the variable alias chain. Expanded to check each entry in the + variable alias chain for signs of being a user variable; + documentation updated, noting the differences between GNU's + behaviour and ours (ours is a little more sensible) + (map_varalias_chain): New. + Given a C function, call it at least once for each symbol in a + symbol's varalias chain, signalling an error if there's a cycle, + and returning immediately if the function returns something other + than Qzero. + (Fdefvaralias): Correct the use of the word "alias" in the + docstring and in the argument name. Motivate this in a + comment. Add support for a DOCSTRING argument, something GNU has + too, and document this + * gc.c (vars_of_gc): Start the docstring of + `garbage-collection-messages' with an asterisk, to indicate that + it's a user variable. + +2008-08-09 Aidan Kehoe <kehoea@parhasard.net> + + Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change, + which can allow much better performace with some stupid + filesystems: + * fileio.c (write_region_inhibit_fsync): New variable. + (Fwrite_region): Use it to skip call to fsync. + (syms_of_fileio): Initialize it. + +2008-08-10 Aidan Kehoe <kehoea@parhasard.net> + + * objects-xlike-inc.c (charset_table): Remove the entry for + Vcharset_arabic_iso8859_7, thank you Robert Delius Royar. + +2008-08-05 Aidan Kehoe <kehoea@parhasard.net> + + * mule-charset.c (complex_vars_of_mule_charset): + Remove Vcharset_arabic_iso8859_7. + * lisp.h: Remove Vcharset_arabic_iso8859_7. + See commentary in lisp/mule/iso-with-esc.el for motivation. + +2008-08-03 Mats Lidell <matsl@xemacs.org> + + * config.h.in: Renamed USE_XFT_GAUGE to USE_XFT_GAUGES in sync + with configure.ac. + 2008-07-20 John Paul Wallington <jpw@pobox.com> * nt.c (Fmswindows_short_file_name, Fmswindows_long_file_name):
--- a/src/config.h.in Sat Oct 25 21:48:33 2008 +0900 +++ b/src/config.h.in Sat Oct 25 21:52:48 2008 +0900 @@ -225,7 +225,7 @@ /* Per-widget stuff will go away? */ #undef USE_XFT_MENUBARS #undef USE_XFT_TABS -#undef USE_XFT_GAUGE +#undef USE_XFT_GAUGES /* Defines for building X applications */ #ifdef HAVE_X_WINDOWS
--- a/src/eval.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/eval.c Sat Oct 25 21:52:48 2008 +0900 @@ -1356,29 +1356,8 @@ return sym; } -DEFUN ("user-variable-p", Fuser_variable_p, 1, 1, 0, /* -Return t if VARIABLE is intended to be set and modified by users. -\(The alternative is a variable used internally in a Lisp program.) -Determined by whether the first character of the documentation -for the variable is `*'. -*/ - (variable)) -{ - Lisp_Object documentation = Fget (variable, Qvariable_documentation, Qnil); - - return - ((INTP (documentation) && XINT (documentation) < 0) || - - (STRINGP (documentation) && - (string_byte (documentation, 0) == '*')) || - - /* If (STRING . INTEGER), a negative integer means a user variable. */ - (CONSP (documentation) - && STRINGP (XCAR (documentation)) - && INTP (XCDR (documentation)) - && XINT (XCDR (documentation)) < 0)) ? - Qt : Qnil; -} +/* XEmacs: user-variable-p is in symbols.c, since it needs to mess around + with the symbol variable aliases. */ DEFUN ("macroexpand-internal", Fmacroexpand_internal, 1, 2, 0, /* Return result of expanding macros at top level of FORM. @@ -6582,7 +6561,6 @@ DEFSUBR (Fdefmacro); DEFSUBR (Fdefvar); DEFSUBR (Fdefconst); - DEFSUBR (Fuser_variable_p); DEFSUBR (Flet); DEFSUBR (FletX); DEFSUBR (Fwhile);
--- a/src/fileio.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/fileio.c Sat Oct 25 21:52:48 2008 +0900 @@ -111,6 +111,11 @@ Lisp_Object Vdirectory_sep_char; +#ifdef HAVE_FSYNC +/* Nonzero means skip the call to fsync in Fwrite-region. */ +int write_region_inhibit_fsync; +#endif + /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -3568,7 +3573,7 @@ Disk full in NFS may be reported here. */ /* mib says that closing the file will try to write as fast as NFS can do it, and that means the fsync here is not crucial for autosave files. */ - if (!auto_saving && fsync (desc) < 0 + if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0 /* If fsync fails with EINTR, don't treat that as serious. */ && errno != EINTR) { @@ -4560,6 +4565,15 @@ */ ); Vauto_save_list_file_name = Qnil; +#ifdef HAVE_FSYNC + DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync /* +*Non-nil means don't call fsync in `write-region'. +This variable affects calls to `write-region' as well as save commands. +A non-nil value may result in data loss! +*/ ); + write_region_inhibit_fsync = 0; +#endif + DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix /* Prefix for generating auto-save-list-file-name. Emacs's pid and the system name will be appended to
--- a/src/gc.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/gc.c Sat Oct 25 21:52:48 2008 +0900 @@ -2166,7 +2166,7 @@ */ ); DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages /* - Non-nil means display messages at start and end of garbage collection. +*Non-nil means display messages at start and end of garbage collection. */ ); garbage_collection_messages = 0;
--- a/src/lisp.h Sat Oct 25 21:48:33 2008 +0900 +++ b/src/lisp.h Sat Oct 25 21:52:48 2008 +0900 @@ -3815,12 +3815,16 @@ MODULE_API void staticpro_1 (Lisp_Object *, Ascbyte *); MODULE_API void staticpro_nodump_1 (Lisp_Object *, Ascbyte *); -#define staticpro(ptr) staticpro_1 (ptr, #ptr) -#define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, #ptr) +/* g++ 4.3 complains about the conversion of const char to char. + These end up in a dynarray, so we would need to define a whole new class + of dynarray just to handle the const char stuff. + ####Check to see how hard this might be. */ +#define staticpro(ptr) staticpro_1 (ptr, (Ascbyte *) #ptr) +#define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, (Ascbyte *) #ptr) #ifdef HAVE_SHLIB MODULE_API void unstaticpro_nodump_1 (Lisp_Object *, Ascbyte *); -#define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, #ptr) +#define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, (Ascbyte *) #ptr) #endif #else @@ -5229,7 +5233,6 @@ 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;
--- a/src/mule-charset.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/mule-charset.c Sat Oct 25 21:52:48 2008 +0900 @@ -47,7 +47,6 @@ 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; @@ -94,7 +93,6 @@ Qlatin_iso8859_4, Qthai_tis620, Qgreek_iso8859_7, - Qarabic_iso8859_6, Qhebrew_iso8859_8, Qkatakana_jisx0201, Qlatin_jisx0201, @@ -1112,7 +1110,6 @@ 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); @@ -1236,15 +1233,6 @@ 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,
--- a/src/objects-xlike-inc.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/objects-xlike-inc.c Sat Oct 25 21:52:48 2008 +0900 @@ -358,7 +358,6 @@ { &Vcharset_latin_iso8859_9, NULL, NULL }, { &Vcharset_latin_iso8859_15, NULL, NULL }, { &Vcharset_thai_tis620, NULL, NULL }, - { &Vcharset_arabic_iso8859_6, NULL, NULL }, { &Vcharset_hebrew_iso8859_8, "Hebrew", "he" }, { &Vcharset_cyrillic_iso8859_5, NULL, NULL }, /* #### these probably are not quite right */
--- a/src/symbols.c Sat Oct 25 21:48:33 2008 +0900 +++ b/src/symbols.c Sat Oct 25 21:52:48 2008 +0900 @@ -84,6 +84,9 @@ static Lisp_Object *value_slot_past_magic (Lisp_Object sym); static Lisp_Object follow_varalias_pointers (Lisp_Object symbol, Lisp_Object follow_past_lisp_magic); +static Lisp_Object map_varalias_chain (Lisp_Object symbol, + Lisp_Object follow_past_lisp_magic, + Lisp_Object (*fn) (Lisp_Object arg)); static Lisp_Object @@ -2754,6 +2757,78 @@ else return local_info != 0 ? Qt : Qnil; } + +DEFUN ("custom-variable-p", Fcustom_variable_p, 1, 1, 0, /* +Return non-nil if SYMBOL names a custom variable. +Does not follow the variable alias chain. +*/ + (symbol)) +{ + return (!(NILP (Fget(symbol, intern ("standard-value"), Qnil))) + || !(NILP (Fget(symbol, intern ("custom-autoload"), Qnil)))) ? + Qt: Qnil; +} + +static Lisp_Object +user_variable_alias_check_fun (Lisp_Object symbol) +{ + Lisp_Object documentation = Fget (symbol, Qvariable_documentation, Qnil); + + if ((INTP (documentation) && XINT (documentation) < 0) || + (STRINGP (documentation) && + (string_byte (documentation, 0) == '*')) || + /* If (STRING . INTEGER), a negative integer means a user variable. */ + (CONSP (documentation) + && STRINGP (XCAR (documentation)) + && INTP (XCDR (documentation)) + && XINT (XCDR (documentation)) < 0) || + !NILP (Fcustom_variable_p (symbol))) + { + return make_int(1); + } + + return Qzero; +} + +DEFUN ("user-variable-p", Fuser_variable_p, 1, 1, 0, /* +Return t if SYMBOL names a variable intended to be set and modified by users. +\(The alternative is a variable used internally in a Lisp program.) +A symbol names a user variable if +\(1) the first character of its documentation is `*', or +\(2) it is customizable (`custom-variable-p' gives t), or +\(3) it names a variable alias that eventually resolves to another user variable. + +The GNU Emacs implementation of `user-variable-p' returns nil if there is a +loop in the chain of symbols. Since this is indistinguishable from the case +where a symbol names a non-user variable, XEmacs signals a +`cyclic-variable-indirection' error instead; use `condition-case' to catch +this error if you really want to avoid this. +*/ + (symbol)) +{ + Lisp_Object mapped; + + if (!SYMBOLP (symbol)) + { + return Qnil; + } + + /* Called for its side-effects, we want it to signal if there's a loop. */ + follow_varalias_pointers (symbol, Qt); + + /* Look through the various aliases. */ + mapped = map_varalias_chain (symbol, Qt, user_variable_alias_check_fun); + if (EQ (Qzero, mapped)) + { + return Qnil; + } + + assert (EQ (make_int (1), mapped)); + + return Qt; +} + + /* @@ -3136,20 +3211,98 @@ return hare; } -DEFUN ("defvaralias", Fdefvaralias, 2, 2, 0, /* +/* Map FN over the chain of variable aliases for SYMBOL. If FN returns + something other than Qzero for some link in the chain, return that + immediately. Otherwise return Qzero (which is not a symbol). + + FN may be called twice on the same symbol if the varalias chain is + cyclic. Prevent this by calling follow_varalias_pointers first for its + side-effects. + + Signals a cyclic-variable-indirection error if a cyclic structure is + detected. */ + +static Lisp_Object +map_varalias_chain (Lisp_Object symbol, + Lisp_Object follow_past_lisp_magic, + Lisp_Object (*fn) (Lisp_Object arg)) +{ +#define VARALIAS_INDIRECTION_SUSPICION_LENGTH 16 + Lisp_Object tortoise, hare, val, res; + int count; + + assert (fn); + + /* quick out just in case */ + if (!SYMBOL_VALUE_MAGIC_P (XSYMBOL (symbol)->value)) + { + return (fn)(symbol); + } + + /* Compare implementation of indirect_function(). */ + for (hare = tortoise = symbol, count = 0; + val = fetch_value_maybe_past_magic (hare, follow_past_lisp_magic), + SYMBOL_VALUE_VARALIAS_P (val); + hare = symbol_value_varalias_aliasee (XSYMBOL_VALUE_VARALIAS (val)), + count++) + { + res = (fn) (hare); + if (!EQ (Qzero, res)) + { + return res; + } + + if (count < VARALIAS_INDIRECTION_SUSPICION_LENGTH) continue; + + if (count & 1) + tortoise = symbol_value_varalias_aliasee + (XSYMBOL_VALUE_VARALIAS (fetch_value_maybe_past_magic + (tortoise, follow_past_lisp_magic))); + if (EQ (hare, tortoise)) + return Fsignal (Qcyclic_variable_indirection, list1 (symbol)); + } + + return (fn) (hare); +} + +/* + +OED entry, 2nd edition, IPA transliterated using Kirshenbaum: + +alias ('eIlI@s, '&lI@s), adv. and n. +[...] +B. n. (with pl. aliases.) +1. Another name, an assumed name. +1605 Camden Rem. (1614) 147 An Alias or double name cannot preiudice the honest. +1831 Edin. Rev. LIII. 364 He has been assuming various aliases. +1861 Macaulay Hist. Eng. V. 92 The monk who was sometimes called Harrison +and sometimes went by the alias of Johnson. + +The alias is the fake name. Let's try to follow that usage in our +documentation. + +*/ + +DEFUN ("defvaralias", Fdefvaralias, 2, 3, 0, /* Define a variable as an alias for another variable. Thenceforth, any operations performed on VARIABLE will actually be -performed on ALIAS. Both VARIABLE and ALIAS should be symbols. -If ALIAS is nil, remove any aliases for VARIABLE. -ALIAS can itself be aliased, and the chain of variable aliases +performed on ALIASED. Both VARIABLE and ALIASED should be symbols. +If ALIASED is nil and VARIABLE is an existing alias, remove that alias. +ALIASED can itself be an alias, and the chain of variable aliases will be followed appropriately. If VARIABLE already has a value, this value will be shadowed until the alias is removed, at which point it will be restored. Currently VARIABLE cannot be a built-in variable, a variable that has a buffer-local value in any buffer, or the symbols nil or t. -\(ALIAS, however, can be any type of variable.) +\(ALIASED, however, can be any type of variable.) + +Optional argument DOCSTRING is documentation for VARIABLE in its use as an +alias for ALIASED. The XEmacs help code ignores this documentation, using +the documentation of ALIASED instead, and the docstring, if specified, is +not shadowed in the same way that the value is. Only use it if you know +what you're doing. */ - (variable, alias)) + (variable, aliased, docstring)) { struct symbol_value_varalias *bfwd; Lisp_Object valcontents; @@ -3159,7 +3312,7 @@ valcontents = XSYMBOL (variable)->value; - if (NILP (alias)) + if (NILP (aliased)) { if (SYMBOL_VALUE_VARALIAS_P (valcontents)) { @@ -3170,11 +3323,15 @@ return Qnil; } - CHECK_SYMBOL (alias); + CHECK_SYMBOL (aliased); + + if (!NILP (docstring)) + Fput (variable, Qvariable_documentation, docstring); + if (SYMBOL_VALUE_VARALIAS_P (valcontents)) { /* transmogrify */ - XSYMBOL_VALUE_VARALIAS (valcontents)->aliasee = alias; + XSYMBOL_VALUE_VARALIAS (valcontents)->aliasee = aliased; return Qnil; } @@ -3186,7 +3343,7 @@ bfwd = ALLOC_LCRECORD_TYPE (struct symbol_value_varalias, &lrecord_symbol_value_varalias); bfwd->magic.type = SYMVAL_VARALIAS; - bfwd->aliasee = alias; + bfwd->aliasee = aliased; bfwd->shadowed = valcontents; valcontents = wrap_symbol_value_magic (bfwd); @@ -3195,8 +3352,8 @@ } DEFUN ("variable-alias", Fvariable_alias, 1, 2, 0, /* -If VARIABLE is aliased to another variable, return that variable. -VARIABLE should be a symbol. If VARIABLE is not aliased, return nil. +If VARIABLE is an alias of another variable, return that variable. +VARIABLE should be a symbol. If VARIABLE is not an alias, return nil. Variable aliases are created with `defvaralias'. See also `indirect-variable'. */ @@ -3755,6 +3912,8 @@ DEFSUBR (Fkill_local_variable); DEFSUBR (Fkill_console_local_variable); DEFSUBR (Flocal_variable_p); + DEFSUBR (Fcustom_variable_p); + DEFSUBR (Fuser_variable_p); DEFSUBR (Fdefvaralias); DEFSUBR (Fvariable_alias); DEFSUBR (Findirect_variable);
--- a/tests/ChangeLog Sat Oct 25 21:48:33 2008 +0900 +++ b/tests/ChangeLog Sat Oct 25 21:52:48 2008 +0900 @@ -1,3 +1,15 @@ +2008-08-27 Aidan Kehoe <kehoea@parhasard.net> + + * automated/regexp-tests.el: + Add a few basic #'skip-chars-forward, #'skip-chars-backward + tests. + +2008-08-10 Aidan Kehoe <kehoea@parhasard.net> + + * automated/mule-tests.el (featurep): Update the list of character + sets in etc/HELLO to reflect that we've deleted the + XEmacs-specific Arabic character sets. + 2008-05-21 Aidan Kehoe <kehoea@parhasard.net> * automated/mule-tests.el (featurep):
--- a/tests/automated/mule-tests.el Sat Oct 25 21:48:33 2008 +0900 +++ b/tests/automated/mule-tests.el Sat Oct 25 21:52:48 2008 +0900 @@ -527,20 +527,20 @@ ;; irrelevant. (sort (charsets-in-region (point-min) (point-max)) #'string<) - '(arabic-1-column arabic-2-column ascii chinese-big5-1 - chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 - hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 - katakana-jisx0201 korean-ksc5601 latin-iso8859-1 - latin-iso8859-2 thai-xtis vietnamese-viscii-lower))) + '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5 + ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208 + japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201 + korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis + vietnamese-viscii-lower))) (Assert (equal (sort (charsets-in-string (buffer-substring (point-min) (point-max))) #'string<) - '(arabic-1-column arabic-2-column ascii chinese-big5-1 - chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 - hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 - katakana-jisx0201 korean-ksc5601 latin-iso8859-1 - latin-iso8859-2 thai-xtis vietnamese-viscii-lower)))) + '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5 + ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208 + japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201 + korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis + vietnamese-viscii-lower)))) ;;--------------------------------------------------------------- ;; Language environments, and whether the specified values are sane.
--- a/tests/automated/regexp-tests.el Sat Oct 25 21:48:33 2008 +0900 +++ b/tests/automated/regexp-tests.el Sat Oct 25 21:52:48 2008 +0900 @@ -522,6 +522,22 @@ 2)) ))) +;; Not very comprehensive tests of skip-chars-forward, skip-chars-background: + +(with-string-as-buffer-contents + "-]-----------------------------][]]------------------------" + (skip-chars-forward (skip-chars-quote "-[]")) + (Assert (= (point) (point-max))) + (skip-chars-backward (skip-chars-quote "-[]")) + (Assert (= (point) (point-min))) + ;; Testing in passing for an old bug in #'skip-chars-forward where I + ;; thought it was impossible to call it with a string containing only ?- + ;; and ?]: + (Assert (= (skip-chars-forward (skip-chars-quote "-]")) + (position ?[ (buffer-string) :test #'=))) + ;; This used to error, incorrectly: + (Assert (skip-chars-quote "[-"))) + ;; replace-match (REPLACEMENT &optional FIXEDCASE LITERAL STRING STRBUFFER) ;; #### Write some tests! Much functionality is implicitly tested above