Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103710. ------------------------------------------------------------ revno: 103710 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-03-21 20:28:41 -0700 message: copy_autogen tweaks. * autogen/copy_autogen: Work from ./ or ../. Fix time-stamps. * autogen.sh: Doc fix. diff: === modified file 'ChangeLog' --- ChangeLog 2011-03-20 23:58:23 +0000 +++ ChangeLog 2011-03-22 03:28:41 +0000 @@ -1,3 +1,9 @@ +2011-03-22 Glenn Morris + + * autogen/copy_autogen: Work from ./ or ../. + Fix time-stamps. + * autogen.sh: Doc fix. + 2011-03-20 Glenn Morris * autogen/: New directory, to be excluded from releases. === modified file 'autogen.sh' --- autogen.sh 2011-03-20 23:58:23 +0000 +++ autogen.sh 2011-03-22 03:28:41 +0000 @@ -184,7 +184,7 @@ If all else fails, you can try using the pre-built versions of the generated files by doing: -cd autogen && ./copy_autogen +./autogen/copy_autogen This is not recommended - see the comments in \`copy_autogen'. === modified file 'autogen/copy_autogen' --- autogen/copy_autogen 2011-03-20 23:58:23 +0000 +++ autogen/copy_autogen 2011-03-22 03:28:41 +0000 @@ -8,12 +8,17 @@ ## regenerate configure and will fail if you do not have the required ## tools. You will have to run this script again. +test -d autogen && cd autogen + if test ! -e config.in; then - echo "You must run this script from the autogen/ directory." + echo "Cannot find autogen/ directory." exit 1 fi -cp configure aclocal.m4 ../ +## Order implied by top-level Makefile's rules, for time-stamps. +cp aclocal.m4 ../ +cp configure ../ +touch ../src/stamp-h.in cp config.in ../src/ cp Makefile.in ../lib/ ------------------------------------------------------------ revno: 103709 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-03-21 20:30:23 -0400 message: Special handling of the `custom-enabled-themes' custom variable. * lisp/custom.el (custom--inhibit-theme-enable): Make it affect only custom-theme-set-variables and custom-theme-set-faces. (provide-theme): Ignore custom--inhibit-theme-enable. (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. (custom-enabling-themes): Delete variable. (enable-theme): Accept only loaded themes as arguments. Ignore the special custom-enabled-themes variable. (custom-enabled-themes): Forbid themes from setting this. Eliminate use of custom-enabling-themes. (custom-push-theme): Quote "changed" custom var entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 22:09:52 +0000 +++ lisp/ChangeLog 2011-03-22 00:30:23 +0000 @@ -1,6 +1,15 @@ -2011-03-21 Chong Yidong +2011-03-22 Chong Yidong - * custom.el (custom-push-theme): Quote "changed" custom var entry. + * custom.el (custom--inhibit-theme-enable): Make it affect only + custom-theme-set-variables and custom-theme-set-faces. + (provide-theme): Ignore custom--inhibit-theme-enable. + (load-theme): Enable the theme explicitly if NO-ENABLE is non-nil. + (custom-enabling-themes): Delete variable. + (enable-theme): Accept only loaded themes as arguments. Ignore + the special custom-enabled-themes variable. + (custom-enabled-themes): Forbid themes from setting this. + Eliminate use of custom-enabling-themes. + (custom-push-theme): Quote "changed" custom var entry. 2011-03-21 Leo Liu === modified file 'lisp/custom.el' --- lisp/custom.el 2011-03-21 22:09:52 +0000 +++ lisp/custom.el 2011-03-22 00:30:23 +0000 @@ -1081,10 +1081,10 @@ :version "24.1") (defvar custom--inhibit-theme-enable nil - "If non-nil, loading a theme does not enable it. -This internal variable is set by `load-theme' when its NO-ENABLE -argument is non-nil, and it affects `custom-theme-set-variables', -`custom-theme-set-faces', and `provide-theme'." ) + "Whether the custom-theme-set-* functions act immediately. +If nil, `custom-theme-set-variables' and `custom-theme-set-faces' +change the current values of the given variable or face. If +non-nil, they just make a record of the theme settings.") (defun provide-theme (theme) "Indicate that this file provides THEME. @@ -1094,15 +1094,7 @@ (unless (custom-theme-name-valid-p theme) (error "Custom theme cannot be named %S" theme)) (custom-check-theme theme) - (provide (get theme 'theme-feature)) - (unless custom--inhibit-theme-enable - ;; By default, loading a theme also enables it. - (push theme custom-enabled-themes) - ;; `user' must always be the highest-precedence enabled theme. - ;; Make that remain true. (This has the effect of making user - ;; settings override the ones just loaded, too.) - (let ((custom-enabling-themes t)) - (enable-theme 'user)))) + (provide (get theme 'theme-feature))) (defcustom custom-safe-themes '(default) "List of themes that are considered safe to load. @@ -1154,9 +1146,11 @@ (expand-file-name "themes/" data-directory))) (member hash custom-safe-themes) (custom-theme-load-confirm hash)) - (let ((custom--inhibit-theme-enable no-enable)) - (eval-buffer) - t))))) + (let ((custom--inhibit-theme-enable t)) + (eval-buffer)) + (unless no-enable + (enable-theme theme)) + t)))) (defun custom-theme-load-confirm (hash) "Query the user about loading a Custom theme that may not be safe. @@ -1235,68 +1229,70 @@ ;;; Enabling and disabling loaded themes. -(defvar custom-enabling-themes nil) - (defun enable-theme (theme) "Reenable all variable and face settings defined by THEME. -The newly enabled theme gets the highest precedence (after `user'). -If it is already enabled, just give it highest precedence (after `user'). - -If THEME does not specify any theme settings, this tries to load -the theme from its theme file, by calling `load-theme'." +THEME should be either `user', or a theme loaded via `load-theme'. +After this function completes, THEME will have the highest +precedence (after `user')." (interactive (list (intern (completing-read "Enable custom theme: " - obarray (lambda (sym) (get sym 'theme-settings)))))) + obarray (lambda (sym) (get sym 'theme-settings)) t)))) (if (not (custom-theme-p theme)) - (load-theme theme) - ;; This could use a bit of optimization -- cyd - (let ((settings (get theme 'theme-settings))) - (dolist (s settings) - (let* ((prop (car s)) - (symbol (cadr s)) - (spec-list (get symbol prop))) - (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) - (if (eq prop 'theme-value) - (custom-theme-recalc-variable symbol) - (custom-theme-recalc-face symbol))))) - (unless (eq theme 'user) - (setq custom-enabled-themes - (cons theme (delq theme custom-enabled-themes))) - (unless custom-enabling-themes - (enable-theme 'user))))) + (error "Undefined Custom theme %s" theme)) + (let ((settings (get theme 'theme-settings))) + ;; Loop through theme settings, recalculating vars/faces. + (dolist (s settings) + (let* ((prop (car s)) + (symbol (cadr s)) + (spec-list (get symbol prop))) + (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) + (cond + ((eq prop 'theme-face) + (custom-theme-recalc-face symbol)) + ((eq prop 'theme-value) + ;; Don't change `custom-enabled-themes'; that's special. + (unless (eq symbol 'custom-enabled-themes) + (custom-theme-recalc-variable symbol))))))) + (unless (eq theme 'user) + (setq custom-enabled-themes + (cons theme (delq theme custom-enabled-themes))) + ;; Give the `user' theme the highest priority. + (enable-theme 'user))) (defcustom custom-enabled-themes nil "List of enabled Custom Themes, highest precedence first. +This list does not include the `user' theme, which is set by +Customize and always takes precedence over other Custom Themes. -This does not include the `user' theme, which is set by Customize, -and always takes precedence over other Custom Themes." +This variable cannot be defined inside a Custom theme; there, it +is simply ignored." :group 'customize :type '(repeat symbol) :set-after '(custom-theme-directory custom-theme-load-path custom-safe-themes) :risky t :set (lambda (symbol themes) - ;; Avoid an infinite loop when custom-enabled-themes is - ;; defined in a theme (e.g. `user'). Enabling the theme sets - ;; custom-enabled-themes, which enables the theme... - (unless custom-enabling-themes - (let ((custom-enabling-themes t) failures) - (setq themes (delq 'user (delete-dups themes))) - (if (boundp symbol) - (dolist (theme (symbol-value symbol)) - (if (not (memq theme themes)) - (disable-theme theme)))) - (dolist (theme (reverse themes)) - (condition-case nil - (enable-theme theme) - (error (progn (push theme failures) - (setq themes (delq theme themes)))))) - (enable-theme 'user) - (custom-set-default symbol themes) - (if failures - (message "Failed to enable themes: %s" - (mapconcat 'symbol-name failures " "))))))) + (let (failures) + (setq themes (delq 'user (delete-dups themes))) + ;; Disable all themes not in THEMES. + (if (boundp symbol) + (dolist (theme (symbol-value symbol)) + (if (not (memq theme themes)) + (disable-theme theme)))) + ;; Call `enable-theme' or `load-theme' on each of THEMES. + (dolist (theme (reverse themes)) + (condition-case nil + (if (custom-theme-p theme) + (enable-theme theme) + (load-theme theme)) + (error (setq failures (cons theme failures) + themes (delq theme themes))))) + (enable-theme 'user) + (custom-set-default symbol themes) + (if failures + (message "Failed to enable theme: %s" + (mapconcat 'symbol-name failures ", ")))))) (defsubst custom-theme-enabled-p (theme) "Return non-nil if THEME is enabled." ------------------------------------------------------------ revno: 103708 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-03-21 18:09:52 -0400 message: * lisp/custom.el (custom-push-theme): Quote "changed" custom var entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 17:48:36 +0000 +++ lisp/ChangeLog 2011-03-21 22:09:52 +0000 @@ -1,3 +1,7 @@ +2011-03-21 Chong Yidong + + * custom.el (custom-push-theme): Quote "changed" custom var entry. + 2011-03-21 Leo Liu * ido.el (ido-read-internal): Add ido-selected to history instead === modified file 'lisp/custom.el' --- lisp/custom.el 2011-03-17 02:30:27 +0000 +++ lisp/custom.el 2011-03-21 22:09:52 +0000 @@ -849,10 +849,10 @@ ;; theme is later disabled. (cond ((and (eq prop 'theme-value) (boundp symbol)) - (let ((sv (get symbol 'standard-value))) - (unless (and sv - (equal (eval (car sv)) (symbol-value symbol))) - (setq old (list (list 'changed (symbol-value symbol))))))) + (let ((sv (get symbol 'standard-value)) + (val (symbol-value symbol))) + (unless (and sv (equal (eval (car sv)) val)) + (setq old `((changed ,(custom-quote val))))))) ((and (facep symbol) (not (face-attr-match-p symbol ------------------------------------------------------------ revno: 103707 committer: Leo Liu branch nick: trunk timestamp: Tue 2011-03-22 01:48:36 +0800 message: Fix history adding in ido-read-internal Assume, for example, the head of matches is "RSS" and user input is "rs". If the user hit RET, "RSS" is selected but "rs" is added to the history. This commit fixes this inconsistency. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 16:34:16 +0000 +++ lisp/ChangeLog 2011-03-21 17:48:36 +0000 @@ -1,3 +1,8 @@ +2011-03-21 Leo Liu + + * ido.el (ido-read-internal): Add ido-selected to history instead + of user input. + 2011-03-21 Stefan Monnier * subr.el (deferred-action-list, deferred-action-function): === modified file 'lisp/ido.el' --- lisp/ido.el 2011-03-20 10:35:27 +0000 +++ lisp/ido.el 2011-03-21 17:48:36 +0000 @@ -1978,7 +1978,9 @@ (ido-completing-read t) (ido-require-match require-match) (ido-use-mycompletion-depth (1+ (minibuffer-depth))) - (show-paren-mode nil)) + (show-paren-mode nil) + ;; Postpone history adding till later + (history-add-new-input nil)) ;; prompt the user for the file name (setq ido-exit nil) (setq ido-final-text @@ -2158,6 +2160,7 @@ (t (setq done t)))))) + (and history (add-to-history history ido-selected)) ido-selected)) (defun ido-edit-input () ------------------------------------------------------------ revno: 103706 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-03-21 12:34:16 -0400 message: * subr.el (deferred-action-list, deferred-action-function): Mark obsolete. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-03-20 10:35:27 +0000 +++ etc/NEWS 2011-03-21 16:34:16 +0000 @@ -746,6 +746,7 @@ * Lisp changes in Emacs 24.1 ** byte-compile-disable-print-circle is obsolete. +** deferred-action-list and deferred-action-function are obsolete. ** Removed the stack-trace-on-error variable. Also the debugger can now "continue" from an error, which means it will jump to the error handler as if the debugger had not been invoked instead of === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 15:26:05 +0000 +++ lisp/ChangeLog 2011-03-21 16:34:16 +0000 @@ -1,3 +1,8 @@ +2011-03-21 Stefan Monnier + + * subr.el (deferred-action-list, deferred-action-function): + Mark obsolete. + 2011-03-21 Leo Liu * vc/log-view.el: Remove (require 'wid-edit), not needed after the === modified file 'lisp/subr.el' --- lisp/subr.el 2011-03-15 02:42:31 +0000 +++ lisp/subr.el 2011-03-21 16:34:16 +0000 @@ -1101,6 +1101,8 @@ (make-obsolete-variable 'define-key-rebound-commands nil "23.2") (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") +(make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1") +(make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1") (make-obsolete 'window-redisplay-end-trigger nil "23.1") (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") ------------------------------------------------------------ revno: 103705 committer: Leo Liu branch nick: trunk timestamp: Mon 2011-03-21 23:26:05 +0800 message: Remove leftover (require 'wid-edit) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 14:55:00 +0000 +++ lisp/ChangeLog 2011-03-21 15:26:05 +0000 @@ -1,5 +1,8 @@ 2011-03-21 Leo Liu + * vc/log-view.el: Remove (require 'wid-edit), not needed after the + change on 2011-02-13 (bug#8309). + * minibuffer.el (read-file-name-function): Change default value. (read-file-name--defaults): Rename from read-file-name-defaults. (read-file-name-default): Rename from read-file-name. === modified file 'lisp/vc/log-view.el' --- lisp/vc/log-view.el 2011-02-14 01:49:24 +0000 +++ lisp/vc/log-view.el 2011-03-21 15:26:05 +0000 @@ -121,9 +121,6 @@ :group 'pcl-cvs :prefix "log-view-") -;; Needed because log-view-mode-map inherits from widget-keymap. (Bug#5311) -(require 'wid-edit) - (easy-mmode-defmap log-view-mode-map '( ;; FIXME: (copy-keymap special-mode-map) instead ------------------------------------------------------------ revno: 103704 committer: Leo Liu branch nick: trunk timestamp: Mon 2011-03-21 22:55:00 +0800 message: Default read-file-name-function to a non-nil value See discussion thread: http://thread.gmane.org/gmane.emacs.devel/134000 diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 06:42:23 +0000 +++ lisp/ChangeLog 2011-03-21 14:55:00 +0000 @@ -1,3 +1,10 @@ +2011-03-21 Leo Liu + + * minibuffer.el (read-file-name-function): Change default value. + (read-file-name--defaults): Rename from read-file-name-defaults. + (read-file-name-default): Rename from read-file-name. + (read-file-name): Call read-file-name-function. + 2011-03-21 Glenn Morris * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2011-03-17 00:43:54 +0000 +++ lisp/minibuffer.el 2011-03-21 14:55:00 +0000 @@ -1486,8 +1486,9 @@ 'completion--file-name-table) "Internal subroutine for `read-file-name'. Do not call this.") -(defvar read-file-name-function nil - "If this is non-nil, `read-file-name' does its work by calling this function.") +(defvar read-file-name-function 'read-file-name-default + "The function called by `read-file-name' to do its work. +It should accept the same arguments as `read-file-name'.") (defcustom read-file-name-completion-ignore-case (if (memq system-type '(ms-dos windows-nt darwin cygwin)) @@ -1525,7 +1526,7 @@ (declare-function x-file-dialog "xfns.c" (prompt dir &optional default-filename mustmatch only-dir-p)) -(defun read-file-name-defaults (&optional dir initial) +(defun read-file-name--defaults (&optional dir initial) (let ((default (cond ;; With non-nil `initial', use `dir' as the first default. @@ -1592,6 +1593,12 @@ See also `read-file-name-completion-ignore-case' and `read-file-name-function'." + (funcall (or read-file-name-function #'read-file-name-default) + prompt dir default-filename mustmatch initial predicate)) + +(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate) + "Default method for reading file names. +See `read-file-name' for the meaning of the arguments." (unless dir (setq dir default-directory)) (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) (unless default-filename @@ -1613,9 +1620,6 @@ (minibuffer--double-dollars dir))) (initial (cons (minibuffer--double-dollars initial) 0))))) - (if read-file-name-function - (funcall read-file-name-function - prompt dir default-filename mustmatch initial predicate) (let ((completion-ignore-case read-file-name-completion-ignore-case) (minibuffer-completing-file-name t) (pred (or predicate 'file-exists-p)) @@ -1651,7 +1655,7 @@ (lambda () (with-current-buffer (window-buffer (minibuffer-selected-window)) - (read-file-name-defaults dir initial))))) + (read-file-name--defaults dir initial))))) (completing-read prompt 'read-file-name-internal pred mustmatch insdef 'file-name-history default-filename))) @@ -1725,7 +1729,7 @@ (if history-delete-duplicates (delete val1 file-name-history) file-name-history))))))) - val))))) + val)))) (defun internal-complete-buffer-except (&optional buffer) "Perform completion on all buffers excluding BUFFER. ------------------------------------------------------------ revno: 103703 committer: Glenn Morris branch nick: trunk timestamp: Sun 2011-03-20 23:42:23 -0700 message: * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-21 04:30:55 +0000 +++ lisp/ChangeLog 2011-03-21 06:42:23 +0000 @@ -1,3 +1,8 @@ +2011-03-21 Glenn Morris + + * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): + Doc fixes. + 2011-03-21 Chong Yidong * cus-theme.el: Add missing provide statement. === modified file 'lisp/eshell/esh-opt.el' --- lisp/eshell/esh-opt.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-opt.el 2011-03-21 06:42:23 +0000 @@ -35,13 +35,51 @@ ;;; User Functions: -(defmacro eshell-eval-using-options (name macro-args - options &rest body-forms) +(defmacro eshell-eval-using-options (name macro-args options &rest body-forms) "Process NAME's MACRO-ARGS using a set of command line OPTIONS. -After doing so, settings will be stored in local symbols as declared -by OPTIONS; FORMS will then be evaluated -- assuming all was OK. - -The syntax of OPTIONS is: +After doing so, stores settings in local symbols as declared by OPTIONS; +then evaluates BODY-FORMS -- assuming all was OK. + +OPTIONS is a list, beginning with one or more elements of the form: +\(SHORT LONG VALUE SYMBOL HELP-STRING) +Each of these elements represents a particular command-line switch. + +SHORT is either nil, or a character that can be used as a switch -SHORT. +LONG is either nil, or a string that can be used as a switch --LONG. +At least one of SHORT and LONG must be non-nil. +VALUE is the value associated with the option. It can be either: + t - the option needs a value to be specified after the switch; + nil - the option is given the value t; + anything else - specifies the actual value for the option. +SYMBOL is either nil, or the name of the Lisp symbol that will be bound +to VALUE. A nil SYMBOL calls `eshell-show-usage', and so is appropriate +for a \"--help\" type option. +HELP-STRING is a documentation string for the option. + +Any remaining elements of OPTIONS are :KEYWORD arguments. Some take +arguments, some do not. The recognized :KEYWORDS are: + +:external STRING + STRING is an external command to run if there are unknown switches. + +:usage STRING + STRING is the initial part of the command's documentation string. + It appears before the options are listed. + +:post-usage STRING + STRING is an optional trailing part of the command's documentation string. + It appears after the options, but before the final part of the + documentation about the associated external command (if there is one). + +:show-usage + If present, then show the usage message if the command is called with no + arguments. + +:preserve-args + If present, do not pass MACRO-ARGS through `eshell-flatten-list' +and `eshell-stringify-list'. + +For example, OPTIONS might look like: '((?C nil nil multi-column \"multi-column display\") (nil \"help\" nil nil \"show this usage display\") @@ -52,8 +90,9 @@ Sort entries alphabetically across.\") `eshell-eval-using-options' returns the value of the last form in -BODY-FORMS. If instead an external command is run, the tag -`eshell-external' will be thrown with the new process for its value. +BODY-FORMS. If instead an external command is run (because of +an unknown option), the tag `eshell-external' will be thrown with +the new process for its value. Lastly, any remaining arguments will be available in a locally interned variable `args' (created using a `let' form)." @@ -200,7 +239,7 @@ (defun eshell-process-args (name args options) "Process the given ARGS using OPTIONS. -This assumes that symbols have been intern'd by `eshell-with-options'." +This assumes that symbols have been intern'd by `eshell-eval-using-options'." (let ((ai 0) arg) (while (< ai (length args)) (setq arg (nth ai args))