From: tomo Date: Wed, 15 Jul 2009 06:58:54 +0000 (+0000) Subject: XEmacs 21.4.22. X-Git-Tag: chise-base-0_25~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FXEmacs-21_4;p=chise%2Fxemacs-chise.git XEmacs 21.4.22. --- diff --git a/ChangeLog b/ChangeLog index 5c790dd..9c0e2b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2007-11-22 Vin Shelton + + * etc/photos/vin.png: + * etc/photos/vinm.png: Updated. + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/etc/photos/vin.png b/etc/photos/vin.png index 3d5fb27..7f7c7af 100644 Binary files a/etc/photos/vin.png and b/etc/photos/vin.png differ diff --git a/etc/photos/vinm.png b/etc/photos/vinm.png index 94587f5..787ce0a 100644 Binary files a/etc/photos/vinm.png and b/etc/photos/vinm.png differ diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f481972..60ba093 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,12 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2008-01-09 Vin Shelton + + * winclient.c: Create CONNECT_RETRIES and increase retry count + from 5 to 10. + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aaa3047..da37a63 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,33 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2008-12-30 Vin Shelton + + * easy-mmode.el: Added easy-mmode.el so autoload.el will work + during building even if no packages are found. + +2008-05-13 Aidan Kehoe + + * 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. + +2008-12-24 Vin Shelton + + * about.el: Add Francisco to my bio! + +2008-12-23 Vin Shelton + + * autoload.el: Move operator definitions to autoload-operators.el + in the xemacs-base package. + +2007-11-22 Vin Shelton + + * about.el (about-hacker-contribution): Updated my bio. + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/lisp/about.el b/lisp/about.el index ef91a55..bee1b8e 100644 --- a/lisp/about.el +++ b/lisp/about.el @@ -1391,12 +1391,12 @@ Stephen lives with his Japanese wife and children in Tsukuba, Japan, where he is a professor of economics at the University of Tsukuba.\n")) (vin (widget-insert "\ -I'm a software engineer and manager for Teradyne in Boston. I used -to play a lot of Ultimate - see ") +I'm a software engineer and manager for Adaptive Optics Associates +in Cambridge, Massachusetts. I used to play a lot of Ultimate (see\n") (about-url-link 'vin nil "Visit the Ultimate Players Association homepage") - (widget-insert " for more details. -Nowadays I'm a family man, so I spend a lot of time with my wife, -Becky, and my son, Noah.\n")) + (widget-insert " for more details), but I don't have time to +play much any more. Nowadays I'm a family man, so I spend most of +my time with my wife, Becky, and our sons, Noah and Francisco.\n")) (vladimir (widget-insert "\ Former technical lead for XEmacs at Sun. He is now writing a book on diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index 835ba1f..d780b34 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -963,25 +963,92 @@ Find packages matching a given keyword." t nil) ;;;*** -;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el") - -(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock) - -(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - -(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock) - -(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - -(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock) - -(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock) +;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode font-lock-mode font-lock-fontify-string-delimiters font-lock-maximum-size font-lock-maximum-decoration font-lock-use-fonts font-lock-use-colors font-lock-mode-disable-list font-lock-mode-enable-list font-lock-auto-fontify) "font-lock" "lisp/font-lock.el") + +(defvar font-lock-auto-fontify t "\ +*Whether font-lock should automatically fontify files as they're loaded. +This will only happen if font-lock has fontifying keywords for the major +mode of the file. You can get finer-grained control over auto-fontification +by using this variable in combination with `font-lock-mode-enable-list' or +`font-lock-mode-disable-list'.") + +(defvar font-lock-mode-enable-list nil "\ +*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil.") + +(defvar font-lock-mode-disable-list nil "\ +*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t.") + +(defvar font-lock-use-colors '(color) "\ +*Specification for when Font Lock will set up color defaults. +Normally this should be '(color), meaning that Font Lock will set up +color defaults that are only used on color displays. Set this to nil +if you don't want Font Lock to set up color defaults at all. This +should be one of + +-- a list of valid tags, meaning that the color defaults will be used + when all of the tags apply. (e.g. '(color x)) +-- a list whose first element is 'or and whose remaining elements are + lists of valid tags, meaning that the defaults will be used when + any of the tag lists apply. +-- nil, meaning that the defaults should not be set up at all. + +\(If you specify face values in your init file, they will override any +that Font Lock specifies, regardless of whether you specify the face +values before or after loading Font Lock.) + +See also `font-lock-use-fonts'. If you want more control over the faces +used for fontification, see the documentation of `font-lock-mode' for +how to do it.") + +(defvar font-lock-use-fonts '(or (mono) (grayscale)) "\ +*Specification for when Font Lock will set up non-color defaults. + +Normally this should be '(or (mono) (grayscale)), meaning that Font +Lock will set up non-color defaults that are only used on either mono +or grayscale displays. Set this to nil if you don't want Font Lock to +set up non-color defaults at all. This should be one of + +-- a list of valid tags, meaning that the non-color defaults will be used + when all of the tags apply. (e.g. '(grayscale x)) +-- a list whose first element is 'or and whose remaining elements are + lists of valid tags, meaning that the defaults will be used when + any of the tag lists apply. +-- nil, meaning that the defaults should not be set up at all. + +\(If you specify face values in your init file, they will override any +that Font Lock specifies, regardless of whether you specify the face +values before or after loading Font Lock.) + +See also `font-lock-use-colors'. If you want more control over the faces +used for fontification, see the documentation of `font-lock-mode' for +how to do it.") + +(defvar font-lock-maximum-decoration t "\ +*If non-nil, the maximum decoration level for fontifying. +If nil, use the minimum decoration (equivalent to level 0). +If t, use the maximum decoration available. +If a number, use that level of decoration (or if not available the maximum). +If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL), +where MAJOR-MODE is a symbol or t (meaning the default). For example: + ((c++-mode . 2) (c-mode . t) (t . 1)) +means use level 2 decoration for buffers in `c++-mode', the maximum decoration +available for buffers in `c-mode', and level 1 decoration otherwise.") (define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration) -(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock) +(defvar font-lock-maximum-size (* 250 1024) "\ +*If non-nil, the maximum size for buffers for fontifying. +Only buffers less than this can be fontified when Font Lock mode is turned on. +If nil, means size is irrelevant. +If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), +where MAJOR-MODE is a symbol or t (meaning the default). For example: + ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576)) +means that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one +megabyte for buffers in `rmail-mode', and size is irrelevant otherwise.") -(defcustom font-lock-fontify-string-delimiters nil "*If non-nil, apply font-lock-string-face to string delimiters as well as\nstring text when fontifying." :type 'boolean :group 'font-lock) +(defvar font-lock-fontify-string-delimiters nil "\ +*If non-nil, apply font-lock-string-face to string delimiters as well as +string text when fontifying.") (defvar font-lock-keywords nil "\ A list defining the keywords for `font-lock-mode' to highlight. @@ -1141,7 +1208,7 @@ This is normally set via `font-lock-defaults'.") (make-variable-buffer-local 'font-lock-syntactic-keywords) -(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0))))) +(progn (defvar font-lock-mode nil "Non nil means `font-lock-mode' is on") (custom-add-to-group 'font-lock 'font-lock-mode 'custom-variable) (custom-add-load 'font-lock-mode 'font-lock)) (defvar font-lock-mode-hook nil "\ Function or functions to run on entry to font-lock-mode.") @@ -1200,11 +1267,14 @@ This can take a while for large buffers." t nil) ;;;*** -;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el") +;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus font-menu-this-frame-only-p font-menu-ignore-scaled-fonts) "font-menu" "lisp/font-menu.el") -(defcustom font-menu-ignore-scaled-fonts nil "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'font-menu) +(defvar font-menu-ignore-scaled-fonts nil "\ +*If non-nil, then the font menu will try to show only bitmap fonts.") -(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'font-menu) +(defvar font-menu-this-frame-only-p nil "\ +*If non-nil, then changing the default font from the font menu will only +affect one frame instead of all frames.") (fset 'install-font-menus 'reset-device-font-menus) @@ -1245,11 +1315,18 @@ Return a font descriptor object for FONTNAME, appropriate for DEVICE." nil nil) ;;;*** -;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el") +;;;### (autoloads (gnuserv-start gnuserv-running-p gnuserv-frame gnuserv-mode-line-string) "gnuserv" "lisp/gnuserv.el") -(defcustom gnuserv-mode-line-string " Server" "*String to display in the modeline when Gnuserv is active.\nSet this to nil if you don't want a modeline indicator." :type '(choice string (const :tag "none" nil)) :group 'gnuserv) +(defvar gnuserv-mode-line-string " Server" "\ +*String to display in the modeline when Gnuserv is active. +Set this to nil if you don't want a modeline indicator.") -(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames) +(defvar gnuserv-frame nil "\ +*The frame to be used to display all edited files. +If nil, then a new frame is created for each file edited. +If t, then the currently selected frame will be used. +If a function, then this will be called with a symbol `x' or `tty' as the +only argument, and its return value will be interpreted as above.") (autoload 'gnuserv-running-p "gnuserv" "\ Return non-nil if a gnuserv process is running from this XEmacs session." nil nil) @@ -1264,7 +1341,7 @@ Prefix arg means just kill any existing server communications subprocess." t nil ;;;*** -;;;### (autoloads (gtk-reset-device-font-menus) "gtk-font-menu" "lisp/gtk-font-menu.el") +;;;### (autoloads (gtk-font-menu-font-data gtk-reset-device-font-menus) "gtk-font-menu" "lisp/gtk-font-menu.el") (autoload 'gtk-reset-device-font-menus "gtk-font-menu" "\ Generates the `Font', `Size', and `Weight' submenus for the Options menu. @@ -1274,13 +1351,18 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(defun* gtk-font-menu-font-data (face dcache) (defvar gtk-font-regexp) (defvar gtk-font-regexp-foundry-and-family) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match gtk-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match gtk-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from gtk-font-menu-font-data (make-vector 5 nil))) (when (string-match gtk-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match gtk-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) +(autoload 'gtk-font-menu-font-data "gtk-font-menu" nil nil nil) ;;;*** -;;;### (autoloads nil "help-macro" "lisp/help-macro.el") +;;;### (autoloads (three-step-help) "help-macro" "lisp/help-macro.el") -(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance) +(defvar three-step-help t "\ +*Non-nil means give more info about Help command in three steps. +The three steps are simple prompt, prompt with all options, +and window listing and describing the options. +A value of nil means skip the middle step, so that +\\[help-command] \\[help-command] gives the window that lists the options.") ;;;*** @@ -1426,7 +1508,7 @@ This command is designed to be used whether you are already in Info or not." t n ;;;*** -;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el") +;;;### (autoloads (mswindows-font-menu-font-data mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el") (autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\ Generates the `Font', `Size', and `Weight' submenus for the Options menu. @@ -1436,7 +1518,7 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(defun* mswindows-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match mswindows-font-regexp name) (setq family (match-string 1 name)) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match mswindows-font-regexp truename)) (setq family (match-string 1 truename)) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from mswindows-font-menu-font-data (make-vector 5 nil))) (when (string-match mswindows-font-regexp name) (setq weight (match-string 2 name)) (setq size (string-to-int (or (match-string 4 name) "0")))) (when (string-match mswindows-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (match-string 2 truename))) (when (not (member size (aref entry 2))) (setq size (string-to-int (or (match-string 4 truename) "0")))) (setq slant (match-string 5 truename))) (vector entry family size weight slant))) +(autoload 'mswindows-font-menu-font-data "msw-font-menu" nil nil nil) ;;;*** @@ -1454,7 +1536,7 @@ Install a pre-bytecompiled XEmacs package into package hierarchy." t nil) ;;;*** -;;;### (autoloads (package-get-package-provider package-get package-get-list-packages-where package-get-info package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base) "package-get" "lisp/package-get.el") +;;;### (autoloads (package-get-package-provider package-get package-get-list-packages-where package-get-info package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-site-release-download-sites package-get-pre-release-download-sites package-get-download-sites package-get-install-to-user-init-directory package-get-package-index-file-location) "package-get" "lisp/package-get.el") (defvar package-get-base nil "\ List of packages that are installed at this site. @@ -1502,15 +1584,38 @@ recent to least recent -- in other words, the version names don't have to be lexically ordered. It is debatable if it makes sense to have more than one version of a package available.") -(defcustom package-get-package-index-file-location (car (split-path (or (getenv "EMACSPACKAGEPATH") user-init-directory))) "*The directory where the package-index file can be found." :type 'directory :group 'package-get) - -(defcustom package-get-install-to-user-init-directory nil "*If non-nil install packages under `user-init-directory'." :type 'boolean :group 'package-get) - -(defcustom package-get-download-sites '(("US (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/packages") ("Argentina (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/packages") ("Australia (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ("Australia (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/packages") ("Austria (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/packages") ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("Canada (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") ("Greece (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/packages") ("Hong Kong (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("Ireland (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") ("Portugal (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/packages") ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") ("Taiwan (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") ("US (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/packages") ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) - -(defcustom package-get-pre-release-download-sites '(("US Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Argentina Pre-Releases (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/beta/experimental/packages") ("Australia Pre-Releases (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/beta/experimental/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/beta/experimental/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") ("Canada Pre-Releases (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/beta/experimental/packages") ("France Pre-Releases (mirror.cict.fr)" "mirror.cict.fr" "xemacs/beta/experimental/packages") ("France Pre-Releases (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") ("Greece Pre-Releases (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/beta/experimental/packages") ("Hong Kong Pre-Releases (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/beta/experimental/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/beta/experimental/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/beta/experimental/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Portugal Pre-Releases (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/beta/experimental/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/beta/experimental/packages") ("Taiwan Pre-Releases (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/beta/experimental/packages") ("UK Pre-Releases (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/beta/experimental/packages")) "*List of remote sites available for downloading \"Pre-Release\" packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Pre-Release Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) - -(defcustom package-get-site-release-download-sites nil "*List of remote sites available for downloading \"Site Release\" packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Site Release Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) +(defvar package-get-package-index-file-location (car (split-path (or (getenv "EMACSPACKAGEPATH") user-init-directory))) "\ +*The directory where the package-index file can be found.") + +(defvar package-get-install-to-user-init-directory nil "\ +*If non-nil install packages under `user-init-directory'.") + +(defvar package-get-download-sites '(("US (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/packages") ("Argentina (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/packages") ("Australia (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/packages") ("Australia (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/packages") ("Austria (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/packages") ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("Canada (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") ("Greece (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/packages") ("Hong Kong (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("Ireland (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") ("Portugal (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/packages") ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") ("Taiwan (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") ("US (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/packages") ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/packages")) "\ +*List of remote sites available for downloading packages. +List format is '(site-description site-name directory-on-site). +SITE-DESCRIPTION is a textual description of the site. SITE-NAME +is the internet address of the download site. DIRECTORY-ON-SITE +is the directory on the site in which packages may be found. +This variable is used to initialize `package-get-remote', the +variable actually used to specify package download sites.") + +(defvar package-get-pre-release-download-sites '(("US Pre-Releases (Main XEmacs Site)" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Argentina Pre-Releases (xmundo.net)" "xemacs.xmundo.net" "pub/mirrors/xemacs/beta/experimental/packages") ("Australia Pre-Releases (aarnet.edu.au)" "mirror.aarnet.edu.au" "pub/xemacs/beta/experimental/packages") ("Australia Pre-Releases (au.xemacs.org)" "ftp.au.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/beta/experimental/packages") ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/beta/experimental/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") ("Canada Pre-Releases (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/beta/experimental/packages") ("France Pre-Releases (mirror.cict.fr)" "mirror.cict.fr" "xemacs/beta/experimental/packages") ("France Pre-Releases (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") ("Greece Pre-Releases (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/beta/experimental/packages") ("Hong Kong Pre-Releases (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/beta/experimental/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/beta/experimental/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/beta/experimental/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") ("Portugal Pre-Releases (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/beta/experimental/packages") ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/beta/experimental/packages") ("Taiwan Pre-Releases (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/beta/experimental/packages") ("UK Pre-Releases (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/beta/experimental/packages")) "\ +*List of remote sites available for downloading \"Pre-Release\" packages. +List format is '(site-description site-name directory-on-site). +SITE-DESCRIPTION is a textual description of the site. SITE-NAME +is the internet address of the download site. DIRECTORY-ON-SITE +is the directory on the site in which packages may be found. +This variable is used to initialize `package-get-remote', the +variable actually used to specify package download sites.") + +(defvar package-get-site-release-download-sites nil "\ +*List of remote sites available for downloading \"Site Release\" packages. +List format is '(site-description site-name directory-on-site). +SITE-DESCRIPTION is a textual description of the site. SITE-NAME +is the internet address of the download site. DIRECTORY-ON-SITE +is the directory on the site in which packages may be found. +This variable is used to initialize `package-get-remote', the +variable actually used to specify package download sites.") (autoload 'package-get-require-base "package-get" "\ Require that a package-get database has been loaded. @@ -2037,7 +2142,7 @@ Delete WIDGET." nil nil) ;;;*** -;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") +;;;### (autoloads (x-font-menu-font-data x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el") (autoload 'x-reset-device-font-menus "x-font-menu" "\ Generates the `Font', `Size', and `Weight' submenus for the Options menu. @@ -2047,7 +2152,7 @@ If you don't like the lazy invocation of this function, you can add it to when they are selected for the first time. If you add fonts to your system, or if you change your font path, you can call this to re-initialize the menus." nil nil) -(defun* x-font-menu-font-data (face dcache) (defvar x-font-regexp) (defvar x-font-regexp-foundry-and-family) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant))) +(autoload 'x-font-menu-font-data "x-font-menu" nil nil nil) ;;;*** diff --git a/lisp/autoload.el b/lisp/autoload.el index 8ca8bbc..aa5d530 100644 --- a/lisp/autoload.el +++ b/lisp/autoload.el @@ -39,33 +39,100 @@ ;;; Code: +;; Need to load easy-mmode because we expand macro calls to easy-mmode +;; macros in make-autoloads below. +(require 'easy-mmode) + +; Add operator definitions to autoload-operators.el in the xemacs-base +; package. +(eval-when-compile (load "cl-macs")) +(ignore-errors (require 'autoload-operators)) + +; As autoload-operators is new, provide stopgap measure for a while. +(if (not (boundp 'autoload-make-autoload-operators)) + (progn + (defvar autoload-make-autoload-operators + '(defun define-skeleton defmacro define-derived-mode define-generic-mode + easy-mmode-define-minor-mode easy-mmode-define-global-mode + define-minor-mode defun* defmacro*) + "`defun'-like operators that use `autoload' to load the library.") + + (defvar autoload-make-autoload-complex-operators + '(easy-mmode-define-minor-mode easy-mmode-define-global-mode + define-minor-mode) + "`defun'-like operators to macroexpand before using `autoload'.") + + (put 'autoload 'doc-string-elt 3) + (put 'defun 'doc-string-elt 3) + (put 'defun* 'doc-string-elt 3) + (put 'defvar 'doc-string-elt 3) + (put 'defcustom 'doc-string-elt 3) + (put 'defconst 'doc-string-elt 3) + (put 'defmacro 'doc-string-elt 3) + (put 'defmacro* 'doc-string-elt 3) + (put 'defsubst 'doc-string-elt 3) + (put 'define-skeleton 'doc-string-elt 2) + (put 'define-derived-mode 'doc-string-elt 4) + (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) + (put 'define-minor-mode 'doc-string-elt 2) + (put 'define-generic-mode 'doc-string-elt 7) + ;; defin-global-mode has no explicit docstring. + (put 'easy-mmode-define-global-mode 'doc-string-elt 1000))) + (defun make-autoload (form file) - "Turn a definition generator FORM into an autoload for source file FILE. -Returns nil if FORM is not a defun, define-skeleton, define-derived-mode, -or defmacro." - (let ((car (car-safe form))) - (if (memq car '(defun define-skeleton defmacro define-derived-mode)) - (let ((macrop (eq car 'defmacro)) - name doc) - (setq form (cdr form) - name (car form) - ;; Ignore the arguments. - form (cdr (cond ((eq car 'define-skeleton) - form) - ((eq car 'define-derived-mode) - (cddr form)) - (t - (cdr form)))) - doc (car form)) - (if (stringp doc) - (setq form (cdr form)) - (setq doc nil)) - (list 'autoload (list 'quote name) file doc - (or (eq car 'define-skeleton) - (eq car 'define-derived-mode) - (eq (car-safe (car form)) 'interactive)) - (if macrop (list 'quote 'macro) nil))) - nil))) + "Turn FORM into an autoload or defvar for source file FILE. +Returns nil if FORM is not a special autoload form (i.e. a function definition +or macro definition or a defcustom)." + (let ((car (car-safe form)) expand) + (cond + ;; For complex cases, try again on the macro-expansion. + ((and (memq car autoload-make-autoload-complex-operators) + (setq expand (let ((load-file-name file)) (macroexpand form))) + (eq (car expand) 'progn) + (memq :autoload-end expand)) + (let ((end (memq :autoload-end expand))) + ;; Cut-off anything after the :autoload-end marker. + (setcdr end nil) + (cons 'progn + (mapcar (lambda (form) (make-autoload form file)) + (cdr expand))))) + + ;; For special function-like operators, use the `autoload' function. + ((memq car autoload-make-autoload-operators) + (let* ((macrop (memq car '(defmacro defmacro*))) + (name (nth 1 form)) + (body (nthcdr (get car 'doc-string-elt) form)) + (doc (if (stringp (car body)) (pop body)))) + ;; `define-generic-mode' quotes the name, so take care of that + (list 'autoload (if (listp name) name (list 'quote name)) file doc + (or (and (memq car '(define-skeleton define-derived-mode + define-generic-mode + easy-mmode-define-global-mode + easy-mmode-define-minor-mode + define-minor-mode)) t) + (eq (car-safe (car body)) 'interactive)) + (if macrop (list 'quote 'macro) nil)))) + + ;; Convert defcustom to a simpler (and less space-consuming) defvar, + ;; but add some extra stuff if it uses :require. + ((eq car 'defcustom) + (let ((varname (car-safe (cdr-safe form))) + (init (car-safe (cdr-safe (cdr-safe form)))) + (doc (car-safe (cdr-safe (cdr-safe (cdr-safe form))))) + (rest (cdr-safe (cdr-safe (cdr-safe (cdr-safe form)))))) + (if (not (plist-get rest :require)) + `(defvar ,varname ,init ,doc) + `(progn + (defvar ,varname ,init ,doc) + (custom-add-to-group ,(plist-get rest :group) + ',varname 'custom-variable) + (custom-add-load ',varname + ,(plist-get rest :require)))))) + ;; Coding systems. #### Would be nice to handle the docstring here too. + ((memq car '(make-coding-system make-8-bit-coding-system)) + `(autoload-coding-system ,(nth 1 form) '(load ,file))) + ;; nil here indicates that this is not a special autoload form. + (t nil)))) (defvar generate-autoload-cookie ";;;###autoload" "Magic comment indicating the following form should be autoloaded. @@ -92,32 +159,6 @@ the section of autoloads for a file.") (defvar autoload-package-name nil) -;;; Forms which have doc-strings which should be printed specially. -;;; A doc-string-elt property of ELT says that (nth ELT FORM) is -;;; the doc-string in FORM. -;;; -;;; There used to be the following note here: -;;; ;;; Note: defconst and defvar should NOT be marked in this way. -;;; ;;; We don't want to produce defconsts and defvars that -;;; ;;; make-docfile can grok, because then it would grok them twice, -;;; ;;; once in foo.el (where they are given with ;;;###autoload) and -;;; ;;; once in loaddefs.el. -;;; -;;; Counter-note: Yes, they should be marked in this way. -;;; make-docfile only processes those files that are loaded into the -;;; dumped Emacs, and those files should never have anything -;;; autoloaded here. The above-feared problem only occurs with files -;;; which have autoloaded entries *and* are processed by make-docfile; -;;; there should be no such files. - -(put 'autoload 'doc-string-elt 3) -(put 'defun 'doc-string-elt 3) -(put 'defvar 'doc-string-elt 3) -(put 'defconst 'doc-string-elt 3) -(put 'defmacro 'doc-string-elt 3) -(put 'define-skeleton 'doc-string-elt 3) -(put 'define-derived-mode 'doc-string-elt 4) - (defun autoload-trim-file-name (file) "Returns a relative pathname of FILE including the last directory." (setq file (expand-file-name file)) diff --git a/lisp/easy-mmode.el b/lisp/easy-mmode.el new file mode 100644 index 0000000..0518cf5 --- /dev/null +++ b/lisp/easy-mmode.el @@ -0,0 +1,601 @@ +;;; easy-mmode.el --- easy definition for major and minor modes + +;; Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. + +;; Author: Georges Brun-Cottan +;; Maintainer: Stefan Monnier + +;; Keywords: extensions lisp + +;; 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: GNU Emacs 21.3. + +;;; Commentary: + +;; Minor modes are useful and common. This package makes defining a +;; minor mode easy, by focusing on the writing of the minor mode +;; functionalities themselves. Moreover, this package enforces a +;; conventional naming of user interface primitives, making things +;; natural for the minor-mode end-users. + +;; For each mode, easy-mmode defines the following: +;; : The minor mode predicate. A buffer-local variable. +;; -map : The keymap possibly associated to . +;; -hook,-on-hook,-off-hook and -mode: +;; see `define-minor-mode' documentation +;; +;; eval +;; (pp (macroexpand '(define-minor-mode ))) +;; to check the result before using it. + +;; The order in which minor modes are installed is important. Keymap +;; lookup proceeds down minor-mode-map-alist, and the order there +;; tends to be the reverse of the order in which the modes were +;; installed. Perhaps there should be a feature to let you specify +;; orderings. + +;; Additionally to `define-minor-mode', the package provides convenient +;; ways to define keymaps, and other helper functions for major and minor +;; modes. + +;;; Code: + +(eval-when-compile (require 'cl)) + +;;; This file uses two functions that did not exist in some versions of +;;; XEmacs: propertize and replace-regexp-in-string. We provide these +;;; functions here for such XEmacsen. +;;; +;;; FIXME: These function definitions should go into the future or +;;; forward-compat package, once that package exists. + +;; XEmacs <= 21.4 does not have propertize, but XEmacs >= 21.5 dumps it (it is +;; defined in subr.el). Therefore, it is either defined regardless of what +;; has been loaded already, or it won't be defined regardless of what is +;; loaded. +(if (not (fboundp 'propertize)) + (defun propertize (string &rest properties) + "Return a copy of STRING with text properties added. +First argument is the string to copy. +Remaining arguments form a sequence of PROPERTY VALUE pairs for text +properties to add to the result." + (let ((str (copy-sequence string))) + (add-text-properties 0 (length str) + properties + str) + str))) + +;; XEmacs <= 21.4 does not have replace-regexp-in-string, but XEmacs >= 21.5 +;; dumps it (it is defined in subr.el). Therefore, it is either defined +;; regardless of what has been loaded already, or it won't be defined +;; regardless of what is loaded. +(if (not (fboundp 'replace-regexp-in-string)) + (defun replace-regexp-in-string (regexp rep string &optional + fixedcase literal subexp start) + "Replace all matches for REGEXP with REP in STRING. + +Return a new string containing the replacements. + +Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the +arguments with the same names of function `replace-match'. If START +is non-nil, start replacements at that index in STRING. + +REP is either a string used as the NEWTEXT arg of `replace-match' or a +function. If it is a function it is applied to each match to generate +the replacement passed to `replace-match'; the match-data at this +point are such that match 0 is the function's argument. + +To replace only the first match (if any), make REGEXP match up to \\' +and replace a sub-expression, e.g. + (replace-regexp-in-string \"\\(foo\\).*\\'\" \"bar\" \" foo foo\" nil nil 1) + => \" bar foo\" +" + (let ((l (length string)) + (start (or start 0)) + matches str mb me) + (save-match-data + (while (and (< start l) (string-match regexp string start)) + (setq mb (match-beginning 0) + me (match-end 0)) + ;; If we matched the empty string, make sure we advance by one char + (when (= me mb) (setq me (min l (1+ mb)))) + ;; Generate a replacement for the matched substring. + ;; Operate only on the substring to minimize string consing. + ;; Set up match data for the substring for replacement; + ;; presumably this is likely to be faster than munging the + ;; match data directly in Lisp. + (string-match regexp (setq str (substring string mb me))) + (setq matches + (cons (replace-match (if (stringp rep) + rep + (funcall rep (match-string 0 str))) + fixedcase literal str subexp) + (cons (substring string start mb) ; unmatched prefix + matches))) + (setq start me)) + ;; Reconstruct a string from the pieces. + (setq matches (cons (substring string start l) matches)) ; leftover + (apply #'concat (nreverse matches)))))) + + +(defun easy-mmode-pretty-mode-name (mode &optional lighter) + "Turn the symbol MODE into a string intended for the user. +If provided LIGHTER will be used to help choose capitalization." + (let* ((case-fold-search t) + (name (concat (replace-regexp-in-string + "-Minor" " minor" + (capitalize (replace-regexp-in-string + "-mode\\'" "" (symbol-name mode)))) + " mode"))) + (if (not (stringp lighter)) name + (setq lighter + (replace-regexp-in-string "\\`\\s-+\\|\\-s+\\'" "" lighter)) + (replace-regexp-in-string lighter lighter name t t)))) + +;; XEmacs change: add -on-hook, -off-hook, and macro parameter documentation. +;;;###no-autoload +(defalias 'easy-mmode-define-minor-mode 'define-minor-mode) +;;;###no-autoload +(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body) + "Define a new minor mode MODE. +This function defines the associated control variable MODE, keymap MODE-map, +toggle command MODE, and hook MODE-hook. + +DOC is the documentation for the mode toggle command. +Optional INIT-VALUE is the initial value of the mode's variable. +Optional LIGHTER is displayed in the modeline when the mode is on. +Optional KEYMAP is the default (defvar) keymap bound to the mode keymap. + If it is a list, it is passed to `easy-mmode-define-keymap' + in order to build a valid keymap. It's generally better to use + a separate MODE-map variable than to use this argument. +The above three arguments can be skipped if keyword arguments are +used (see below). + +BODY contains code that will be executed each time the mode is (de)activated. + It will be executed after any toggling but before running the hooks. + Before the actual body code, you can write + keyword arguments (alternating keywords and values). + These following keyword arguments are supported: +:group GROUP Custom group name to use in all generated `defcustom' forms. +:global GLOBAL If non-nil specifies that the minor mode is not meant to be + buffer-local, so don't make the variable MODE buffer-local. + By default, the mode is buffer-local. +:init-value VAL Same as the INIT-VALUE argument. +:lighter SPEC Same as the LIGHTER argument. +:require SYM Same as in `defcustom'. + +For backwards compatibility, these hooks are run each time the mode is +\(de)activated. When the mode is toggled, MODE-hook is always run before the +other hook. +MODE-hook: run if the mode is toggled. +MODE-on-hook: run if the mode is activated. +MODE-off-hook: run if the mode is deactivated. + +\(defmacro easy-mmode-define-minor-mode + (MODE DOC &optional INIT-VALUE LIGHTER KEYMAP &rest BODY)...\) + +For example, you could write + (define-minor-mode foo-mode \"If enabled, foo on you!\" + nil \"Foo \" foo-keymap + :require 'foo :global t :group 'inconvenience + ...BODY CODE...)" + + ;; Allow skipping the first three args. + (cond + ((keywordp init-value) + (setq body (list* init-value lighter keymap body) + init-value nil lighter nil keymap nil)) + ((keywordp lighter) + (setq body (list* lighter keymap body) lighter nil keymap nil)) + ((keywordp keymap) (push keymap body) (setq keymap nil))) + + (let* ((mode-name (symbol-name mode)) + (pretty-name (easy-mmode-pretty-mode-name mode lighter)) + (globalp nil) + (group nil) + (extra-args nil) + (require t) + (keymap-sym (if (and keymap (symbolp keymap)) keymap + (intern (concat mode-name "-map")))) + (hook (intern (concat mode-name "-hook"))) + (hook-on (intern (concat mode-name "-on-hook"))) + (hook-off (intern (concat mode-name "-off-hook")))) + + ;; Check keys. + (while (keywordp (car body)) + (case (pop body) + (:init-value (setq init-value (pop body))) + (:lighter (setq lighter (pop body))) + (:global (setq globalp (pop body))) + (:extra-args (setq extra-args (pop body))) + (:group (setq group (nconc group (list :group (pop body))))) + (:require (setq require (pop body))) + (t (pop body)))) + + (unless group + ;; We might as well provide a best-guess default group. + (setq group + `(:group ',(or (custom-current-group) + (intern (replace-regexp-in-string + "-mode\\'" "" mode-name)))))) + ;; Add default properties to LIGHTER. +;; #### FSF comments this out in 21.3. +; (unless (or (not (stringp lighter)) +; (get-text-property 0 'local-map lighter) +; (get-text-property 0 'keymap lighter)) +; (setq lighter +; (propertize lighter +; 'local-map modeline-minor-mode-map ; XEmacs change +; 'help-echo "mouse-3: minor mode menu"))) + + `(progn + ;; Define the variable to enable or disable the mode. + ,(if (not globalp) + `(progn + (defvar ,mode ,init-value ,(format "Non-nil if %s is enabled. +Use the command `%s' to change this variable." pretty-name mode)) + (make-variable-buffer-local ',mode)) + + (let ((curfile (or (and (boundp 'byte-compile-current-file) + byte-compile-current-file) + load-file-name))) + `(defcustom ,mode ,init-value + ,(format "Non-nil if %s is enabled. +See the command `%s' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `%s'." + pretty-name mode mode) + :set (lambda (symbol value) (funcall symbol (or value 0))) + :initialize 'custom-initialize-default + ,@group + :type 'boolean + ,@(cond + ((not (and curfile require)) nil) + ((not (eq require t)) `(:require ,require)) + (t `(:require + ',(intern (file-name-nondirectory + (file-name-sans-extension curfile))))))))) + + ;; The actual function. + (defun ,mode (&optional arg ,@extra-args) + ,(or doc + (format (concat "Toggle %s on or off. +Interactively, with no prefix argument, toggle the mode. +With universal prefix ARG turn mode on. +With zero or negative ARG turn mode off. +\\{%s}") pretty-name keymap-sym)) + ;; Use `toggle' rather than (if ,mode 0 1) so that using + ;; repeat-command still does the toggling correctly. + (interactive (list (or current-prefix-arg 'toggle))) + ;; XEmacs addition: save the old mode + (let ((old-mode ,mode)) + (setq ,mode + (cond + ((eq arg 'toggle) (not ,mode)) + (arg (or (listp arg);; XEmacs addition: C-u alone + (> (prefix-numeric-value arg) 0))) + (t + (if (null ,mode) t + (message + "Toggling %s off; better pass an explicit argument." + ',mode) + nil)))) + ,@body + ;; The on/off hooks are here for backward compatibility only. + ;; The on/off hooks are here for backward compatibility only. + ;; XEmacs change: check mode before running hooks + (and ,hook + (not (equal old-mode ,mode)) + (run-hooks ',hook)) + (and ,hook-on + ,mode + (run-hooks ',hook-on)) + (and ,hook-off + (not ,mode) + (run-hooks ',hook-off))) + (if (interactive-p) + (progn + ,(if globalp `(customize-mark-as-set ',mode)) + (message ,(format "%s %%sabled" pretty-name) + (if ,mode "en" "dis")))) + (force-mode-line-update) + ;; Return the new setting. + ,mode) + + ;; Autoloading an easy-mmode-define-minor-mode autoloads + ;; everything up-to-here. + ;; + ;; XEmacs change: XEmacs does not support :autoload-end. On the other + ;; hand, I don't see why we need to support it. An autoload cookie + ;; just before a (define-minor-mode foo) form will generate an autoload + ;; form for the file with name foo. But that's exactly right, since + ;; the defun created just above here has the name foo. There are no + ;; other top-level forms created above here by the macro, so we're done. + ;; + ;;:autoload-end + + ;; The toggle's hook. + (defcustom ,hook nil + ,(format "Hook run at the end of function `%s'." mode-name) + ,@group + :type 'hook) + + ;; XEmacs addition: declare the on and off hooks also + (defcustom ,hook-on nil + ,(format "Hook to run when entering %s." mode-name) + :group ,(cadr group) + :type 'hook) + + (defcustom ,hook-off nil + ,(format "Hook to run when exiting %s." mode-name) + :group ,(cadr group) + :type 'hook) + + ;; Define the minor-mode keymap. + ,(unless (symbolp keymap) ;nil is also a symbol. + `(defvar ,keymap-sym + (let ((m ,keymap)) + (cond ((keymapp m) m) + ((listp m) (easy-mmode-define-keymap m)) + (t (error "Invalid keymap %S" ,keymap)))) + ,(format "Keymap for `%s'." mode-name))) + + (add-minor-mode ',mode ',lighter + ,(if keymap keymap-sym + `(if (boundp ',keymap-sym) + (symbol-value ',keymap-sym))) + ;; XEmacs change: supply the AFTER and TOGGLE-FUN args + t ',mode) + + ;; If the mode is global, call the function according to the default. + ,(if globalp + `(if (and load-file-name (not (equal ,init-value ,mode)) + ;; XEmacs addition: + (not purify-flag)) + (eval-after-load load-file-name '(,mode (if ,mode 1 -1)))))))) + +;;; +;;; make global minor mode +;;; + +;;;###no-autoload +(defmacro easy-mmode-define-global-mode (global-mode mode turn-on + &rest keys) + "Make GLOBAL-MODE out of the buffer-local minor MODE. +TURN-ON is a function that will be called with no args in every buffer + and that should try to turn MODE on if applicable for that buffer. +KEYS is a list of CL-style keyword arguments: +:group to specify the custom group." + (let* ((global-mode-name (symbol-name global-mode)) + (pretty-name (easy-mmode-pretty-mode-name mode)) + (pretty-global-name (easy-mmode-pretty-mode-name global-mode)) + (group nil) + (extra-args nil) + (buffers (intern (concat global-mode-name "-buffers"))) + (cmmh (intern (concat global-mode-name "-cmmh")))) + + ;; Check keys. + (while (keywordp (car keys)) + (case (pop keys) + (:extra-args (setq extra-args (pop keys))) + (:group (setq group (nconc group (list :group (pop keys))))) + (t (setq keys (cdr keys))))) + + (unless group + ;; We might as well provide a best-guess default group. + (setq group + `(:group ',(or (custom-current-group) + (intern (replace-regexp-in-string + "-mode\\'" "" (symbol-name mode))))))) + + `(progn + ;; The actual global minor-mode + (define-minor-mode ,global-mode + ,(format "Toggle %s in every buffer. +With prefix ARG, turn %s on if and only if ARG is positive. +%s is actually not turned on in every buffer but only in those +in which `%s' turns it on." + pretty-name pretty-global-name pretty-name turn-on) + :global t :extra-args ,extra-args ,@group + + ;; Setup hook to handle future mode changes and new buffers. + (if ,global-mode + ;; XEmacs: find-file-hooks not find-file-hook + (progn + (add-hook 'find-file-hooks ',buffers) + (add-hook 'change-major-mode-hook ',cmmh)) + (remove-hook 'find-file-hooks ',buffers) + (remove-hook 'change-major-mode-hook ',cmmh)) + + ;; Go through existing buffers. + (dolist (buf (buffer-list)) + (with-current-buffer buf + (if ,global-mode (,turn-on) (when ,mode (,mode -1)))))) + + ;; TODO: XEmacs does not support :autoload-end + ;; Autoloading easy-mmode-define-global-mode + ;; autoloads everything up-to-here. + :autoload-end + + ;; List of buffers left to process. + (defvar ,buffers nil) + + ;; The function that calls TURN-ON in each buffer. + (defun ,buffers () + (remove-hook 'post-command-hook ',buffers) + (while ,buffers + (let ((buf (pop ,buffers))) + (when (buffer-live-p buf) + (with-current-buffer buf (,turn-on)))))) + (put ',buffers 'definition-name ',global-mode) + + ;; The function that catches kill-all-local-variables. + (defun ,cmmh () + (add-to-list ',buffers (current-buffer)) + (add-hook 'post-command-hook ',buffers)) + (put ',cmmh 'definition-name ',global-mode)))) + +;;; +;;; easy-mmode-defmap +;;; + +(if (fboundp 'set-keymap-parents) + (defalias 'easy-mmode-set-keymap-parents 'set-keymap-parents) + (defun easy-mmode-set-keymap-parents (m parents) + (set-keymap-parent + m + (cond + ((not (consp parents)) parents) + ((not (cdr parents)) (car parents)) + (t (let ((m (copy-keymap (pop parents)))) + (easy-mmode-set-keymap-parents m parents) + m)))))) + +;;;###no-autoload +(defun easy-mmode-define-keymap (bs &optional name m args) + "Return a keymap built from bindings BS. +BS must be a list of (KEY . BINDING) where +KEY and BINDINGS are suitable for `define-key'. +Optional NAME is passed to `make-sparse-keymap'. +Optional map M can be used to modify an existing map. +ARGS is a list of additional keyword arguments." + (let (inherit dense ;suppress + ) + (while args + (let ((key (pop args)) + (val (pop args))) + (case key + (:name (setq name val)) + (:dense (setq dense val)) + (:inherit (setq inherit val)) + (:group) + ;;((eq key :suppress) (setq suppress val)) + (t (message "Unknown argument %s in defmap" key))))) + (unless (keymapp m) + (setq bs (append m bs)) + (setq m (if dense (make-keymap name) (make-sparse-keymap name)))) + (dolist (b bs) + (let ((keys (car b)) + (binding (cdr b))) + (dolist (key (if (consp keys) keys (list keys))) + (cond + ((symbolp key) + (substitute-key-definition key binding m global-map)) + ((null binding) + (unless (keymapp (lookup-key m key)) (define-key m key binding))) + ((let ((o (lookup-key m key))) + (or (null o) (numberp o) (eq o 'undefined))) + (define-key m key binding)))))) + (cond + ((keymapp inherit) (set-keymap-parent m inherit)) + ((consp inherit) (easy-mmode-set-keymap-parents m inherit))) + m)) + +;;;###no-autoload +(defmacro easy-mmode-defmap (m bs doc &rest args) + `(defconst ,m + (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) + ,doc)) + + +;;; +;;; easy-mmode-defsyntax +;;; + +(defun easy-mmode-define-syntax (css args) + (let ((st (make-syntax-table (plist-get args :copy))) + (parent (plist-get args :inherit))) + (dolist (cs css) + (let ((char (car cs)) + (syntax (cdr cs))) + (if (sequencep char) + (mapcar (lambda (c) (modify-syntax-entry c syntax st)) char) + (modify-syntax-entry char syntax st)))) + ;; XEmacs change: we do not have set-char-table-parent + (if parent (derived-mode-merge-syntax-tables + (if (symbolp parent) (symbol-value parent) parent) st)) + st)) + +;;;###no-autoload +(defmacro easy-mmode-defsyntax (st css doc &rest args) + "Define variable ST as a syntax-table. +CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)." + `(progn + (autoload 'easy-mmode-define-syntax "easy-mmode") + (defconst ,st (easy-mmode-define-syntax ,css ,(cons 'list args)) ,doc))) + + + +;;; +;;; easy-mmode-define-navigation +;;; + +;; XEmacs change: autoload +;;;###no-autoload +(defmacro easy-mmode-define-navigation (base re &optional name endfun) + "Define BASE-next and BASE-prev to navigate in the buffer. +RE determines the places the commands should move point to. +NAME should describe the entities matched by RE. It is used to build + the docstrings of the two functions. +BASE-next also tries to make sure that the whole entry is visible by + searching for its end (by calling ENDFUN if provided or by looking for + the next entry) and recentering if necessary. +ENDFUN should return the end position (with or without moving point)." + (let* ((base-name (symbol-name base)) + (prev-sym (intern (concat base-name "-prev"))) + (next-sym (intern (concat base-name "-next")))) + (unless name (setq name (symbol-name base-name))) + `(progn + (add-to-list 'debug-ignored-errors + ,(concat "^No \\(previous\\|next\\) " (regexp-quote name))) + (defun ,next-sym (&optional count) + ,(format "Go to the next COUNT'th %s." name) + (interactive) + (unless count (setq count 1)) + (if (< count 0) (,prev-sym (- count)) + (if (looking-at ,re) (incf count)) + (if (not (re-search-forward ,re nil t count)) + (if (looking-at ,re) + (goto-char (or ,(if endfun `(,endfun)) (point-max))) + (error ,(format "No next %s" name))) + (goto-char (match-beginning 0)) + (when (and (eq (current-buffer) (window-buffer (selected-window))) + (interactive-p)) + (let ((endpt (or (save-excursion + ,(if endfun `(,endfun) + `(re-search-forward ,re nil t 2))) + (point-max)))) + ;; XEmacs change: versions < 21.5.16 have a + ;; pos-visible-in-window-p that takes only 2 parameters + (unless + (if (eq (function-max-args #'pos-visible-in-window-p) 2) + (pos-visible-in-window-p endpt nil) + (pos-visible-in-window-p endpt nil t)) + (recenter '(0)))))))) + (defun ,prev-sym (&optional count) + ,(format "Go to the previous COUNT'th %s" (or name base-name)) + (interactive) + (unless count (setq count 1)) + (if (< count 0) (,next-sym (- count)) + (unless (re-search-backward ,re nil t count) + (error ,(format "No previous %s" name)))))))) + +(provide 'easy-mmode) + +;;; easy-mmode.el ends here diff --git a/lisp/printer.el b/lisp/printer.el index 9f0b6d7..9b996f9 100644 --- a/lisp/printer.el +++ b/lisp/printer.el @@ -260,7 +260,7 @@ If BUFFER is nil or omitted, the current buffer is used." (let* ((print-region (and (interactive-p) (region-active-p))) (start (if print-region (region-beginning) (point-min buffer))) (end (if print-region (region-end) (point-max buffer)))) - (if (or (not (valid-specifier-tag-p 'msprinter)) + (if (or (not (valid-device-type-p 'msprinter)) (not display-print-dialog)) (generic-print-region start end buffer) (let* ((d (Printer-get-device)) @@ -309,7 +309,7 @@ Recognized properties are the same as those in `make-dialog-box': to-page Last page to print, inclusive, If omitted, printing ends at the end. copies Number of copies to print. If omitted, one copy is printed." - (cond ((valid-specifier-tag-p 'msprinter) + (cond ((valid-device-type-p 'msprinter) ;; loop, printing one copy of document per loop. kill and ;; re-create the frame each time so that we eject the piece ;; of paper at the end even if we're printing more than one diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index df27f9e..7f0de40 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/man/ChangeLog b/man/ChangeLog index 28c171a..2ebc941 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/netinstall/ChangeLog b/netinstall/ChangeLog index 33afe7b..4800223 100644 --- a/netinstall/ChangeLog +++ b/netinstall/ChangeLog @@ -1,3 +1,7 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/nt/ChangeLog b/nt/ChangeLog index a527cd3..2a18bab 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,11 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2008-01-18 Vin Shelton + + * xemacs.mak: Support Intel C compiler. + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/nt/config.inc.samp b/nt/config.inc.samp index 397dac7..e089c19 100644 --- a/nt/config.inc.samp +++ b/nt/config.inc.samp @@ -98,3 +98,5 @@ DEPEND=0 # routines, instead of the older "unexec" routines in unexnt.c. USE_PORTABLE_DUMPER=1 +# Set this to build XEmacs with the Intel C Compiler. +USE_INTEL_COMPILER=0 diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 13a88d9..79ad838 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -353,6 +353,16 @@ DEPEND=0 ! endif !endif +!if $(USE_INTEL_COMPILER) +CC=icl +# Use static library if possible +INTEL_LIBS=libircmt.lib libmmt.lib +# Debugging requires DLL version of libm +!if $(DEBUG_XEMACS) +INTEL_LIBS=libircmt.lib libmmd.lib +!endif +!endif + # # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation. # @@ -872,7 +882,8 @@ TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc TEMACS_SRC=$(SRC) TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \ oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \ - shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib $(LIBC_LIB) + shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib \ + $(INTEL_LIBS) $(LIBC_LIB) TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\ -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\ -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \ diff --git a/src/ChangeLog b/src/ChangeLog index d9b6740..045d040 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2008-12-27 Vin Shelton + + * syswindows.h: Don't define wide character interfaces for Cygwin + 1.7 and up. + +2008-03-05 Dominique Quatravaux + + * glyphs-gtk.c: Fixed compilation under gcc 4.x. + +2008-11-01 Stephen J. Turnbull + + * regex.c (re_search_2): Fix at_dot by changing charpos to bytepos. + From Julian Bradfield <18654.1143.304851.782755@krk.inf.ed.ac.uk>. + +2008-12-25 Vin Shelton + + * mule-ccl.c (ccl_driver): Fix off-by-one error. + By Julian Bradfield in + <18691.16568.526264.972026@krk.inf.ed.ac.uk>. + + * mule-ccl.c (ccl_driver): + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/src/glyphs-gtk.c b/src/glyphs-gtk.c index 83fe167..836edbc 100644 --- a/src/glyphs-gtk.c +++ b/src/glyphs-gtk.c @@ -768,7 +768,7 @@ init_image_instance_from_gdk_image (struct Lisp_Image_Instance *ii, find_keyword_in_vector (instantiator, Q_file); IMAGE_INSTANCE_GTK_PIXMAP (ii) = pixmap; - IMAGE_INSTANCE_GTK_MASK (ii) = 0; + IMAGE_INSTANCE_PIXMAP_MASK (ii) = 0; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = gdk_image->width; IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = gdk_image->height; IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = gdk_image->depth; @@ -3223,7 +3223,7 @@ gtk_colorize_image_instance (Lisp_Object image_instance, IMAGE_INSTANCE_TYPE (p) = IMAGE_COLOR_PIXMAP; /* Make sure there aren't two pointers to the same mask, causing it to get freed twice. */ - IMAGE_INSTANCE_GTK_MASK (p) = 0; + IMAGE_INSTANCE_PIXMAP_MASK (p) = 0; break; default: diff --git a/src/mule-ccl.c b/src/mule-ccl.c index 866f279..de184ef 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -1380,7 +1380,7 @@ ccl_driver (struct ccl_program *ccl, if (XCHARSET_DIMENSION (CHARSET_BY_LEADING_BYTE (i)) == 1) i = (((i - FIELD2_TO_OFFICIAL_LEADING_BYTE) << 7) | (reg[rrr] & 0x7F)); - else if (i < MAX_LEADING_BYTE_OFFICIAL_2) + else if (i <= MAX_LEADING_BYTE_OFFICIAL_2) i = ((i - FIELD1_TO_OFFICIAL_LEADING_BYTE) << 14) | reg[rrr]; else diff --git a/src/syswindows.h b/src/syswindows.h index 14d7a6f..131c155 100644 --- a/src/syswindows.h +++ b/src/syswindows.h @@ -190,7 +190,7 @@ typedef NMHDR *LPNMHDR; #include -#ifdef CYGWIN +#if defined (CYGWIN) && (CYGWIN_VERSION_DLL_COMBINED < 190) /* All but wcscmp and wcslen left out of Cygwin headers -- but present in /usr/include/mingw32/string.h! */ diff --git a/tests/ChangeLog b/tests/ChangeLog index 380e70e..8c6b155 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2008-12-28 Vin Shelton + + * XEmacs 21.4.22 is released + +2008-09-27 Stephen J. Turnbull + + * automated/regexp-tests.el: Add test for at_dot regexp. + 2007-10-07 Vin Shelton * XEmacs 21.4.21 is released diff --git a/tests/automated/regexp-tests.el b/tests/automated/regexp-tests.el index 816868f..213f8c8 100644 --- a/tests/automated/regexp-tests.el +++ b/tests/automated/regexp-tests.el @@ -449,3 +449,20 @@ baaaa (not (match-beginning 1)))) ) + +;; empty string at point +;; Thanks Julian Bradford on XEmacs Beta +;; <18652.54975.894512.880956@krk.inf.ed.ac.uk> +(with-string-as-buffer-contents "aáa" + (goto-char (point-min)) + (Assert (looking-at "\\=")) + (Assert (= (re-search-forward "\\=") 1)) + (forward-char 1) + (Assert (looking-at "\\=")) + (Assert (= (re-search-forward "\\=") 2)) + (forward-char 1) + (Assert (looking-at "\\=")) + (Assert (= (re-search-forward "\\=") 3)) + (forward-char 1) + (Assert (looking-at "\\=")) + (Assert (= (re-search-forward "\\=") 4))) diff --git a/version.sh b/version.sh index 8e1fc9a..c4a6a21 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta= emacs_major_version=21 emacs_minor_version=4 -emacs_beta_version=21 -xemacs_codename="Educational Television" +emacs_beta_version=22 +xemacs_codename="Instant Classic" emacs_kit_version= infodock_major_version=4 infodock_minor_version=0