Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 104462. ------------------------------------------------------------ revno: 104462 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-05-31 20:50:20 -0700 message: Use derived-mode-p in previous change. diff: === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2011-06-01 03:35:49 +0000 +++ lisp/mail/emacsbug.el 2011-06-01 03:50:20 +0000 @@ -345,7 +345,7 @@ (error "No text entered in bug report")) (or report-emacs-bug-no-confirmation ;; mailclient.el does not handle From (at present). - (if (eq major-mode 'message-mode) + (if (derived-mode-p 'message-mode) (eq message-send-mail-function 'message-send-mail-with-mailclient) (eq send-mail-function 'mailclient-send-it)) ;; Not narrowing to the headers, but that's OK. ------------------------------------------------------------ revno: 104461 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-05-31 20:35:49 -0700 message: * lisp/mail/emacsbug.el (report-emacs-bug-hook): Mailclient ignores From. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-31 21:40:30 +0000 +++ lisp/ChangeLog 2011-06-01 03:35:49 +0000 @@ -56,6 +56,10 @@ (rcirc-decode-coding-system): Allow value nil for automatic coding system detection. +2011-06-01 Glenn Morris + + * mail/emacsbug.el (report-emacs-bug-hook): Mailclient ignores From. + 2011-05-29 Chong Yidong * image.el (image-animate-max-time): Allow nil and t values. === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2011-05-27 01:58:50 +0000 +++ lisp/mail/emacsbug.el 2011-06-01 03:35:49 +0000 @@ -331,6 +331,7 @@ ;; It's the default mail mode, so it seems OK to use its features. (autoload 'message-bogus-recipient-p "message") +(defvar message-send-mail-function) (defun report-emacs-bug-hook () "Do some checking before sending a bug report." @@ -343,6 +344,10 @@ report-emacs-bug-orig-text) (error "No text entered in bug report")) (or report-emacs-bug-no-confirmation + ;; mailclient.el does not handle From (at present). + (if (eq major-mode 'message-mode) + (eq message-send-mail-function 'message-send-mail-with-mailclient) + (eq send-mail-function 'mailclient-send-it)) ;; Not narrowing to the headers, but that's OK. (let ((from (mail-fetch-field "From"))) (and (or (not from) ------------------------------------------------------------ revno: 104460 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2011-06-01 00:22:55 +0000 message: Update. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-31 22:08:51 +0000 +++ lisp/gnus/ChangeLog 2011-06-01 00:22:55 +0000 @@ -15,6 +15,10 @@ * gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in ephemeral group. +2011-05-31 Lars Magne Ingebrigtsen + + * shr.el (shr-browse-image): Copy the URL if called interactively. + 2011-05-30 Lars Magne Ingebrigtsen * gnus-group.el (gnus-group-mark-article-read): It's possible that we ------------------------------------------------------------ revno: 104459 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-05-31 22:08:51 +0000 message: Merge changes made in Gnus trunk. gnus.texi (Store custom flags and keywords): Refer to `gnus-registry-article-marks-to-{chars,names}' instead of `gnus-registry-user-format-function-{M,M2}'. shr.el (shr-rescale-image): Add an :ascent of 100 to images so that the underline comes at the bottom. gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from `gnus-registry-user-format-function-M' and declare the latter obsolete. (gnus-registry-article-marks-to-names): Rename from `gnus-registry-user-format-function-M2'. shr.el (shr-browse-image): Copy the URL if called interactively. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-05-18 22:16:26 +0000 +++ doc/misc/ChangeLog 2011-05-31 22:08:51 +0000 @@ -1,3 +1,9 @@ +2011-05-31 Teodor Zlatanov + + * gnus.texi (Store custom flags and keywords): Refer to + `gnus-registry-article-marks-to-{chars,names}' instead of + `gnus-registry-user-format-function-{M,M2}'. + 2011-05-18 Teodor Zlatanov * gnus.texi (Gnus Registry Setup): Rename from "Setup". === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-05-18 22:16:26 +0000 +++ doc/misc/gnus.texi 2011-05-31 22:08:51 +0000 @@ -26094,10 +26094,10 @@ @lisp ;; show the marks as single characters (see the :char property in ;; `gnus-registry-marks'): -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) ;; show the marks by name (see `gnus-registry-marks'): -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) @end lisp === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-31 10:37:35 +0000 +++ lisp/gnus/ChangeLog 2011-05-31 22:08:51 +0000 @@ -1,3 +1,15 @@ +2011-05-31 Lars Magne Ingebrigtsen + + * shr.el (shr-rescale-image): Add an :ascent of 100 to images so that + the underline comes at the bottom. + +2011-05-31 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from + `gnus-registry-user-format-function-M' and declare the latter obsolete. + (gnus-registry-article-marks-to-names): Rename from + `gnus-registry-user-format-function-M2'. + 2011-05-31 Katsumi Yamaoka * gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-05-18 22:16:26 +0000 +++ lisp/gnus/gnus-registry.el 2011-05-31 22:08:51 +0000 @@ -62,10 +62,10 @@ ;; show the marks as single characters (see the :char property in ;; `gnus-registry-marks'): -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) ;; show the marks by name (see `gnus-registry-marks'): -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) ;; TODO: @@ -897,9 +897,12 @@ nil (cons "Registry Marks" gnus-registry-misc-menus)))))) +(make-obsolete 'gnus-registry-user-format-function-M + 'gnus-registry-article-marks-to-chars "24.1") ? + ;; use like this: -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M) -(defun gnus-registry-user-format-function-M (headers) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars) +(defun gnus-registry-article-marks-to-chars (headers) "Show the marks for an article by the :char property" (let* ((id (mail-header-message-id headers)) (marks (when id (gnus-registry-get-id-key id 'mark)))) @@ -911,8 +914,8 @@ marks ""))) ;; use like this: -;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2) -(defun gnus-registry-user-format-function-M2 (headers) +;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) +(defun gnus-registry-article-marks-to-names (headers) "Show the marks for an article by name" (let* ((id (mail-header-message-id headers)) (marks (when id (gnus-registry-get-id-key id 'mark)))) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-05-29 23:28:45 +0000 +++ lisp/gnus/shr.el 2011-05-31 22:08:51 +0000 @@ -183,14 +183,23 @@ (message "No image under point") (message "%s" text)))) -(defun shr-browse-image () - "Browse the image under point." - (interactive) +(defun shr-browse-image (&optional copy-url) + "Browse the image under point. +If COPY-URL (the prefix if called interactively) is non-nil, copy +the URL of the image to the kill buffer instead." + (interactive "P") (let ((url (get-text-property (point) 'image-url))) - (if (not url) - (message "No image under point") + (cond + ((not url) + (message "No image under point")) + (copy-url + (with-temp-buffer + (insert url) + (copy-region-as-kill (point-min) (point-max)) + (message "Copied %s" url))) + (t (message "Browsing %s..." url) - (browse-url url)))) + (browse-url url))))) (defun shr-insert-image () "Insert the image under point into the buffer." @@ -524,8 +533,9 @@ (defun shr-rescale-image (data) (if (or (not (fboundp 'imagemagick-types)) (not (get-buffer-window (current-buffer)))) - (create-image data nil t) - (let* ((image (create-image data nil t)) + (create-image data nil t + :ascent 100) + (let* ((image (create-image data nil t :ascent 100)) (size (image-size image t)) (width (car size)) (height (cdr size)) @@ -544,11 +554,13 @@ (when (> (car size) window-width) (setq image (or (create-image data 'imagemagick t - :width window-width) + :width window-width + :ascent 100) image))) (when (and (fboundp 'create-animated-image) (eq (image-type data nil t) 'gif)) - (setq image (create-animated-image data 'gif t))) + (setq image (create-animated-image data 'gif t + :ascent 100))) image))) ;; url-cache-extract autoloads url-cache. ------------------------------------------------------------ revno: 104458 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-05-31 18:40:30 -0300 message: * lisp/minibuffer.el (complete-with-action): Return nil for the metadata and boundaries of non-functional tables. (completion-table-dynamic): Return nil for the metadata. (completion-table-with-terminator): Add default case, using complete-with-action. (completion--metadata): New function. (completion-all-sorted-completions, minibuffer-completion-help): Use it to try and avoid pathological performance problems. (completion--embedded-envvar-table): Return `category' metadata. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-31 18:40:00 +0000 +++ lisp/ChangeLog 2011-05-31 21:40:30 +0000 @@ -1,3 +1,15 @@ +2011-05-31 Stefan Monnier + + * minibuffer.el (complete-with-action): Return nil for the metadata and + boundaries of non-functional tables. + (completion-table-dynamic): Return nil for the metadata. + (completion-table-with-terminator): Add default case, using + complete-with-action. + (completion--metadata): New function. + (completion-all-sorted-completions, minibuffer-completion-help): Use it + to try and avoid pathological performance problems. + (completion--embedded-envvar-table): Return `category' metadata. + 2011-05-31 Lars Magne Ingebrigtsen * subr.el (process-alive-p): New tiny convenience function. === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2011-05-31 03:03:38 +0000 +++ lisp/minibuffer.el 2011-05-31 21:40:30 +0000 @@ -26,11 +26,15 @@ ;; internal use only. ;; Functional completion tables have an extended calling conventions: -;; - The `action' can be (additionally to nil, t, and lambda) of the form -;; (boundaries . SUFFIX) in which case it should return +;; The `action' can be (additionally to nil, t, and lambda) of the form +;; - (boundaries . SUFFIX) in which case it should return ;; (boundaries START . END). See `completion-boundaries'. ;; Any other return value should be ignored (so we ignore values returned ;; from completion tables that don't know about this new `action' form). +;; - `metadata' in which case it should return (metadata . ALIST) where +;; ALIST is the metadata of this table. See `completion-metadata'. +;; Any other return value should be ignored (so we ignore values returned +;; from completion tables that don't know about this new `action' form). ;;; Bugs: @@ -107,7 +111,8 @@ and for file names the result is the positions delimited by the closest directory separators." (let ((boundaries (if (functionp table) - (funcall table string pred (cons 'boundaries suffix))))) + (funcall table string pred + (cons 'boundaries suffix))))) (if (not (eq (car-safe boundaries) 'boundaries)) (setq boundaries nil)) (cons (or (cadr boundaries) 0) @@ -125,7 +130,8 @@ Takes one argument (COMPLETIONS) and should return a new list of completions. Can operate destructively. - `cycle-sort-function': function to sort entries when cycling. - Works like `display-sort-function'." + Works like `display-sort-function'. +The metadata of a completion table should be constant between two boundaries." (let ((metadata (if (functionp table) (funcall table string pred 'metadata)))) (if (eq (car-safe metadata) 'metadata) @@ -160,8 +166,8 @@ ACTION can be one of nil, t or `lambda'." (cond ((functionp table) (funcall table string pred action)) - ((eq (car-safe action) 'boundaries) - (cons 'boundaries (completion-boundaries string table pred (cdr action)))) + ((eq (car-safe action) 'boundaries) nil) + ((eq action 'metadata) nil) (t (funcall (cond @@ -182,7 +188,7 @@ that can be used as the COLLECTION argument to `try-completion' and `all-completions'. See Info node `(elisp)Programmed Completion'." (lambda (string pred action) - (if (eq (car-safe action) 'boundaries) + (if (or (eq (car-safe action) 'boundaries) (eq action 'metadata)) ;; `fun' is not supposed to return another function but a plain old ;; completion table, whose boundaries are always trivial. nil @@ -287,18 +293,18 @@ (funcall terminator comp) (concat comp terminator)) comp)))) - ((eq action t) + ;; completion-table-with-terminator is always used for + ;; "sub-completions" so it's only called if the terminator is missing, + ;; in which case `test-completion' should return nil. + ((eq action 'lambda) nil) + (t ;; FIXME: We generally want the `try' and `all' behaviors to be ;; consistent so pcm can merge the `all' output to get the `try' output, ;; but that sometimes clashes with the need for `all' output to look ;; good in *Completions*. ;; (mapcar (lambda (s) (concat s terminator)) ;; (all-completions string table pred)))) - (all-completions string table pred)) - ;; completion-table-with-terminator is always used for - ;; "sub-completions" so it's only called if the terminator is missing, - ;; in which case `test-completion' should return nil. - ((eq action 'lambda) nil))) + (complete-with-action action table string pred)))) (defun completion-table-with-predicate (table pred1 strict string pred2 action) "Make a completion table equivalent to TABLE but filtered through PRED1. @@ -769,22 +775,33 @@ (setq completion-cycling nil) (setq completion-all-sorted-completions nil)) +(defun completion--metadata (string base md-at-point table pred) + ;; Like completion-metadata, but for the specific case of getting the + ;; metadata at `base', which tends to trigger pathological behavior for old + ;; completion tables which don't understand `metadata'. + (let ((bounds (completion-boundaries string table pred ""))) + (if (eq (car bounds) base) md-at-point + (completion-metadata (substring string 0 base) table pred)))) + (defun completion-all-sorted-completions () (or completion-all-sorted-completions (let* ((start (field-beginning)) (end (field-end)) (string (buffer-substring start end)) + (md (completion--field-metadata start)) (all (completion-all-completions string minibuffer-completion-table minibuffer-completion-predicate (- (point) start) - (completion--field-metadata start))) + md)) (last (last all)) (base-size (or (cdr last) 0)) - (all-md (completion-metadata (substring string 0 base-size) - minibuffer-completion-table - minibuffer-completion-predicate)) + (all-md (completion--metadata (buffer-substring-no-properties + start (point)) + base-size md + minibuffer-completion-table + minibuffer-completion-predicate)) (sort-fun (completion-metadata-get all-md 'cycle-sort-function))) (when last (setcdr last nil) @@ -1272,12 +1289,13 @@ (let* ((start (field-beginning)) (end (field-end)) (string (field-string)) + (md (completion--field-metadata start)) (completions (completion-all-completions string minibuffer-completion-table minibuffer-completion-predicate (- (point) (field-beginning)) - (completion--field-metadata start)))) + md))) (message nil) (if (or (null completions) (and (not (consp (cdr completions))) @@ -1293,12 +1311,11 @@ (let* ((last (last completions)) (base-size (cdr last)) (prefix (unless (zerop base-size) (substring string 0 base-size))) - ;; FIXME: This function is for the output of all-completions, - ;; not completion-all-completions. Often it's the same, but - ;; not always. - (all-md (completion-metadata (substring string 0 base-size) - minibuffer-completion-table - minibuffer-completion-predicate)) + (all-md (completion--metadata (buffer-substring-no-properties + start (point)) + base-size md + minibuffer-completion-table + minibuffer-completion-predicate)) (afun (or (completion-metadata-get all-md 'annotation-function) (plist-get completion-extra-properties :annotation-function) @@ -1673,8 +1690,8 @@ ;; other table that provides the "main" completion. Let the ;; other table handle the test-completion case. nil) - ((eq (car-safe action) 'boundaries) - ;; Only return boundaries if there's something to complete, + ((or (eq (car-safe action) 'boundaries) (eq action 'metadata)) + ;; Only return boundaries/metadata if there's something to complete, ;; since otherwise when we're used in ;; completion-table-in-turn, we could return boundaries and ;; let some subsequent table return a list of completions. @@ -1684,11 +1701,13 @@ (when (try-completion (substring string beg) table nil) ;; Compute the boundaries of the subfield to which this ;; completion applies. - (let ((suffix (cdr action))) - (list* 'boundaries - (or (match-beginning 2) (match-beginning 1)) - (when (string-match "[^[:alnum:]_]" suffix) - (match-beginning 0)))))) + (if (eq action 'metadata) + '(metadata (category . environment-variable)) + (let ((suffix (cdr action))) + (list* 'boundaries + (or (match-beginning 2) (match-beginning 1)) + (when (string-match "[^[:alnum:]_]" suffix) + (match-beginning 0))))))) (t (if (eq (aref string (1- beg)) ?{) (setq table (apply-partially 'completion-table-with-terminator @@ -2299,7 +2318,8 @@ (case-fold-search completion-ignore-case) (completion-regexp-list (cons regex completion-regexp-list)) (compl (all-completions - (concat prefix (if (stringp (car pattern)) (car pattern) "")) + (concat prefix + (if (stringp (car pattern)) (car pattern) "")) table pred))) (if (not (functionp table)) ;; The internal functions already obeyed completion-regexp-list. @@ -2397,13 +2417,14 @@ (- (length newbeforepoint) (car newbounds))))) (dolist (submatch suball) - (setq all (nconc (mapcar - (lambda (s) (concat submatch between s)) - (funcall filter - (completion-pcm--all-completions - (concat subprefix submatch between) - pattern table pred))) - all))) + (setq all (nconc + (mapcar + (lambda (s) (concat submatch between s)) + (funcall filter + (completion-pcm--all-completions + (concat subprefix submatch between) + pattern table pred))) + all))) ;; FIXME: This can come in handy for try-completion, ;; but isn't right for all-completions, since it lists ;; invalid completions. ------------------------------------------------------------ revno: 104457 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-05-31 22:58:01 +0200 message: (url-queue-parallel-processes): Increase the default to 6, since 2 seems too conservative for normal usage. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-05-31 10:47:22 +0000 +++ lisp/url/ChangeLog 2011-05-31 20:58:01 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Lars Magne Ingebrigtsen + + * url-queue.el (url-queue-parallel-processes): Increase the + default to 6, since 2 seems too conservative for normal usage. + 2011-05-31 Teodor Zlatanov * url-future.el: Add general futures facility. === modified file 'lisp/url/url-queue.el' --- lisp/url/url-queue.el 2011-05-02 18:30:48 +0000 +++ lisp/url/url-queue.el 2011-05-31 20:58:01 +0000 @@ -31,7 +31,7 @@ (eval-when-compile (require 'cl)) (require 'browse-url) -(defcustom url-queue-parallel-processes 2 +(defcustom url-queue-parallel-processes 6 "The number of concurrent processes." :type 'integer :group 'url) ------------------------------------------------------------ revno: 104456 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-05-31 20:40:00 +0200 message: Add the tiny convenience function `process-alive-p'. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-05-29 22:41:06 +0000 +++ doc/lispref/ChangeLog 2011-05-31 18:40:00 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Lars Magne Ingebrigtsen + + * processes.texi (Process Information): Document + `process-alive-p'. + 2011-05-29 Chong Yidong * help.texi (Accessing Documentation): === modified file 'doc/lispref/processes.texi' --- doc/lispref/processes.texi 2011-05-29 22:41:06 +0000 +++ doc/lispref/processes.texi 2011-05-31 18:40:00 +0000 @@ -859,6 +859,12 @@ closed the connection, or Emacs did @code{delete-process}. @end defun +@defun process-alive-p process +This function returns nin-@code{nil} if @var{process} is alive. A +process is considered alive if its status is @code{run}, @code{open}, +@code{listen}, @code{connect} or @code{stop}. +@end defun + @defun process-type process This function returns the symbol @code{network} for a network connection or server, @code{serial} for a serial port connection, or === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-31 15:41:14 +0000 +++ lisp/ChangeLog 2011-05-31 18:40:00 +0000 @@ -1,3 +1,7 @@ +2011-05-31 Lars Magne Ingebrigtsen + + * subr.el (process-alive-p): New tiny convenience function. + 2011-05-31 Stefan Monnier * emacs-lisp/debug.el (debug): Save&restore not just the buffer's === modified file 'lisp/subr.el' --- lisp/subr.el 2011-05-28 19:36:02 +0000 +++ lisp/subr.el 2011-05-31 18:40:00 +0000 @@ -1805,6 +1805,13 @@ (forward-line 1)) (nreverse lines))))) +(defun process-alive-p (process) + "Returns non-nil if PROCESS is alive. +A process is considered alive if its status is `run', `open', +`listen', `connect' or `stop'." + (memq (process-status process) + '(run open listen connect stop))) + ;; compatibility (make-obsolete ------------------------------------------------------------ revno: 104455 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-05-31 19:03:24 +0200 message: src/makefile.w32-in: Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-31 14:57:53 +0000 +++ src/ChangeLog 2011-05-31 17:03:24 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Juanma Barranquero + + * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)): + Update dependencies. + 2011-05-31 Dan Nicolaescu * data.c (init_data): Remove code for UTS, this system is not === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2011-05-24 08:22:58 +0000 +++ src/makefile.w32-in 2011-05-31 17:03:24 +0000 @@ -654,6 +654,7 @@ $(SRC)/data.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/sys/time.h \ + $(EMACS_ROOT)/lib/intprops.h \ $(LISP_H) \ $(SRC)/buffer.h \ $(SRC)/ccl.h \ @@ -753,6 +754,7 @@ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/lib/intprops.h \ $(EMACS_ROOT)/lib/strftime.h \ + $(EMACS_ROOT)/lib/verify.h \ $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ ------------------------------------------------------------ revno: 104454 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-05-31 18:09:59 +0200 message: lib/getopt_.h: Regenerate. diff: === modified file 'lib/getopt_.h' --- lib/getopt_.h 2011-02-11 03:43:40 +0000 +++ lib/getopt_.h 2011-05-31 16:09:59 +0000 @@ -279,5 +279,5 @@ /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt -#endif /* getopt.h */ -#endif /* getopt.h */ +#endif /* _GL_GETOPT_H */ +#endif /* _GL_GETOPT_H */ ------------------------------------------------------------ revno: 104453 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-05-31 12:41:14 -0300 message: * lisp/emacs-lisp/debug.el (debug): Save&restore not just the buffer's content but also its previous major mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-31 15:24:33 +0000 +++ lisp/ChangeLog 2011-05-31 15:41:14 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Stefan Monnier + + * emacs-lisp/debug.el (debug): Save&restore not just the buffer's + content but also its previous major mode. + 2011-05-31 Helmut Eller * debug.el (debug): Restore the previous content of the === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2011-05-31 15:24:33 +0000 +++ lisp/emacs-lisp/debug.el 2011-05-31 15:41:14 +0000 @@ -118,9 +118,12 @@ (let (debugger-value (debug-on-error nil) (debug-on-quit nil) + (debugger-previous-state + (if (get-buffer "*Backtrace*") + (with-current-buffer (get-buffer "*Backtrace*") + (list major-mode (buffer-string))))) (debugger-buffer (get-buffer-create "*Backtrace*")) (debugger-old-buffer (current-buffer)) - (debugger-previous-contents nil) (debugger-step-after-exit nil) (debugger-will-be-back nil) ;; Don't keep reading from an executing kbd macro! @@ -182,7 +185,6 @@ (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (backtrace-debug 5 t))) (pop-to-buffer debugger-buffer) - (setq debugger-previous-contents (buffer-string)) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive @@ -216,9 +218,6 @@ ;; recreate it every time the debugger stops, so instead we'll ;; erase it (and maybe hide it) but keep it alive. (with-current-buffer debugger-buffer - (erase-buffer) - (insert debugger-previous-contents) - (fundamental-mode) (with-selected-window (get-buffer-window debugger-buffer 0) (when (and (window-dedicated-p (selected-window)) (not debugger-will-be-back)) @@ -235,7 +234,17 @@ ;; to be left at the top-level, still working on how ;; best to do that. (bury-buffer)))) - (kill-buffer debugger-buffer)) + (unless debugger-previous-state + (kill-buffer debugger-buffer))) + ;; Restore the previous state of the debugger-buffer, in case we were + ;; in a recursive invocation of the debugger. + (when (and debugger-previous-state + (buffer-live-p debugger-buffer)) + (with-current-buffer debugger-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (insert (nth 1 debugger-previous-state)) + (funcall (nth 0 debugger-previous-state))))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) ;; Put into effect the modified values of these variables ------------------------------------------------------------ revno: 104452 author: Helmut Eller committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-05-31 12:24:33 -0300 message: * debug.el (debug): Restore the previous content of the *Backtrace* buffer when we exit with C-M-c. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-31 03:03:38 +0000 +++ lisp/ChangeLog 2011-05-31 15:24:33 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Helmut Eller + + * debug.el (debug): Restore the previous content of the + *Backtrace* buffer when we exit with C-M-c. + 2011-05-31 Stefan Monnier * minibuffer.el: Add metadata method to completion tables. === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2011-03-20 03:53:45 +0000 +++ lisp/emacs-lisp/debug.el 2011-05-31 15:24:33 +0000 @@ -120,6 +120,7 @@ (debug-on-quit nil) (debugger-buffer (get-buffer-create "*Backtrace*")) (debugger-old-buffer (current-buffer)) + (debugger-previous-contents nil) (debugger-step-after-exit nil) (debugger-will-be-back nil) ;; Don't keep reading from an executing kbd macro! @@ -181,6 +182,7 @@ (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (backtrace-debug 5 t))) (pop-to-buffer debugger-buffer) + (setq debugger-previous-contents (buffer-string)) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive @@ -215,6 +217,7 @@ ;; erase it (and maybe hide it) but keep it alive. (with-current-buffer debugger-buffer (erase-buffer) + (insert debugger-previous-contents) (fundamental-mode) (with-selected-window (get-buffer-window debugger-buffer 0) (when (and (window-dedicated-p (selected-window)) ------------------------------------------------------------ revno: 104451 committer: Dan Nicolaescu branch nick: trunk timestamp: Tue 2011-05-31 07:57:53 -0700 message: * src/data.c (init_data): Remove code for UTS, this system is not supported anymore. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-31 14:52:10 +0000 +++ src/ChangeLog 2011-05-31 14:57:53 +0000 @@ -1,5 +1,10 @@ 2011-05-31 Dan Nicolaescu + * data.c (init_data): Remove code for UTS, this system is not + supported anymore. + +2011-05-31 Dan Nicolaescu + Don't force ./temacs to start in terminal mode. * frame.c (make_initial_frame): Initialize faces in all cases, not === modified file 'src/data.c' --- src/data.c 2011-05-31 03:03:38 +0000 +++ src/data.c 2011-05-31 14:57:53 +0000 @@ -3220,8 +3220,4 @@ return; #endif /* CANNOT_DUMP */ signal (SIGFPE, arith_error); - -#ifdef uts - signal (SIGEMT, arith_error); -#endif /* uts */ } ------------------------------------------------------------ revno: 104450 committer: Dan Nicolaescu branch nick: trunk timestamp: Tue 2011-05-31 07:52:10 -0700 message: Don't force ./temacs to start in terminal mode. * frame.c (make_initial_frame): Initialize faces in all cases, not only when CANNOT_DUMP is defined. * dispnew.c (init_display): Remove CANNOT_DUMP condition. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-31 14:44:16 +0000 +++ src/ChangeLog 2011-05-31 14:52:10 +0000 @@ -1,5 +1,13 @@ 2011-05-31 Dan Nicolaescu + Don't force ./temacs to start in terminal mode. + + * frame.c (make_initial_frame): Initialize faces in all cases, not + only when CANNOT_DUMP is defined. + * dispnew.c (init_display): Remove CANNOT_DUMP condition. + +2011-05-31 Dan Nicolaescu + * dispnew.c (add_window_display_history): Use const for the string pointer. Remove declaration, not needed. === modified file 'src/dispnew.c' --- src/dispnew.c 2011-05-31 14:44:16 +0000 +++ src/dispnew.c 2011-05-31 14:52:10 +0000 @@ -6233,8 +6233,7 @@ } } - if (!inhibit_window_system && display_arg - ) + if (!inhibit_window_system && display_arg) { Vinitial_window_system = Qx; #ifdef HAVE_X11 === modified file 'src/frame.c' --- src/frame.c 2011-05-29 00:45:00 +0000 +++ src/frame.c 2011-05-31 14:52:10 +0000 @@ -544,10 +544,8 @@ /* The default value of menu-bar-mode is t. */ set_menu_bar_lines (f, make_number (1), Qnil); -#ifdef CANNOT_DUMP if (!noninteractive) init_frame_faces (f); -#endif return f; } ------------------------------------------------------------ revno: 104449 committer: Dan Nicolaescu branch nick: trunk timestamp: Tue 2011-05-31 07:44:16 -0700 message: Use const for a string pointer. * src/dispnew.c (add_window_display_history): Use const for the string pointer. Remove declaration, not needed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-31 05:24:53 +0000 +++ src/ChangeLog 2011-05-31 14:44:16 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Dan Nicolaescu + + * dispnew.c (add_window_display_history): Use const for the string + pointer. Remove declaration, not needed. + 2011-05-31 Paul Eggert Use 'inline', not 'INLINE'. === modified file 'src/dispnew.c' --- src/dispnew.c 2011-05-28 22:39:39 +0000 +++ src/dispnew.c 2011-05-31 14:44:16 +0000 @@ -290,7 +290,6 @@ static unsigned history_tick; static void add_frame_display_history (struct frame *, int); -static void add_window_display_history (struct window *, char *, int); /* Add to the redisplay history how window W has been displayed. MSG is a trace containing the information how W's glyph matrix @@ -298,7 +297,7 @@ has been interrupted for pending input. */ static void -add_window_display_history (struct window *w, char *msg, int paused_p) +add_window_display_history (struct window *w, const char *msg, int paused_p) { char *buf; @@ -6235,9 +6234,6 @@ } if (!inhibit_window_system && display_arg -#ifndef CANNOT_DUMP - && initialized -#endif ) { Vinitial_window_system = Qx; ------------------------------------------------------------ revno: 104448 committer: Ted Zlatanov branch nick: quickfixes timestamp: Tue 2011-05-31 05:47:22 -0500 message: * url-future.el: Add general futures facility. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-05-29 02:45:03 +0000 +++ lisp/url/ChangeLog 2011-05-31 10:47:22 +0000 @@ -1,3 +1,7 @@ +2011-05-31 Teodor Zlatanov + + * url-future.el: Add general futures facility. + 2011-05-29 Leo Liu * url-cookie.el (url-cookie): Add option :named so that === added file 'lisp/url/url-future.el' --- lisp/url/url-future.el 1970-01-01 00:00:00 +0000 +++ lisp/url/url-future.el 2011-05-31 10:47:22 +0000 @@ -0,0 +1,126 @@ +;;; url-future.el --- general futures facility for url.el + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Teodor Zlatanov +;; Keywords: data + +;; This file is part of GNU Emacs. +;; +;; GNU Emacs 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 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs 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 GNU Emacs. If not, see . + +;;; Commentary: + +;; Make a url-future (basically a defstruct): +;; (make-url-future :value (lambda () (calculation goes here)) +;; :callback (lambda (future) (use future on success)) +;; :errorback (lambda (future &rest error) (error handler))) + +;; Then either call it with `url-future-call' or cancel it with +;; `url-future-cancel'. Generally the functions will return the +;; future itself, not the value it holds. Also the functions will +;; throw a url-future-already-done error if you try to call or cancel +;; a future more than once. + +;; So, to get the value: +;; (when (url-future-completed-p future) (url-future-value future)) + +;; See the ERT tests and the code for futher details. + +;;; Code: + +(eval-when-compile (require 'cl)) +(eval-when-compile (require 'ert)) + +(defstruct url-future callback errorback status value) + +(defmacro url-future-done-p (url-future) + `(url-future-status ,url-future)) + +(defmacro url-future-completed-p (url-future) + `(eq (url-future-status ,url-future) t)) + +(defmacro url-future-errored-p (url-future) + `(eq (url-future-status ,url-future) 'error)) + +(defmacro url-future-cancelled-p (url-future) + `(eq (url-future-status ,url-future) 'cancel)) + +(defun url-future-finish (url-future &optional status) + (if (url-future-done-p url-future) + (signal 'error 'url-future-already-done) + (setf (url-future-status url-future) (or status t)) + ;; the status must be such that the future was completed + ;; to run the callback + (when (url-future-completed-p url-future) + (funcall (or (url-future-callback url-future) 'ignore) + url-future)) + url-future)) + +(defun url-future-errored (url-future errorcons) + (if (url-future-done-p url-future) + (signal 'error 'url-future-already-done) + (setf (url-future-status url-future) 'error) + (setf (url-future-value url-future) errorcons) + (funcall (or (url-future-errorback url-future) 'ignore) + url-future errorcons))) + +(defun url-future-call (url-future) + (if (url-future-done-p url-future) + (signal 'error 'url-future-already-done) + (let ((ff (url-future-value url-future))) + (when (functionp ff) + (condition-case catcher + (setf (url-future-value url-future) + (funcall ff)) + (error (url-future-errored url-future catcher))) + (url-future-value url-future))) + (if (url-future-errored-p url-future) + url-future + (url-future-finish url-future)))) + +(defun url-future-cancel (url-future) + (if (url-future-done-p url-future) + (signal 'error 'url-future-already-done) + (url-future-finish url-future 'cancel))) + +(ert-deftest url-future-test () + (let* ((text "running future") + (good (make-url-future :value (lambda () (format text)) + :callback (lambda (f) (set 'saver f)))) + (bad (make-url-future :value (lambda () (/ 1 0)) + :errorback (lambda (&rest d) (set 'saver d)))) + (tocancel (make-url-future :value (lambda () (/ 1 0)) + :callback (lambda (f) (set 'saver f)) + :errorback (lambda (&rest d) + (set 'saver d)))) + saver) + (should (equal good (url-future-call good))) + (should (equal good saver)) + (should (equal text (url-future-value good))) + (should (url-future-completed-p good)) + (should-error (url-future-call good)) + (setq saver nil) + (should (equal bad (url-future-call bad))) + (should-error (url-future-call bad)) + (should (equal saver (list bad '(arith-error)))) + (should (url-future-errored-p bad)) + (setq saver nil) + (should (equal (url-future-cancel tocancel) tocancel)) + (should-error (url-future-call tocancel)) + (should (null saver)) + (should (url-future-cancelled-p tocancel)))) + +(provide 'url-future) +;;; url-future.el ends here ------------------------------------------------------------ revno: 104447 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-05-31 10:37:35 +0000 message: gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in ephemeral group. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-30 22:11:52 +0000 +++ lisp/gnus/ChangeLog 2011-05-31 10:37:35 +0000 @@ -1,3 +1,8 @@ +2011-05-31 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in + ephemeral group. + 2011-05-30 Lars Magne Ingebrigtsen * gnus-group.el (gnus-group-mark-article-read): It's possible that we === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-05-30 22:11:52 +0000 +++ lisp/gnus/gnus-sum.el 2011-05-31 10:37:35 +0000 @@ -7194,7 +7194,11 @@ (article-buffer gnus-article-buffer) (mode major-mode) (group-point nil) - (buf (current-buffer))) + (buf (current-buffer)) + ;; `gnus-single-article-buffer' is nil buffer-locally in + ;; ephemeral group of which summary buffer will be killed, + ;; but the global value may be non-nil. + (single-article-buffer gnus-single-article-buffer)) (unless quit-config ;; Do adaptive scoring, and possibly save score files. (when gnus-newsgroup-adaptive @@ -7257,7 +7261,7 @@ (gnus-configure-windows 'group 'force))) ;; If we have several article buffers, we kill them at exit. - (unless gnus-single-article-buffer + (unless single-article-buffer (when (gnus-buffer-live-p article-buffer) (with-current-buffer article-buffer ;; Don't kill sticky article buffers ------------------------------------------------------------ revno: 104446 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-05-31 06:19:08 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2011-05-31 05:34:40 +0000 +++ autogen/config.in 2011-05-31 10:19:08 +0000 @@ -1278,16 +1278,6 @@ /* Turned on June 1996 supposing nobody will mind it. */ #define AMPERSAND_FULL_NAME -/* If using GNU, then support inline function declarations. */ -/* Don't try to switch on inline handling as detected by AC_C_INLINE - generally, because even if non-gcc compilers accept `inline', they - may reject `extern inline'. */ -#if defined (__GNUC__) -#define INLINE __inline__ -#else -#define INLINE -#endif - /* `subprocesses' should be defined if you want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). ------------------------------------------------------------ revno: 104445 committer: Paul Eggert branch nick: trunk timestamp: Mon 2011-05-30 22:38:59 -0700 message: * ccl.c: Improve comment. (Bug#8751) diff: === modified file 'src/ccl.c' --- src/ccl.c 2011-05-31 02:12:01 +0000 +++ src/ccl.c 2011-05-31 05:38:59 +0000 @@ -93,9 +93,8 @@ |------------- constant or other args ----------------| cccccccccccccccccccccccccccc - where `cc...c' is an integer indicating a constant value or an - absolute jump address. The context determines whether `cc...c' is - considered to be unsigned, or a signed two's complement number. `RRR' + where `cc...c' is a 17-bit, 20-bit, or 28-bit integer indicating a + constant value or a relative/absolute jump address, `RRR' and `rrr' are CCL register number, `XXXXX' is one of the following CCL commands. */