Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 104181. ------------------------------------------------------------ revno: 104181 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-05-10 03:14:44 +0000 message: shr.el (shr-put-image-function): New variable. (shr-image-fetched, shr-image-displayer, shr-tag-img): Funcall it. (shr-put-image): Return scaled image. gnus-art.el (gnus-shr-put-image): New function. (gnus-article-prepare-display): Bind shr-put-image-function to it. gnus-html.el (gnus-html-wash-images): Register scaled images, not original ones, as deletable. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-09 22:27:17 +0000 +++ lisp/gnus/ChangeLog 2011-05-10 03:14:44 +0000 @@ -1,3 +1,15 @@ +2011-05-10 Katsumi Yamaoka + + * shr.el (shr-put-image-function): New variable. + (shr-image-fetched, shr-image-displayer, shr-tag-img): Funcall it. + (shr-put-image): Return scaled image. + + * gnus-art.el (gnus-shr-put-image): New function. + (gnus-article-prepare-display): Bind shr-put-image-function to it. + + * gnus-html.el (gnus-html-wash-images): Register scaled images, not + original ones, as deletable. + 2011-05-09 Stefan Monnier * nntp.el (nntp-open-connection): Set TCP keepalive option. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2011-05-02 22:41:38 +0000 +++ lisp/gnus/gnus-art.el 2011-05-10 03:14:44 +0000 @@ -4656,6 +4656,8 @@ (gnus-run-hooks 'gnus-article-prepare-hook) t)))))) +(defvar shr-put-image-function) + ;;;###autoload (defun gnus-article-prepare-display () "Make the current buffer look like a nice article." @@ -4669,6 +4671,7 @@ (setq buffer-read-only nil gnus-article-wash-types nil gnus-article-image-alist nil) + (set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image) (gnus-run-hooks 'gnus-tmp-internal-hook) (when gnus-display-mime-function (funcall gnus-display-mime-function)))) @@ -6139,6 +6142,15 @@ (not gnus-inhibit-hiding)) (gnus-article-hide-headers))) +(declare-function shr-put-image "shr" (data alt)) + +(defun gnus-shr-put-image (data alt) + "Put image DATA with a string ALT. Enable image to be deleted." + (let ((image (shr-put-image data (propertize (or alt "*") + 'gnus-image-category 'shr)))) + (when image + (gnus-add-image 'shr image)))) + ;;; Article savers. (defun gnus-output-to-file (file-name) === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2011-05-02 22:41:38 +0000 +++ lisp/gnus/gnus-html.el 2011-05-10 03:14:44 +0000 @@ -215,16 +215,16 @@ (mm-with-part handle (buffer-string)) nil t)))) (if image - (progn - (gnus-put-image - (gnus-rescale-image - image (gnus-html-maximum-image-size)) - (gnus-string-or (prog1 - (buffer-substring start end) - (delete-region start end)) - "*") - 'cid) - (gnus-add-image 'cid image)) + (gnus-add-image + 'cid + (gnus-put-image + (gnus-rescale-image + image (gnus-html-maximum-image-size)) + (gnus-string-or (prog1 + (buffer-substring start end) + (delete-region start end)) + "*") + 'cid)) (widget-convert-button 'link start end :action 'gnus-html-insert-image === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-05-07 10:41:20 +0000 +++ lisp/gnus/shr.el 2011-05-10 03:14:44 +0000 @@ -87,6 +87,9 @@ This is used for cid: URLs, and the function is called with the cid: URL as the argument.") +(defvar shr-put-image-function 'shr-put-image + "Function called to put image and alt string.") + (defface shr-strike-through '((t (:strike-through t))) "Font for elements." :group 'shr) @@ -500,10 +503,11 @@ (inhibit-read-only t)) (delete-region start end) (goto-char start) - (shr-put-image data alt))))))) + (funcall shr-put-image-function data alt))))))) (kill-buffer (current-buffer))) (defun shr-put-image (data alt) + "Put image DATA with a string ALT. Return image." (if (display-graphic-p) (let ((image (ignore-errors (shr-rescale-image data)))) @@ -513,7 +517,8 @@ (when (and (> (current-column) 0) (> (car (image-size image t)) 400)) (insert "\n")) - (insert-image image (or alt "*")))) + (insert-image image (or alt "*"))) + image) (insert alt))) (defun shr-rescale-image (data) @@ -576,8 +581,8 @@ (substring url (match-end 0))))) (when image (goto-char start) - (shr-put-image image - (buffer-substring-no-properties start end)) + (funcall shr-put-image-function + image (buffer-substring-no-properties start end)) (delete-region (point) end)))) (url-retrieve url 'shr-image-fetched (list (current-buffer) start end) @@ -864,7 +869,7 @@ (if (or (not shr-content-function) (not (setq image (funcall shr-content-function url)))) (insert alt) - (shr-put-image image alt)))) + (funcall shr-put-image-function image alt)))) ((or shr-inhibit-images (and shr-blocked-images (string-match shr-blocked-images url))) @@ -874,7 +879,7 @@ (shr-insert (truncate-string-to-width alt 8)) (shr-insert alt)))) ((url-is-cached (shr-encode-url url)) - (shr-put-image (shr-get-image-data url) alt)) + (funcall shr-put-image-function (shr-get-image-data url) alt)) (t (insert alt) (funcall ------------------------------------------------------------ revno: 104180 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-05-09 19:31:42 -0700 message: Deprecate using "mode:" to enable minor modes (bug#8613) * lisp/files.el (hack-one-local-variable-eval-safep): Consider "eval: (foo-mode)" to be safe. * doc/emacs/custom.texi (Specifying File Variables): Deprecate using mode: for minor modes. * etc/NEWS: Mention this. * lisp/doc-view.el, lisp/net/soap-client.el: Change "mode:" minor-mode file local variables to use "eval:". diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-05-07 01:22:01 +0000 +++ doc/emacs/ChangeLog 2011-05-10 02:31:42 +0000 @@ -1,3 +1,8 @@ +2011-05-10 Glenn Morris + + * custom.texi (Specifying File Variables): + Deprecate using mode: for minor modes. + 2011-05-07 Glenn Morris * cal-xtra.texi (Sexp Diary Entries): Mention diary-hebrew-birthday. === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2011-03-09 15:59:23 +0000 +++ doc/emacs/custom.texi 2011-05-10 02:31:42 +0000 @@ -1085,9 +1085,8 @@ You can specify any number of variable/value pairs in this way, each pair with a colon and semicolon as shown above. The special variable/value pair @code{mode: @var{modename};}, if present, -specifies a major or minor mode; if you use this to specify a major -mode, it should come first in the line. The @var{value}s are used -literally, and not evaluated. +specifies a major mode, and should come first in the line. The +@var{value}s are used literally, and not evaluated. @findex add-file-local-variable-prop-line @findex delete-file-local-variable-prop-line @@ -1186,7 +1185,7 @@ @itemize @item -@code{mode} enables the specified major or minor mode. +@code{mode} enables the specified major mode. @item @code{eval} evaluates the specified Lisp expression (the value @@ -1213,10 +1212,11 @@ You can use the @code{mode} ``variable'' to enable minor modes as well as the major modes; in fact, you can use it more than once, first to set the major mode and then to enable minor modes which are -specific to particular buffers. +specific to particular buffers. Using @code{mode} for minor modes +is deprecated, though---instead, use @code{eval: (minor-mode)}. - Often, however, it is a mistake to enable minor modes this way. -Most minor modes, like Auto Fill mode, represent individual user + Often, however, it is a mistake to enable minor modes in file local +variables. Most minor modes, like Auto Fill mode, represent individual user preferences. If you want to use a minor mode, it is better to set up major mode hooks with your init file to turn that minor mode on for yourself alone (@pxref{Init File}), instead of using a local variable === modified file 'etc/NEWS' --- etc/NEWS 2011-05-08 05:17:17 +0000 +++ etc/NEWS 2011-05-10 02:31:42 +0000 @@ -267,6 +267,10 @@ ** The user option `remote-file-name-inhibit-cache' controls whether the remote file-name cache is used for read access. ++++ +** The use of a "mode: minor" specification in a file local variables section +to enable a minor-mode is deprecated. Instead, use "eval: (minor-mode)". + ** The standalone programs lib-src/digest-doc and sorted-doc have been replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-10 02:22:55 +0000 +++ lisp/ChangeLog 2011-05-10 02:31:42 +0000 @@ -1,4 +1,10 @@ 2011-05-10 Glenn Morris + Stefan Monnier + + * files.el (hack-one-local-variable-eval-safep): + Consider "eval: (foo-mode)" to be safe. (Bug#8613) + +2011-05-10 Glenn Morris * calendar/diary-lib.el (diary-list-entries-hook) (diary-mark-entries-hook, diary-nongregorian-listing-hook) === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2011-04-08 20:09:19 +0000 +++ lisp/doc-view.el 2011-05-10 02:31:42 +0000 @@ -1549,7 +1549,7 @@ (provide 'doc-view) ;; Local Variables: -;; mode: outline-minor +;; eval: (outline-minor-mode) ;; End: ;;; doc-view.el ends here === modified file 'lisp/files.el' --- lisp/files.el 2011-04-24 00:24:30 +0000 +++ lisp/files.el 2011-05-10 02:31:42 +0000 @@ -3327,21 +3327,25 @@ ;; Certain functions can be allowed with safe arguments ;; or can specify verification functions to try. (and (symbolp (car exp)) - (let ((prop (get (car exp) 'safe-local-eval-function))) - (cond ((eq prop t) - (let ((ok t)) - (dolist (arg (cdr exp)) - (unless (hack-one-local-variable-constantp arg) - (setq ok nil))) - ok)) - ((functionp prop) - (funcall prop exp)) - ((listp prop) - (let ((ok nil)) - (dolist (function prop) - (if (funcall function exp) - (setq ok t))) - ok))))))) + ;; Allow (minor)-modes calls with no arguments. + ;; This obsoletes the use of "mode:" for such things. (Bug#8613) + (or (and (null (cdr exp)) + (string-match "-mode\\'" (symbol-name (car exp)))) + (let ((prop (get (car exp) 'safe-local-eval-function))) + (cond ((eq prop t) + (let ((ok t)) + (dolist (arg (cdr exp)) + (unless (hack-one-local-variable-constantp arg) + (setq ok nil))) + ok)) + ((functionp prop) + (funcall prop exp)) + ((listp prop) + (let ((ok nil)) + (dolist (function prop) + (if (funcall function exp) + (setq ok t))) + ok)))))))) (defun hack-one-local-variable (var val) "Set local variable VAR with value VAL. === modified file 'lisp/net/soap-client.el' --- lisp/net/soap-client.el 2011-03-05 10:32:10 +0000 +++ lisp/net/soap-client.el 2011-05-10 02:31:42 +0000 @@ -1745,7 +1745,7 @@ ;;; Local Variables: -;;; mode: outline-minor +;;; eval: (outline-minor-mode) ;;; outline-regexp: ";;;;+" ;;; End: ------------------------------------------------------------ revno: 104179 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-05-09 19:22:55 -0700 message: diary-lib.el doc fixes. * lisp/calendar/diary-lib.el (diary-list-entries-hook) (diary-mark-entries-hook, diary-nongregorian-listing-hook) (diary-nongregorian-marking-hook, diary-list-entries) (diary-include-other-diary-files, diary-mark-entries) (diary-mark-included-diary-files): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-09 23:57:40 +0000 +++ lisp/ChangeLog 2011-05-10 02:22:55 +0000 @@ -1,3 +1,11 @@ +2011-05-10 Glenn Morris + + * calendar/diary-lib.el (diary-list-entries-hook) + (diary-mark-entries-hook, diary-nongregorian-listing-hook) + (diary-nongregorian-marking-hook, diary-list-entries) + (diary-include-other-diary-files, diary-mark-entries) + (diary-mark-included-diary-files): Doc fixes. + 2011-05-09 Juanma Barranquero * misc.el: Require tabulated-list.el during compilation. === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2011-05-07 01:20:47 +0000 +++ lisp/calendar/diary-lib.el 2011-05-10 02:22:55 +0000 @@ -212,7 +212,15 @@ in your `.emacs' file to cause the fancy diary buffer to be displayed with diary entries from various included files, each day's entries sorted into lexicographic order. Note how the sort function is placed last, -so that it can sort the entries included from other files." +so that it can sort the entries included from other files. + +This hook runs after `diary-nongregorian-listing-hook'. These two hooks +differ only if you are using included diary files. In that case, +`diary-nongregorian-listing-hook' runs for each file, whereas +`diary-list-entries-hook' only runs once, for the main diary file. +So for example, to sort the complete list of diary entries you would +use the list-entries hook, whereas to process e.g. Islamic entries in +the main file and all included files, you would use the nongregorian hook." :type 'hook :options '(diary-include-other-diary-files diary-sort-entries) :group 'diary) @@ -224,7 +232,12 @@ "List of functions called after marking diary entries in the calendar. You might wish to add `diary-mark-included-diary-files', in which case you will probably also want to add `diary-include-other-diary-files' to -`diary-list-entries-hook'." +`diary-list-entries-hook'. + +This hook runs after `diary-nongregorian-marking-hook'. These two hooks +differ only if you are using included diary files. In that case, +`diary-nongregorian-marking-hook' runs for each file, whereas +`diary-mark-entries-hook' only runs once, for the main diary file." :type 'hook :options '(diary-mark-included-diary-files) :group 'diary) @@ -238,7 +251,11 @@ to cull relevant entries. You can use any or all of `diary-bahai-list-entries', `diary-hebrew-list-entries', and `diary-islamic-list-entries'. The documentation for these functions -describes the style of such diary entries." +describes the style of such diary entries. + +You can use this hook for other functions as well, if you want them to +be run on the main diary file and any included diary files. Otherwise, +use `diary-list-entries-hook', which runs only for the main diary file." :type 'hook :options '(diary-bahai-list-entries diary-hebrew-list-entries @@ -254,7 +271,11 @@ to cull relevant entries. You can use any or all of `diary-bahai-mark-entries', `diary-hebrew-mark-entries' and `diary-islamic-mark-entries'. The documentation for these functions -describes the style of such diary entries." +describes the style of such diary entries. + +You can use this hook for other functions as well, if you want them to +be run on the main diary file and any included diary files. Otherwise, +use `diary-mark-entries-hook', which runs only for the main diary file." :type 'hook :options '(diary-bahai-mark-entries diary-hebrew-mark-entries @@ -757,12 +778,11 @@ (defvar diary-included-files nil "List of any diary files included in the last call to `diary-list-entries'.") -;; FIXME non-greg and list hooks run same number of times? (defun diary-list-entries (date number &optional list-only) "Create and display a buffer containing the relevant lines in `diary-file'. -The arguments are DATE and NUMBER; the entries selected are those -for NUMBER days starting with date DATE. The other entries are hidden -using overlays. If NUMBER is less than 1, this function does nothing. +Selects entries for NUMBER days starting with date DATE. Hides any +other entries using overlays. If NUMBER is less than 1, this function +does nothing. Returns a list of all relevant diary entries found. The list entries have the form ((MONTH DAY YEAR) STRING SPECIFIER) where @@ -771,30 +791,30 @@ is non-nil, this list includes a dummy diary entry consisting of the empty string for a date with no diary entries. -If entries are being produced for multiple dates (i.e., NUMBER > 1), -then this function normally returns the entries from any given -diary file in date order. The entries for any given day are in -the order in which they were found in the file, not necessarily -in time-of-day order. Note that any functions present on the +If producing entries for multiple dates (i.e., NUMBER > 1), then +this function normally returns the entries from any given diary +file in date order. The entries for any given day are in the +order in which they were found in the file, not necessarily in +time-of-day order. Note that any functions present on the hooks (see below) may add entries, or change the order. For example, `diary-include-other-diary-files' adds entries from any include files that it finds to the end of the original list. The entries from each file will be in date order, but the overall -list will not be. If you want the entire list to be in time order, -add `diary-sort-entries' to the end of `diary-list-entries-hook'. - -After the initial list is prepared, the following hooks are run: - - `diary-nongregorian-listing-hook' can cull dates from the diary - and each included file, for example to process Islamic diary - entries. Applied to *each* file. - - `diary-list-entries-hook' adds or manipulates diary entries from - external sources. Used, for example, to include diary entries - from other files or to sort the diary entries. Invoked *once* - only, before the display hook is run. - - `diary-hook' is run last, after the diary is displayed. +list will not be. If you want the entire list to be in time +order, add `diary-sort-entries' to the end of `diary-list-entries-hook'. + +After preparing the initial list, hooks run in this order: + + `diary-nongregorian-listing-hook' runs for the main diary file, + and each included file. For example, this is the appropriate hook + to process Islamic entries in all diary files. + + `diary-list-entries-hook' runs once only, for the main diary file. + For example, this is appropriate for sorting all the entries. + If not using include files, there is no difference from the previous + hook. + + `diary-hook' runs last, after the diary is displayed. This is used e.g. by `appt-check'. Functions called by these hooks may use the variables ORIGINAL-DATE @@ -867,8 +887,17 @@ (calendar-gregorian-from-absolute (1+ (calendar-absolute-from-gregorian date))))))) (goto-char (point-min)) + ;; Although it looks like list-entries-hook runs + ;; every time, diary-include-other-diary-files + ;; binds it to nil (essentially) when it runs + ;; in included files. (run-hooks 'diary-nongregorian-listing-hook 'diary-list-entries-hook) + ;; We could make this explicit: + ;;; (run-hooks 'diary-nongregorian-listing-hook) + ;;; (if d-incp + ;;; (diary-include-other-diary-files) ; recurse + ;;; (run-hooks 'diary-list-entries-hook)) (unless list-only (if (and diary-display-function (listp diary-display-function)) @@ -893,14 +922,13 @@ ;(defvar number) ; already declared above (defun diary-include-other-diary-files () - "Include the diary entries from other diary files with those of `diary-file'. -This function is suitable for use with `diary-list-entries-hook'; -it enables you to use shared diary files together with your own. -The files included are specified in the `diary-file' by lines of this form: - #include \"filename\" -This is recursive; that is, #include directives in diary files thus included -are obeyed. You can change the `#include' to some other string by changing -the variable `diary-include-string'." + "Add diary entries from included diary files to `diary-entries-list'. +For example, this enables you to share common diary files. +To use, add this function to `diary-list-entries-hook'. +Specify include files using lines matching `diary-include-string', e.g. + #include \"filename\" +This is recursive; that is, included files may include other files. +See also `diary-mark-included-diary-files'." (goto-char (point-min)) (while (re-search-forward (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) @@ -1350,13 +1378,18 @@ ;;;###cal-autoload (defun diary-mark-entries (&optional redraw) "Mark days in the calendar window that have diary entries. -Each entry in the diary file visible in the calendar window is -marked. After the entries are marked, the hooks -`diary-nongregorian-marking-hook' and `diary-mark-entries-hook' -are run. If the optional argument REDRAW is non-nil (which is -the case interactively, for example) then any existing diary -marks are first removed. This is intended to deal with deleted -diary entries." +Marks each entry in the diary that is visible in the calendar window. + +After marking the entries, runs `diary-nongregorian-marking-hook' +for the main diary file, and each included file. For example, +this is the appropriate hook to process Islamic entries in all +diary files. Next `diary-mark-entries-hook' runs, for the main diary +file only. If not using include files, there is no difference between +these two hooks. + +If the optional argument REDRAW is non-nil (which is the case +interactively, for example) then this first removes any existing diary +marks. This is intended to deal with deleted diary entries." (interactive "p") ;; To remove any deleted diary entries. Do not redraw when: ;; i) processing #include diary files (else only get the marks from @@ -1378,6 +1411,9 @@ (with-syntax-table diary-syntax-table (diary-mark-entries-1 'calendar-mark-date-pattern) (diary-mark-sexp-entries) + ;; Although it looks like mark-entries-hook runs every time, + ;; diary-mark-included-diary-files binds it to nil + ;; (essentially) when it runs in included files. (run-hooks 'diary-nongregorian-marking-hook 'diary-mark-entries-hook)) (message "Marking diary entries...done"))))) @@ -1463,14 +1499,13 @@ 'diary-mark-sexp-entries "23.1") (defun diary-mark-included-diary-files () - "Mark the diary entries from other diary files with those of the diary file. -This function is suitable for use with `diary-mark-entries-hook'; it enables -you to use shared diary files together with your own. The files included are -specified in the `diary-file' by lines of this form: - #include \"filename\" -This is recursive; that is, #include directives in diary files thus included -are obeyed. You can change the `#include' to some other string by changing -the variable `diary-include-string'." + "Mark diary entries from included diary files. +For example, this enables you to share common diary files. +To use, add this function to `diary-mark-entries-hook'. +Specify include files using lines matching `diary-include-string', e.g. + #include \"filename\" +This is recursive; that is, included files may include other files. +See also `diary-include-other-diary-files'." (goto-char (point-min)) (while (re-search-forward (format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string)) ------------------------------------------------------------ revno: 104178 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-05-10 01:57:40 +0200 message: lisp/misc.el: Require tabulated-list.el during compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-09 19:42:45 +0000 +++ lisp/ChangeLog 2011-05-09 23:57:40 +0000 @@ -1,3 +1,7 @@ +2011-05-09 Juanma Barranquero + + * misc.el: Require tabulated-list.el during compilation. + 2011-05-09 Chong Yidong * progmodes/compile.el (compilation-start): Run === modified file 'lisp/misc.el' --- lisp/misc.el 2011-05-09 15:52:57 +0000 +++ lisp/misc.el 2011-05-09 23:57:40 +0000 @@ -25,6 +25,9 @@ ;;; Code: +(eval-when-compile + (require 'tabulated-list)) + (defun copy-from-above-command (&optional arg) "Copy characters from previous nonblank line, starting just above point. Copy ARG characters, but not past the end of that line. @@ -182,7 +185,6 @@ (display-buffer buffer) nil) - (provide 'misc) ;;; misc.el ends here ------------------------------------------------------------ revno: 104177 committer: Juri Linkov branch nick: trunk timestamp: Tue 2011-05-10 03:21:32 +0400 message: * test/automated/occur-tests.el: Move from test/occur-testsuite.el. Convert to ERT. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2011-05-09 01:22:05 +0000 +++ test/ChangeLog 2011-05-09 23:21:32 +0000 @@ -1,3 +1,8 @@ +2011-05-09 Juri Linkov + + * automated/occur-tests.el: Move from test/occur-testsuite.el. + Convert to ERT. + 2011-05-09 Chong Yidong * automated/compile-tests.el: New file. === renamed file 'test/occur-testsuite.el' => 'test/automated/occur-tests.el' --- test/occur-testsuite.el 2011-01-25 04:08:28 +0000 +++ test/automated/occur-tests.el 2011-05-09 23:21:32 +0000 @@ -1,4 +1,4 @@ -;;; occur-testsuite.el --- Test suite for occur. +;;; occur-tests.el --- Test suite for occur. ;; Copyright (C) 2010-2011 Free Software Foundation, Inc. @@ -20,12 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;; Commentary: - -;; Type M-x test-occur RET to test the functionality of `occur'. - ;;; Code: +(require 'ert) + (defconst occur-tests '( ;; * Test one-line matches (at bob, eob, bol, eol). @@ -37,7 +35,7 @@ xex fx " "\ -5 matches for \"x\" in buffer: *temp* +5 matches for \"x\" in buffer: *temp*<2> 1:xa 3:cx 4:xd @@ -54,7 +52,7 @@ a a " "\ -2 matches for \"a^Ja\" in buffer: *temp* +2 matches for \"a^Ja\" in buffer: *temp*<2> 1:a :a 3:a @@ -70,7 +68,7 @@ a b " "\ -2 matches for \"a^Jb\" in buffer: *temp* +2 matches for \"a^Jb\" in buffer: *temp*<2> 1:a :b 4:a @@ -84,7 +82,7 @@ a " "\ -2 matches for \"a^J\" in buffer: *temp* +2 matches for \"a^J\" in buffer: *temp*<2> 1:a : 4:a @@ -99,7 +97,7 @@ ex fx " "\ -2 matches for \"x^J.x^J\" in buffer: *temp* +2 matches for \"x^J.x^J\" in buffer: *temp*<2> 1:ax :bx :c @@ -118,7 +116,7 @@ g hx " "\ -3 matches for \"x\" in buffer: *temp* +3 matches for \"x\" in buffer: *temp*<2> 1:ax :b ------- @@ -138,7 +136,7 @@ ex f " "\ -2 matches for \"x\" in buffer: *temp* +2 matches for \"x\" in buffer: *temp*<2> :a 2:bx :c @@ -161,7 +159,7 @@ j kx " "\ -5 matches for \"x\" in buffer: *temp* +5 matches for \"x\" in buffer: *temp*<2> 1:ax 2:bx :c @@ -186,7 +184,7 @@ h i " "\ -2 matches for \"x\" in buffer: *temp* +2 matches for \"x\" in buffer: *temp*<2> :a :b 3:cx @@ -209,7 +207,7 @@ h " "\ -2 matches for \"x\" in buffer: *temp* +2 matches for \"x\" in buffer: *temp*<2> : :b 3:cx @@ -234,7 +232,7 @@ jx kx " "\ -3 matches for \"x^J.x\" in buffer: *temp* +3 matches for \"x^J.x\" in buffer: *temp*<2> 1:ax :bx :c @@ -258,7 +256,7 @@ gx hx " "\ -2 matches for \"x^J.x\" in buffer: *temp* +2 matches for \"x^J.x\" in buffer: *temp*<2> 1:ax :bx :c @@ -281,7 +279,7 @@ h ix " "\ -3 matches for \"x\" in buffer: *temp* +3 matches for \"x\" in buffer: *temp*<2> :a 2:bx ------- @@ -304,7 +302,7 @@ gx h " "\ -3 matches for \"x\" in buffer: *temp* +3 matches for \"x\" in buffer: *temp*<2> :a 2:bx :c @@ -319,29 +317,26 @@ Each element has the format: \(REGEXP NLINES INPUT-BUFFER-STRING OUTPUT-BUFFER-STRING).") -(defun test-occur () - (interactive) - (let ((count 1) - failed - (occur-hook nil)) +(defun occur-test-case (test) + (let ((regexp (nth 0 test)) + (nlines (nth 1 test)) + (input-buffer-string (nth 2 test)) + (output-buffer-string (nth 3 test))) + (save-window-excursion + (with-temp-buffer + (insert input-buffer-string) + (occur regexp nlines) + (equal output-buffer-string + (with-current-buffer "*Occur*" + (buffer-string))))))) + +(ert-deftest occur-tests () + "Test the functionality of `occur'. +The test data is in the `occur-tests' constant." + (let ((occur-hook nil)) (dolist (test occur-tests) - (let ((regexp (nth 0 test)) - (nlines (nth 1 test)) - (input-buffer-string (nth 2 test)) - (output-buffer-string (nth 3 test))) - (save-excursion - (with-temp-buffer - (insert input-buffer-string) - (occur regexp nlines) - (unless (equal output-buffer-string - (with-current-buffer "*Occur*" - (buffer-string))) - (setq failed (cons count failed)))))) - (setq count (1+ count))) - (if failed - (message "FAILED TESTS: %S" (reverse failed)) - (message "SUCCESS")))) - -(provide 'occur-testsuite) - -;;; occur-testsuite.el ends here + (should (occur-test-case test))))) + +(provide 'occur-tests) + +;;; occur-tests.el ends here ------------------------------------------------------------ revno: 104176 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-05-09 22:27:17 +0000 message: registry.el (registry-full): Add convenience method. Fix logic. (registry-insert): Use it. Fix logic here too. gnus-registry.el (gnus-registry-insert): Add wrapper that calls `registry-prune' if `registry-full' returns t. (gnus-registry-handle-action, gnus-registry-get-or-make-entry, gnus-registry-set-id-key, gnus-registry-usage-test): Use it. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-09 19:41:14 +0000 +++ lisp/gnus/ChangeLog 2011-05-09 22:27:17 +0000 @@ -2,6 +2,17 @@ * nntp.el (nntp-open-connection): Set TCP keepalive option. +2011-05-09 Teodor Zlatanov + + * registry.el (registry-full): Add convenience method. Fix logic. + (registry-insert): Use it. Fix logic here too. + + * gnus-registry.el (gnus-registry-insert): Add wrapper that calls + `registry-prune' if `registry-full' returns t. + (gnus-registry-handle-action) + (gnus-registry-get-or-make-entry, gnus-registry-set-id-key) + (gnus-registry-usage-test): Use it. + 2011-05-07 Julien Danjou * shr.el (shr-link): Make shr-link inherit from link by default. === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-25 04:32:07 +0000 +++ lisp/gnus/gnus-registry.el 2011-05-09 22:27:17 +0000 @@ -383,7 +383,7 @@ (gnus-message 10 "Gnus registry: new entry for %s is %S" id entry) - (registry-insert db id entry))) + (gnus-registry-insert db id entry))) ;; Function for nn{mail|imap}-split-fancy: look up all references in ;; the cache and if a match is found, return that group. @@ -962,8 +962,8 @@ (entries (registry-lookup db (list id)))) (when (null entries) - (registry-insert db id (list (list 'creation-time (current-time)) - '(group) '(sender) '(subject))) + (gnus-registry-insert db id (list (list 'creation-time (current-time)) + '(group) '(sender) '(subject))) (setq entries (registry-lookup db (list id)))) (nth 1 (assoc id entries)))) @@ -979,9 +979,17 @@ (entry (gnus-registry-get-or-make-entry id))) (registry-delete db (list id) nil) (setq entry (cons (cons key vals) (assq-delete-all key entry))) - (registry-insert db id entry) + (gnus-registry-insert db id entry) entry)) +(defun gnus-registry-insert (db id entry) + "Just like `registry-insert' but tries to prune on error." + (when (registry-full db) + (message "Trying to prune the registry because it's full") + (registry-prune db)) + (registry-insert db id entry) + entry) + (defun gnus-registry-import-eld (file) (interactive "fOld registry file to import? ") ;; example content: @@ -1075,7 +1083,7 @@ (should (equal (gnus-registry-get-id-key "34" 'group) '("togroup"))) (should (equal (gnus-registry-get-id-key "34" 'subject) '("subject 4"))) (message "Trying to insert a duplicate key") - (should-error (registry-insert db "55" '())) + (should-error (gnus-registry-insert db "55" '())) (message "Looking up individual keys (gnus-registry-get-or-make-entry)") (should (gnus-registry-get-or-make-entry "22")) (message "Saving the Gnus registry to %s" tempfile) === modified file 'lisp/gnus/registry.el' --- lisp/gnus/registry.el 2011-05-04 11:28:46 +0000 +++ lisp/gnus/registry.el 2011-05-09 22:27:17 +0000 @@ -261,6 +261,11 @@ (remhash key data))) keys)) + (defmethod registry-full ((db registry-db)) + "Checks if registry-db THIS is full." + (>= (registry-size db) + (oref db :max-hard))) + (defmethod registry-insert ((db registry-db) key entry) "Insert ENTRY under KEY into the registry-db THIS. Updates the secondary ('tracked') indices as well. @@ -269,8 +274,7 @@ (assert (not (gethash key (oref db :data))) nil "Key already exists in database") - (assert (< (registry-size db) - (oref db :max-hard)) + (assert (not (registry-full db)) nil "registry max-hard size limit reached") ------------------------------------------------------------ revno: 104175 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-05-09 15:42:45 -0400 message: Call compilation-filter-hook in the no-async case too. * progmodes/compile.el (compilation-start): Run compilation-filter-hook for the async case too. (compilation-filter-hook): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-09 17:50:47 +0000 +++ lisp/ChangeLog 2011-05-09 19:42:45 +0000 @@ -1,3 +1,9 @@ +2011-05-09 Chong Yidong + + * progmodes/compile.el (compilation-start): Run + compilation-filter-hook for the async case too. + (compilation-filter-hook): Doc fix. + 2011-05-09 Deniz Dogan * wdired.el: Remove outdated installation comment. Fix usage === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-05-09 01:24:00 +0000 +++ lisp/progmodes/compile.el 2011-05-09 19:42:45 +0000 @@ -68,7 +68,10 @@ "Hook run after `compilation-filter' has inserted a string into the buffer. It is called with the variable `compilation-filter-start' bound to the position of the start of the inserted text, and point at -its end.") +its end. + +If Emacs lacks asynchronous process support, this hook is run +after `call-process' inserts the grep output into the buffer.") (defvar compilation-filter-start nil "Start of the text inserted by `compilation-filter'. @@ -1629,8 +1632,10 @@ ;; regardless of where the user sees point. (goto-char (point-max)) (let* ((inhibit-read-only t) ; call-process needs to modify outbuf + (compilation-filter-start (point)) (status (call-process shell-file-name nil outbuf nil "-c" command))) + (run-hooks 'compilation-filter-hook) (cond ((numberp status) (compilation-handle-exit 'exit status ------------------------------------------------------------ revno: 104174 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-05-09 16:41:14 -0300 message: * lisp/gnus/nntp.el (nntp-open-connection): Set TCP keepalive option. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-07 10:41:20 +0000 +++ lisp/gnus/ChangeLog 2011-05-09 19:41:14 +0000 @@ -1,3 +1,7 @@ +2011-05-09 Stefan Monnier + + * nntp.el (nntp-open-connection): Set TCP keepalive option. + 2011-05-07 Julien Danjou * shr.el (shr-link): Make shr-link inherit from link by default. @@ -28,8 +32,8 @@ 2011-05-02 Lars Magne Ingebrigtsen - * gnus-html.el (gnus-html-schedule-image-fetching): Use - url-queue-retrieve, if it exists. + * gnus-html.el (gnus-html-schedule-image-fetching): + Use url-queue-retrieve, if it exists. * shr.el (shr-tag-img): Ditto. @@ -43,7 +47,7 @@ * gnus-agent.el (gnus-agent-store-article): New function. - * nnheader.el (nnheader-insert-buffer-substring): Renamed from nntp- + * nnheader.el (nnheader-insert-buffer-substring): Rename from nntp- and moved from that file for reuse. * pop3.el (pop3-open-server): Error messages are "-ERR". @@ -115,8 +119,8 @@ the gnus-extra-headers. (gnus-registry-ignored-groups): Adjust defaults to match the parameter. (gnus-registry-ignore-group-p): Adjust to take either a group/topic - parameter list or a string list in `gnus-registry-ignored-groups'. Fix - logic error. + parameter list or a string list in `gnus-registry-ignored-groups'. + Fix logic error. 2011-04-21 Lars Magne Ingebrigtsen @@ -222,7 +226,7 @@ * gnus-registry.el (gnus-registry-remake-db): Put the warning on a "warning" level. - * mm-url.el (mm-url-package-name): Removed to ease third-party reuse. + * mm-url.el (mm-url-package-name): Remove to ease third-party reuse. (mm-url-insert-file-contents): Don't set the package names. 2011-04-11 Teodor Zlatanov @@ -305,10 +309,10 @@ save/read cycles. (gnus-registry-read): Use it. (gnus-registry-make-db): Use it. - (gnus-registry-spool-action, gnus-registry-handle-action): Fix - messaging. - (gnus-registry--split-fancy-with-parent-internal): Fix loop. Map - references to actual group names with sender and subject tracking. + (gnus-registry-spool-action, gnus-registry-handle-action): + Fix messaging. + (gnus-registry--split-fancy-with-parent-internal): Fix loop. + Map references to actual group names with sender and subject tracking. (gnus-registry-post-process-groups): Use `cond' for better messaging. (gnus-registry-usage-test): Add subject lookup test. @@ -370,8 +374,8 @@ value. * nntp.el (nntp-open-connection-function): Document the fact that some - values are not functions but are instead handled specially. Recognize - nntp-open-plain-stream value. + values are not functions but are instead handled specially. + Recognize nntp-open-plain-stream value. (nntp-open-connection): Recognize that value. 2011-03-29 Lars Magne Ingebrigtsen @@ -396,7 +400,7 @@ * gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not downloading anything. - * gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'. + * gnus.el (gnus-splash-svg-color-symbols): Remove superfluous `and'. 2011-03-29 Adam Sjøgren @@ -409,13 +413,13 @@ * gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly instead of using the global gnus-simplify-subject-fuzzy-regexp. (gnus-simplify-subject-fuzzy): Use the local - gnus-simplify-subject-fuzzy-regex instead of the global one. This - makes using this variable in group parameters work. + gnus-simplify-subject-fuzzy-regex instead of the global one. + This makes using this variable in group parameters work. 2011-03-29 Teodor Zlatanov - * gnus-registry.el (gnus-registry-unfollowed-groups): Add - "archive:sent" to the unfollowed group regex (for the recent Gnus + * gnus-registry.el (gnus-registry-unfollowed-groups): + Add "archive:sent" to the unfollowed group regex (for the recent Gnus archive:sent-YYYY-MM-DD groups). (gnus-registry-split-fancy-with-parent): Bail out early in sender tracking if there are more than `gnus-registry-max-track-groups' @@ -445,7 +449,7 @@ Handle the no-parameter case exactly as open-network-stream, with no additional stream processing. Search plists using plist-get. Explicitly add :end-of-commend parameter if it is missing. - (proto-stream-open-default): Renamed from + (proto-stream-open-default): Rename from proto-stream-open-network-only. Return 'default as the type. (proto-stream-open-starttls): Rename from proto-stream-open-network. Use plist-get. Don't return `tls' as the type if STARTTLS negotiation @@ -526,15 +530,15 @@ * mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are inline. - * gnus-art.el (article-hide-list-identifiers): Use - gnus-group-get-list-identifiers. + * gnus-art.el (article-hide-list-identifiers): + Use gnus-group-get-list-identifiers. * gnus-sum.el (gnus-group-get-list-identifiers): New function. - (gnus-summary-remove-list-identifiers): Use - gnus-group-get-list-identifiers to get regexp. + (gnus-summary-remove-list-identifiers): + Use gnus-group-get-list-identifiers to get regexp. (gnus-select-newsgroup, gnus-summary-insert-subject) - (gnus-summary-insert-articles): Call - gnus-summary-remove-list-identifiers unconditionally. + (gnus-summary-insert-articles): + Call gnus-summary-remove-list-identifiers unconditionally. 2011-03-15 Lars Magne Ingebrigtsen === modified file 'lisp/gnus/nntp.el' --- lisp/gnus/nntp.el 2011-05-02 03:37:06 +0000 +++ lisp/gnus/nntp.el 2011-05-09 19:41:14 +0000 @@ -1362,6 +1362,11 @@ (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) process) + (when (and (fboundp 'set-network-process-option) + (eq (process-type process) 'network)) + ;; Use TCP-keepalive so that connections that pass through a NAT router + ;; don't hang when left idle. + (set-network-process-option process :keepalive t)) (gnus-set-process-query-on-exit-flag process nil) (if (and (nntp-wait-for process "^2.*\n" buffer nil t) (memq (process-status process) '(open run))) ------------------------------------------------------------ revno: 104173 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Mon 2011-05-09 19:50:47 +0200 message: Add forgotten ChangeLog entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-09 15:52:57 +0000 +++ lisp/ChangeLog 2011-05-09 17:50:47 +0000 @@ -1,3 +1,8 @@ +2011-05-09 Deniz Dogan + + * wdired.el: Remove outdated installation comment. Fix usage + comment. + 2011-05-09 Juanma Barranquero * misc.el: Implement new command `list-dynamic-libraries'. ------------------------------------------------------------ revno: 104172 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Mon 2011-05-09 19:47:01 +0200 message: * lisp/wdired.el: Remove outdated installation comment. Fix usage comment. diff: === modified file 'lisp/wdired.el' --- lisp/wdired.el 2011-04-19 13:44:55 +0000 +++ lisp/wdired.el 2011-05-09 17:47:01 +0000 @@ -58,39 +58,13 @@ ;; ;; - To mark files for deletion, by deleting their whole filename. -;;; Installation: - -;; Add this file (byte-compiling it is recommended) to your load-path. -;; Then add one of these set of lines (or similar ones) to your config: -;; -;; This is the easy way: -;; -;; (require 'wdired) -;; (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) -;; -;; This is the recommended way for faster Emacs startup time and lower -;; memory consumption: -;; -;; (autoload 'wdired-change-to-wdired-mode "wdired") -;; (eval-after-load "dired" -;; '(lambda () -;; (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) -;; (define-key dired-mode-map -;; [menu-bar immediate wdired-change-to-wdired-mode] -;; '("Edit File Names" . wdired-change-to-wdired-mode)))) -;; -;; Type "M-x customize-group RET wdired" if you want to make changes -;; to the default behavior. - ;;; Usage: -;; Then, you can start editing the names of the files by typing "r" -;; (or whatever key you choose, or M-x wdired-change-to-wdired-mode). -;; Use C-c C-c when finished or C-c C-k to abort. You can use also the -;; menu options: in dired mode, "Edit File Names" under "Immediate". -;; While editing the names, a new submenu "WDired" is available at top -;; level. You can customize the behavior of this package from this -;; menu. +;; You can edit the names of the files by typing C-x C-q or by +;; executing M-x wdired-change-to-wdired-mode. Use C-c C-c when +;; finished or C-c C-k to abort. While editing filenames, a new +;; submenu "WDired" is available at top level. You can customize the +;; behavior of this package from this menu. ;;; Change Log: ------------------------------------------------------------ revno: 104171 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-05-09 17:52:57 +0200 message: lisp/misc.el: Implement new command `list-dynamic-libraries'. * misc.el (list-dynamic-libraries--loaded-only-p): New variable. (list-dynamic-libraries--refresh): New function. (list-dynamic-libraries): New command. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-09 01:24:00 +0000 +++ lisp/ChangeLog 2011-05-09 15:52:57 +0000 @@ -1,3 +1,10 @@ +2011-05-09 Juanma Barranquero + + * misc.el: Implement new command `list-dynamic-libraries'. + (list-dynamic-libraries--loaded-only-p): New variable. + (list-dynamic-libraries--refresh): New function. + (list-dynamic-libraries): New command. + 2011-05-09 Chong Yidong * progmodes/compile.el (compilation-error-regexp-alist-alist): Fix === modified file 'lisp/misc.el' --- lisp/misc.el 2011-01-25 04:08:28 +0000 +++ lisp/misc.el 2011-05-09 15:52:57 +0000 @@ -1,4 +1,4 @@ -;;; misc.el --- some nonstandard basic editing commands for Emacs +;;; misc.el --- some nonstandard editing and utility commands for Emacs ;; Copyright (C) 1989, 2001-2011 Free Software Foundation, Inc. @@ -129,6 +129,60 @@ (message "Well, then go to xkcd.com!") (browse-url "http://xkcd.com/378/"))) +;; A command to list dynamically loaded libraries. This useful in +;; environments where dynamic-library-alist is used, i.e., Windows + +(defvar list-dynamic-libraries--loaded-only-p) +(make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) + +(defun list-dynamic-libraries--refresh () + "Recompute the list of dynamic libraries. +Internal use only." + (setq tabulated-list-format ; recomputed because column widths can change + (let ((max-id-len 0) (max-name-len 0)) + (dolist (lib dynamic-library-alist) + (let ((id-len (length (symbol-name (car lib)))) + (name-len (apply 'max (mapcar 'length (cdr lib))))) + (when (> id-len max-id-len) (setq max-id-len id-len)) + (when (> name-len max-name-len) (setq max-name-len name-len)))) + (vector (list "Library" (1+ max-id-len) t) + (list "Loaded from" (1+ max-name-len) t) + (list "Candidate names" 0 t)))) + (setq tabulated-list-entries nil) + (dolist (lib dynamic-library-alist) + (let* ((id (car lib)) + (from (get id :loaded-from))) + (when (or from + (not list-dynamic-libraries--loaded-only-p)) + (push (list id (vector (symbol-name id) + (or from "") + (mapconcat 'identity (cdr lib) ", "))) + tabulated-list-entries))))) + +;;;###autoload +(defun list-dynamic-libraries (&optional loaded-only-p buffer) + "Display a list of all dynamic libraries known to Emacs. +\(These are the libraries listed in `dynamic-library-alist'.) +If optional argument LOADED-ONLY-P (interactively, prefix arg) +is non-nil, only libraries already loaded are listed. +Optional argument BUFFER specifies a buffer to use, instead of +\"*Dynamic Libraries*\". +The return value is always nil." + (interactive "P") + (unless (bufferp buffer) + (setq buffer (get-buffer-create "*Dynamic Libraries*"))) + (with-current-buffer buffer + (tabulated-list-mode) + (setq tabulated-list-sort-key (cons "Library" nil)) + (add-hook 'tabulated-list-revert-hook 'list-dynamic-libraries--refresh nil t) + (tabulated-list-init-header) + (setq list-dynamic-libraries--loaded-only-p loaded-only-p) + (list-dynamic-libraries--refresh) + (tabulated-list-print)) + (display-buffer buffer) + nil) + + (provide 'misc) ;;; misc.el ends here ------------------------------------------------------------ revno: 104170 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-05-09 16:35:56 +0300 message: Define a replacement for va_copy for MSVC. nt/config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-05-07 04:00:12 +0000 +++ nt/ChangeLog 2011-05-09 13:35:56 +0000 @@ -1,3 +1,7 @@ +2011-05-09 Eli Zaretskii + + * config.nt [_MSC_VER] (va_copy): Replacement for the MS compiler. + 2011-05-07 Ben Key * configure.bat: Renamed the fusercflags variable to escusercflags === modified file 'nt/config.nt' --- nt/config.nt 2011-05-06 05:55:01 +0000 +++ nt/config.nt 2011-05-09 13:35:56 +0000 @@ -337,6 +337,17 @@ # define restrict #endif +/* A va_copy replacement for MSVC. */ +#ifdef _MSC_VER +# ifdef _WIN64 +# ifndef va_copy +# error "va_copy is needed, but not defined!" +# endif +# else /* not _WIN64 */ +# define va_copy(d,s) ((d) = (s)) +# endif /* not _WIN64 */ +#endif /* _MSC_VER */ + /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ ------------------------------------------------------------ revno: 104169 committer: Andreas Schwab branch nick: emacs timestamp: Mon 2011-05-09 13:29:51 +0200 message: * w32menu.c (set_frame_menubar): Fix submenu allocation. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-07 15:44:19 +0000 +++ src/ChangeLog 2011-05-09 11:29:51 +0000 @@ -1,3 +1,7 @@ +2011-05-09 Andreas Schwab + + * w32menu.c (set_frame_menubar): Fix submenu allocation. + 2011-05-07 Eli Zaretskii * w32console.c (Fset_screen_color): Doc fix. === modified file 'src/w32menu.c' --- src/w32menu.c 2011-04-25 21:34:39 +0000 +++ src/w32menu.c 2011-05-09 11:29:51 +0000 @@ -427,11 +427,10 @@ menu_items = f->menu_bar_vector; menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; - submenu_start = (int *) alloca (ASIZE (items) * sizeof (int *)); - submenu_end = (int *) alloca (ASIZE (items) * sizeof (int *)); + submenu_start = (int *) alloca (ASIZE (items) * sizeof (int)); + submenu_end = (int *) alloca (ASIZE (items) * sizeof (int)); submenu_n_panes = (int *) alloca (ASIZE (items) * sizeof (int)); - submenu_top_level_items - = (int *) alloca (ASIZE (items) * sizeof (int *)); + submenu_top_level_items = (int *) alloca (ASIZE (items) * sizeof (int)); init_menu_items (); for (i = 0; i < ASIZE (items); i += 4) { ------------------------------------------------------------ revno: 104168 committer: Ted Zlatanov branch nick: quickfixes timestamp: Mon 2011-05-09 05:40:26 -0500 message: * configure.in: Require GnuTLS 2.6.x or higher. diff: === modified file 'ChangeLog' --- ChangeLog 2011-05-06 07:13:19 +0000 +++ ChangeLog 2011-05-09 10:40:26 +0000 @@ -1,3 +1,7 @@ +2011-05-09 Teodor Zlatanov + + * configure.in: Require GnuTLS 2.6.x or higher. + 2011-05-06 Paul Eggert Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux. === modified file 'configure.in' --- configure.in 2011-04-29 07:55:57 +0000 +++ configure.in 2011-05-09 10:40:26 +0000 @@ -1977,7 +1977,7 @@ HAVE_GNUTLS=no HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no if test "${with_gnutls}" = "yes" ; then - PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.0], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) if test "${HAVE_GNUTLS}" = "yes"; then AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) fi @@ -3683,7 +3683,7 @@ echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" -echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" +echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" ------------------------------------------------------------ revno: 104167 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-05-08 21:25:35 -0400 message: Fix last change. diff: === modified file 'etc/compilation.txt' --- etc/compilation.txt 2011-05-09 01:24:57 +0000 +++ etc/compilation.txt 2011-05-09 01:25:35 +0000 @@ -47,7 +47,7 @@ The regexps found on http://ant.apache.org/faq.html, and since integrated in both Emacsen, were hairy. The extra two numbers for -jikes are the ending line and ending column, which we don't use. +jikes are the ending line and ending column. [javac] /src/DataBaseTestCase.java:27: unreported exception ... [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally