commit b884ff380dc341ca8dc8fcfe4357110e191216ce (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sun Apr 5 23:40:54 2015 -0700 Spelling fix for 'hfy-optimizations' * htmlfontify.el (hfy-optimizations): Rename from hfy-optimisations, with an obsolete alias. All uses changed. diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi index 6579cd6..8140b43 100644 --- a/doc/misc/htmlfontify.texi +++ b/doc/misc/htmlfontify.texi @@ -840,7 +840,7 @@ See @ref{hfy-display-class} for details of valid values for @var{class}. @end lisp Find face in effect at point P@. If overlays are to be considered -(see @ref{hfy-optimisations}) then this may return a @code{defface} style +(see @ref{hfy-optimizations}) then this may return a @code{defface} style list of face properties instead of a face symbol. @item hfy-bgcol @@ -950,7 +950,7 @@ Is @var{srcdir}/@var{file} text? Uses @ref{hfy-istext-command} to determine thi (hfy-opt @var{symbol}) @end lisp -Is @ref{hfy-optimisations} member @var{symbol} set or not? +Is @ref{hfy-optimizations} member @var{symbol} set or not? @item hfy-dirname @findex hfy-dirname @@ -1395,9 +1395,9 @@ for the more complex shell interactions needed by Htmlfontify. Currently this is only required/used when using GNU etags, see @ref{hfy-etags-cmd-alist} for details. -@item hfy-optimisations -@vindex hfy-optimisations -@anchor{hfy-optimisations} +@item hfy-optimizations +@vindex hfy-optimizations +@anchor{hfy-optimizations} Optimizations to turn on. So far, the following have been implemented: diff --git a/etc/NEWS b/etc/NEWS index 6de8f03..cc3c6d1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -756,6 +756,12 @@ integers. ** New function `set-binary-mode' allows to switch a standard stream of the Emacs process to binary I/O mode. +** Miscellaneous name change + +For consistency with the usual Emacs spelling, the Lisp variable +`hfy-optimisations' has been renamed to `hfy-optimizations'. +The old name should still work, as an obsolescent alias. + * Changes in Frames and Windows Code in Emacs 25.1 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c7d4dd5..94b4be7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-04-06 Paul Eggert + + Spelling fix for 'hfy-optimizations' + * htmlfontify.el (hfy-optimizations): Rename from hfy-optimisations, + with an obsolete alias. All uses changed. + 2015-04-06 Fabián Ezequiel Gallina python.el: Enhance docstring detection following PEP-257. diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16 index bf8a973..457c151 100644 --- a/lisp/ChangeLog.16 +++ b/lisp/ChangeLog.16 @@ -15547,7 +15547,7 @@ c-set-fl-decl-start. * progmodes/cc-mode.el (c-common-init, c-after-change): - Changes due to pluralisation of c-before-font-lock-functions. + Changes due to pluralization of c-before-font-lock-functions. (c-set-fl-decl-start): New function, extracted from c-font-lock-enclosing-decls and enhanced. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 591c644..442326c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1692,7 +1692,7 @@ 2013-06-18 Lars Magne Ingebrigtsen * shr.el (shr-tag-table): Insert the images after the table, so that - they're not covered by the table colourisation, which often looked + they're not covered by the table colorization, which often looked awkward. (shr-tag-dl, shr-tag-dt, shr-tag-dd): Add support for
,
and
. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 719cb82..97e7d0f 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -440,7 +440,7 @@ and so on." (background (choice (const :tag "Dark" dark ) (const :tag "Bright" light ))) )) -(defcustom hfy-optimisations (list 'keep-overlays) +(defcustom hfy-optimizations (list 'keep-overlays) "Optimizations to turn on: So far, the following have been implemented:\n merge-adjacent-tags: If two (or more) span tags are adjacent, identical and separated by nothing more than whitespace, they will @@ -475,6 +475,7 @@ which can never slow you down, but may result in incomplete fontification." (const :tag "body-text-only" body-text-only )) :group 'htmlfontify :tag "optimizations") +(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "25.1") (defvar hfy-tags-cache nil "Alist of the form:\n @@ -606,7 +607,7 @@ in a windowing system - try to trick it..." (defun hfy-opt (symbol) "Is option SYMBOL set." - (memq symbol hfy-optimisations)) + (memq symbol hfy-optimizations)) (defun hfy-default-header (file style) "Default value for `hfy-page-header'. @@ -1197,7 +1198,7 @@ MAP is the invisibility map as returned by `hfy-find-invisible-ranges'." ;; -- v (defun hfy-face-at (p) "Find face in effect at point P. -If overlays are to be considered (see `hfy-optimisations') then this may +If overlays are to be considered (see `hfy-optimizations') then this may return a `defface' style list of face properties instead of a face symbol." ;;(message "hfy-face-at");;DBUG ;; Fix-me: clean up, remove face-name etc @@ -1795,8 +1796,8 @@ FILE, if set, is the file name." It is assumed that STRING has text properties that allow it to be fontified. This is a simple convenience wrapper around `htmlfontify-buffer'." - (let* ((hfy-optimisations-1 (copy-sequence hfy-optimisations)) - (hfy-optimisations (add-to-list 'hfy-optimisations-1 + (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations)) + (hfy-optimizations (add-to-list 'hfy-optimizations-1 'skip-refontification))) (with-temp-buffer (insert string) diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index 29bc878..6c74fb3 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -262,7 +262,8 @@ This style is much the same as that of \"OrgFixedWidthBlock\" except that the foreground and background colors are set according to the default face identified by the `htmlfontify'.") -(defvar hfy-optimisations) +(defvar hfy-optimizations) +(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "25.1") (defvar org-odt-embedded-formulas-count 0) (defvar org-odt-embedded-images-count 0) (defvar org-odt-image-size-probe-method @@ -3116,8 +3117,8 @@ and prefix with \"OrgSrc\". For example, (" " "") (" " ""))) (hfy-face-to-css 'org-odt-hfy-face-to-css) - (hfy-optimisations-1 (copy-sequence hfy-optimisations)) - (hfy-optimisations (add-to-list 'hfy-optimisations-1 + (hfy-optimizations-1 (copy-sequence hfy-optimizations)) + (hfy-optimizations (add-to-list 'hfy-optimizations-1 'body-text-only)) (hfy-begin-span-handler (lambda (style text-block text-id text-begins-block-p) commit 93ce8b33090d122c0548c386314b7ee804602fd3 Author: Paul Eggert Date: Sun Apr 5 23:32:40 2015 -0700 Fix typo in previous rtree change diff --git a/lisp/gnus/rtree.el b/lisp/gnus/rtree.el index 001c6ed..50a860a 100644 --- a/lisp/gnus/rtree.el +++ b/lisp/gnus/rtree.el @@ -84,8 +84,8 @@ (setq range (cons range range))) range) -(define-obsolete-function-alias rtree-normalise-range - rtree-normalize-range "25.1") +(define-obsolete-function-alias 'rtree-normalise-range + 'rtree-normalize-range "25.1") (defun rtree-make (range) "Make an rtree from RANGE." commit 1f3f5f1441500deeea791a76b8ac9fa0ea15e515 Author: Paul Eggert Date: Sun Apr 5 21:57:10 2015 -0700 Use American spelling for 'normalize' * rtree.el (rtree-normalize-range): Rename from rtree-normalise-range. All uses changed. Add an alias for obsolete usages. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 14734e3..591c644 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2015-04-06 Paul Eggert + + Use American spelling for 'normalize' + * rtree.el (rtree-normalize-range): Rename from rtree-normalise-range. + All uses changed. Add an alias for obsolete usages. + 2015-04-03 Katsumi Yamaoka * gnus-art.el (gnus-article-browse-html-save-cid-content): diff --git a/lisp/gnus/rtree.el b/lisp/gnus/rtree.el index 59c17ae..001c6ed 100644 --- a/lisp/gnus/rtree.el +++ b/lisp/gnus/rtree.el @@ -79,11 +79,14 @@ (defmacro rtree-range (node) `(car ,node)) -(defsubst rtree-normalise-range (range) +(defsubst rtree-normalize-range (range) (when (numberp range) (setq range (cons range range))) range) +(define-obsolete-function-alias rtree-normalise-range + rtree-normalize-range "25.1") + (defun rtree-make (range) "Make an rtree from RANGE." ;; Normalize the range. @@ -96,7 +99,7 @@ (node (rtree-make-node))) (when (> mid 0) (rtree-set-left node (rtree-make-1 range mid))) - (rtree-set-range node (rtree-normalise-range (cadr range))) + (rtree-set-range node (rtree-normalize-range (cadr range))) (setcdr range (cddr range)) (when (> (- length mid 1) 0) (rtree-set-right node (rtree-make-1 range (- length mid 1)))) commit cf7b034ee12f44887ac363cd0c5d3387747b2a65 Author: Fabián Ezequiel Gallina Date: Mon Apr 6 01:22:19 2015 -0300 Fix previous commit to prevent infloop diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f402ad8..50b9d1b 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4492,6 +4492,7 @@ point's current `syntax-ppss'." (python-nav-backward-sexp) (setq backward-sexp-point (point)) (and (= indentation (current-indentation)) + (not (bobp)) ; Prevent infloop. (looking-at-p (concat "[uU]?[rR]?" (python-rx string-delimiter))))) commit deea36f0ece7b1b14afe2a833b6a0f66d59f4459 Author: Fabián Ezequiel Gallina Date: Sun Apr 5 23:58:13 2015 -0300 python.el: Enhance docstring detection following PEP-257. * lisp/progmodes/python.el (python-docstring-at-p): Remove function. (python-info-assignment-statement-p): New function. (python-info-assignment-continuation-line-p): Use it. (python-info-docstring-p): New function. (python-font-lock-syntactic-face-function) (python-fill-string): Use it. * test/automated/python-tests.el (python-info-assignment-statement-p-1) (python-info-assignment-statement-p-2) (python-info-assignment-statement-p-3, python-info-docstring-p-1) (python-info-docstring-p-2, python-info-docstring-p-3) (python-info-docstring-p-4, python-info-docstring-p-5) (python-info-docstring-p-6): New tests. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ea7f4a..c7d4dd5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2015-04-06 Fabián Ezequiel Gallina + + python.el: Enhance docstring detection following PEP-257. + + * progmodes/python.el (python-docstring-at-p): Remove function. + (python-info-assignment-statement-p): New function. + (python-info-assignment-continuation-line-p): Use it. + (python-info-docstring-p): New function. + (python-font-lock-syntactic-face-function) + (python-fill-string): Use it. + 2015-04-05 Eli Zaretskii * ses.el (ses-sym-rowcol): Move up, before the first use, to avoid diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 67b44aa..f402ad8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -482,19 +482,10 @@ The type returned can be `comment', `string' or `paren'." 'python-info-ppss-comment-or-string-p #'python-syntax-comment-or-string-p "24.3") -(defun python-docstring-at-p (pos) - "Check to see if there is a docstring at POS." - (save-excursion - (goto-char pos) - (if (looking-at-p "'''\\|\"\"\"") - (progn - (python-nav-backward-statement) - (looking-at "\\`\\|class \\|def ")) - nil))) - (defun python-font-lock-syntactic-face-function (state) + "Return syntactic face given STATE." (if (nth 3 state) - (if (python-docstring-at-p (nth 8 state)) + (if (python-info-docstring-p state) font-lock-doc-face font-lock-string-face) font-lock-comment-face)) @@ -3587,17 +3578,12 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (`pep-257 (and multi-line-p (cons nil 2))) (`pep-257-nn (and multi-line-p (cons nil 1))) (`symmetric (and multi-line-p (cons 1 1))))) - (docstring-p (save-excursion - ;; Consider docstrings those strings which - ;; start on a line by themselves. - (python-nav-beginning-of-statement) - (and (= (point) str-start-pos)))) (fill-paragraph-function)) (save-restriction (narrow-to-region str-start-pos str-end-pos) (fill-paragraph justify)) (save-excursion - (when (and docstring-p python-fill-docstring-style) + (when (and (python-info-docstring-p) python-fill-docstring-style) ;; Add the number of newlines indicated by the selected style ;; at the start of the docstring. (goto-char (+ str-start-pos num-quotes)) @@ -4423,23 +4409,40 @@ where the continued line ends." (when (looking-at (python-rx block-start)) (point-marker))))) +(defun python-info-assignment-statement-p (&optional current-line-only) + "Check if current line is an assignment. +With argument CURRENT-LINE-ONLY is non-nil, don't follow any +continuations, just check the if current line is an assignment." + (save-excursion + (let ((found nil)) + (if current-line-only + (back-to-indentation) + (python-nav-beginning-of-statement)) + (while (and + (re-search-forward (python-rx not-simple-operator + assignment-operator + (group not-simple-operator)) + (line-end-position) t) + (not found)) + (save-excursion + ;; The assignment operator should not be inside a string. + (backward-char (length (match-string-no-properties 1))) + (setq found (not (python-syntax-context-type))))) + (when found + (skip-syntax-forward " ") + (point-marker))))) + +;; TODO: rename to clarify this is only for the first continuation +;; line or remove it and move its body to `python-indent-context'. (defun python-info-assignment-continuation-line-p () - "Check if current line is a continuation of an assignment. + "Check if current line is the first continuation of an assignment. When current line is continuation of another with an assignment return the point of the first non-blank character after the operator." (save-excursion (when (python-info-continuation-line-p) (forward-line -1) - (back-to-indentation) - (when (and (not (looking-at (python-rx block-start))) - (and (re-search-forward (python-rx not-simple-operator - assignment-operator - not-simple-operator) - (line-end-position) t) - (not (python-syntax-context-type)))) - (skip-syntax-forward "\s") - (point-marker))))) + (python-info-assignment-statement-p t)))) (defun python-info-looking-at-beginning-of-defun (&optional syntax-ppss) "Check if point is at `beginning-of-defun' using SYNTAX-PPSS." @@ -4464,6 +4467,45 @@ operator." (* whitespace) line-end)) (string-equal "" (match-string-no-properties 1)))) +(defun python-info-docstring-p (&optional syntax-ppss) + "Return non-nil if point is in a docstring. +When optional argument SYNTAX-PPSS is given, use that instead of +point's current `syntax-ppss'." + ;;; https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring + (save-excursion + (when (and syntax-ppss (python-syntax-context 'string syntax-ppss)) + (goto-char (nth 8 syntax-ppss))) + (python-nav-beginning-of-statement) + (let ((counter 1) + (indentation (current-indentation)) + (backward-sexp-point) + (re (concat "[uU]?[rR]?" + (python-rx string-delimiter)))) + (when (and + (not (python-info-assignment-statement-p)) + (looking-at-p re) + ;; Allow up to two consecutive docstrings only. + (>= + 2 + (progn + (while (save-excursion + (python-nav-backward-sexp) + (setq backward-sexp-point (point)) + (and (= indentation (current-indentation)) + (looking-at-p + (concat "[uU]?[rR]?" + (python-rx string-delimiter))))) + ;; Previous sexp was a string, restore point. + (goto-char backward-sexp-point) + (cl-incf counter)) + counter))) + (python-util-forward-comment -1) + (python-nav-beginning-of-statement) + (cond ((bobp)) + ((python-info-assignment-statement-p) t) + ((python-info-looking-at-beginning-of-defun)) + (t nil)))))) + (defun python-info-encoding-from-cookie () "Detect current buffer's encoding from its coding cookie. Returns the encoding as a symbol." diff --git a/test/ChangeLog b/test/ChangeLog index f7bec2e..813f5dd 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,12 @@ +2015-04-06 Fabián Ezequiel Gallina + + * automated/python-tests.el (python-info-assignment-statement-p-1) + (python-info-assignment-statement-p-2) + (python-info-assignment-statement-p-3, python-info-docstring-p-1) + (python-info-docstring-p-2, python-info-docstring-p-3) + (python-info-docstring-p-4, python-info-docstring-p-5) + (python-info-docstring-p-6): New tests. + 2015-04-01 Artur Malabarba * automated/package-test.el: Avoid async while testing. diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index b377a26..22c111f 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -4273,6 +4273,49 @@ def foo(a, (python-tests-look-at "c):") (should (not (python-info-block-continuation-line-p))))) +(ert-deftest python-info-assignment-statement-p-1 () + (python-tests-with-temp-buffer + " +data = foo(), bar() \\\\ + baz(), 4 \\\\ + 5, 6 +" + (python-tests-look-at "data = foo(), bar()") + (should (python-info-assignment-statement-p)) + (should (python-info-assignment-statement-p t)) + (python-tests-look-at "baz(), 4") + (should (python-info-assignment-statement-p)) + (should (not (python-info-assignment-statement-p t))) + (python-tests-look-at "5, 6") + (should (python-info-assignment-statement-p)) + (should (not (python-info-assignment-statement-p t))))) + +(ert-deftest python-info-assignment-statement-p-2 () + (python-tests-with-temp-buffer + " +data = (foo(), bar() + baz(), 4 + 5, 6) +" + (python-tests-look-at "data = (foo(), bar()") + (should (python-info-assignment-statement-p)) + (should (python-info-assignment-statement-p t)) + (python-tests-look-at "baz(), 4") + (should (python-info-assignment-statement-p)) + (should (not (python-info-assignment-statement-p t))) + (python-tests-look-at "5, 6)") + (should (python-info-assignment-statement-p)) + (should (not (python-info-assignment-statement-p t))))) + +(ert-deftest python-info-assignment-statement-p-3 () + (python-tests-with-temp-buffer + " +data '=' 42 +" + (python-tests-look-at "data '=' 42") + (should (not (python-info-assignment-statement-p))) + (should (not (python-info-assignment-statement-p t))))) + (ert-deftest python-info-assignment-continuation-line-p-1 () (python-tests-with-temp-buffer " @@ -4360,6 +4403,136 @@ foo = True # another comment (forward-line 1) (should (python-info-current-line-empty-p)))) +(ert-deftest python-info-docstring-p-1 () + "Test module docstring detection." + (python-tests-with-temp-buffer + "# -*- coding: utf-8 -*- +#!/usr/bin/python + +''' +Module Docstring Django style. +''' +u'''Additional module docstring.''' +'''Not a module docstring.''' +" + (python-tests-look-at "Module Docstring Django style.") + (should (python-info-docstring-p)) + (python-tests-look-at "u'''Additional module docstring.'''") + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a module docstring.'''") + (should (not (python-info-docstring-p))))) + +(ert-deftest python-info-docstring-p-2 () + "Test variable docstring detection." + (python-tests-with-temp-buffer + " +variable = 42 +U'''Variable docstring.''' +'''Additional variable docstring.''' +'''Not a variable docstring.''' +" + (python-tests-look-at "Variable docstring.") + (should (python-info-docstring-p)) + (python-tests-look-at "u'''Additional variable docstring.'''") + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a variable docstring.'''") + (should (not (python-info-docstring-p))))) + +(ert-deftest python-info-docstring-p-3 () + "Test function docstring detection." + (python-tests-with-temp-buffer + " +def func(a, b): + r''' + Function docstring. + + onetwo style. + ''' + R'''Additional function docstring.''' + '''Not a function docstring.''' + return a + b +" + (python-tests-look-at "Function docstring.") + (should (python-info-docstring-p)) + (python-tests-look-at "R'''Additional function docstring.'''") + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a function docstring.'''") + (should (not (python-info-docstring-p))))) + +(ert-deftest python-info-docstring-p-4 () + "Test class docstring detection." + (python-tests-with-temp-buffer + " +class Class: + ur''' + Class docstring. + + symmetric style. + ''' + uR''' + Additional class docstring. + ''' + '''Not a class docstring.''' + pass +" + (python-tests-look-at "Class docstring.") + (should (python-info-docstring-p)) + (python-tests-look-at "uR'''") ;; Additional class docstring + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a class docstring.'''") + (should (not (python-info-docstring-p))))) + +(ert-deftest python-info-docstring-p-5 () + "Test class attribute docstring detection." + (python-tests-with-temp-buffer + " +class Class: + attribute = 42 + Ur''' + Class attribute docstring. + + pep-257 style. + + ''' + UR''' + Additional class attribute docstring. + ''' + '''Not a class attribute docstring.''' + pass +" + (python-tests-look-at "Class attribute docstring.") + (should (python-info-docstring-p)) + (python-tests-look-at "UR'''") ;; Additional class attr docstring + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a class attribute docstring.'''") + (should (not (python-info-docstring-p))))) + +(ert-deftest python-info-docstring-p-6 () + "Test class method docstring detection." + (python-tests-with-temp-buffer + " +class Class: + + def __init__(self, a, b): + self.a = a + self.b = b + + def __call__(self): + '''Method docstring. + + pep-257-nn style. + ''' + '''Additional method docstring.''' + '''Not a method docstring.''' + return self.a + self.b +" + (python-tests-look-at "Method docstring.") + (should (python-info-docstring-p)) + (python-tests-look-at "'''Additional method docstring.'''") + (should (python-info-docstring-p)) + (python-tests-look-at "'''Not a method docstring.'''") + (should (not (python-info-docstring-p))))) + (ert-deftest python-info-encoding-from-cookie-1 () "Should detect it on first line." (python-tests-with-temp-buffer commit 7514b24b6a512d85b762c603e9e0107d2c8a52f1 Author: Paul Eggert Date: Sun Apr 5 12:47:20 2015 -0700 ; Minor ChangeLog fix diff --git a/ChangeLog b/ChangeLog index 7746605..70ab50c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2015-04-03 Paul Eggert Port 'configure' to clang 3.5 - * configure.ac: Add -Wno-unknown-attributes if clang; otherwise - clang 3.5.0 (Fedora 21 x86-64) complains + * configure.ac: Add -Wno-unknown-attributes if clang; + otherwise clang 3.5.0 (Fedora 21 x86-64) complains "/usr/include/glib-2.0/glib/gmem.h: ... warning: unknown attribute '__alloc_size__' ignored". Use -Werror when checking for -nopie; otherwise clang warns about -nopie instead of failing, and then commit ba0a6e9f280968994fd7fc5a1425dec46a5b4e71 Author: Eli Zaretskii Date: Sun Apr 5 20:18:19 2015 +0300 Fix byte-compilation warning in lisp/ses.el lisp/ses.el (ses-sym-rowcol): Move up, before the first use, to avoid byte-compiler warnings. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a780b08..8ea7f4a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-04-05 Eli Zaretskii + + * ses.el (ses-sym-rowcol): Move up, before the first use, to avoid + byte-compiler warnings. + 2015-04-05 Alan Mackenzie * jit-lock.el (jit-lock-after-change): Widen the buffer only diff --git a/lisp/ses.el b/lisp/ses.el index f42b61c..a501435 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -418,6 +418,14 @@ functions refer to its value." (declare (debug t)) `(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row))) +(defmacro ses-sym-rowcol (sym) + "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result +is nil if SYM is not a symbol that names a cell." + `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell)))) + (if (eq rc :ses-named) + (gethash ,sym ses--named-cell-hashmap) + rc))) + (defun ses-cell-p (cell) "Return non-nil if CELL is a cell of current buffer." (and (vectorp cell) @@ -467,14 +475,6 @@ the corresponding cell with name PROPERTY-NAME." "Return the default printer for column COL." `(aref ses--col-printers ,col)) -(defmacro ses-sym-rowcol (sym) - "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result -is nil if SYM is not a symbol that names a cell." - `(let ((rc (and (symbolp ,sym) (get ,sym 'ses-cell)))) - (if (eq rc :ses-named) - (gethash ,sym ses--named-cell-hashmap) - rc))) - (defun ses-is-cell-sym-p (sym) "Check whether SYM point at a cell of this spread sheet." (let ((rowcol (get sym 'ses-cell))) commit c1d18b1d59ef3f0d01c8a1112976241feba2f74a Author: Alan Mackenzie Date: Sun Apr 5 14:40:57 2015 +0000 Tidy up fix to debbugs#20240. * jit-lock.el (jit-lock-after-change): Widen the buffer only whilst putting the 'fontified text properties. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f2e998..a780b08 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2015-04-05 Alan Mackenzie + * jit-lock.el (jit-lock-after-change): Widen the buffer only + whilst putting the 'fontified text properties. + +2015-04-05 Alan Mackenzie + Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r. Also expunge eudc-c[ad]+r. diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index d5651c6..5f9196d 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -650,14 +650,14 @@ will take place when text is fontified stealthily." (let ((jit-lock-start start) (jit-lock-end end)) (with-buffer-prepared-for-jit-lock - (save-restriction - (widen) - (run-hook-with-args 'jit-lock-after-change-extend-region-functions - start end old-len) - ;; Make sure we change at least one char (in case of deletions). - (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max))) - ;; Request refontification. - (put-text-property jit-lock-start jit-lock-end 'fontified nil))) + (run-hook-with-args 'jit-lock-after-change-extend-region-functions + start end old-len) + ;; Make sure we change at least one char (in case of deletions). + (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max))) + ;; Request refontification. + (save-restriction + (widen) + (put-text-property jit-lock-start jit-lock-end 'fontified nil))) ;; Mark the change for deferred contextual refontification. (when jit-lock-context-unfontify-pos (setq jit-lock-context-unfontify-pos commit bf8194688ece7677083075b3a2443d9d1ac24e28 Author: Eli Zaretskii Date: Sun Apr 5 16:05:31 2015 +0300 Fix lisp/ChangeLog formatting. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 643ea78..7f2e998 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -49,6 +49,7 @@ * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc. (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix. + 2015-04-05 Artur Malabarba * emacs-lisp/package.el: Add package-initialize to user-init-file. @@ -256,6 +257,7 @@ (Bug#20084) 2015-03-26 Daniel Colascione + * progmodes/python.el (python-indent-guess-indent-offset-verbose): New defcustom. (python-indent-guess-indent-offset): Use it. commit 2056db3fada56038664c4fa079ef1e034f64e3a5 Author: Alan Mackenzie Date: Sun Apr 5 12:41:45 2015 +0000 Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r. Also expunge eudc-c[ad]+r. * subr.el (internal--compiler-macro-cXXr): "New" function, copied from cl--compiler-macro-cXXr. (caar, cadr, cdar, cddr): Change from defsubsts to defuns with the above compiler-macro. * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove caaar, etc., from list of new alias functions. * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro which generate obsolete cl- aliases for caaar, etc. Invoke them. * desktop.el: * edmacro.el: * emacs-lisp/cl-macs.el: * frameset.el: * ibuffer.el: * mail/footnote.el: * net/dbus.el: * net/eudc-export.el: * net/eudc.el: * net/eudcb-ph.el: * net/rcirc.el: * net/secrets.el: * play/5x5.el: * play/decipher.el: * play/hanoi.el: * progmodes/hideif.el: * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, etc. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33e1456..643ea78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,41 @@ +2015-04-05 Alan Mackenzie + + Rationalize use of c[ad]+r, expunging cl-c[ad]\{3,4\}r. + Also expunge eudc-c[ad]+r. + + * subr.el (internal--compiler-macro-cXXr): "New" function, copied + from cl--compiler-macro-cXXr. + (caar, cadr, cdar, cddr): Changed from defsubsts to defuns with + the above compiler-macro. + + * net/eudc.el (eudc-cadr, eudc-cdar, eudc-caar, eudc-cdaar): Remove. + + * emacs-lisp/cl.el (Top level dolist doing defaliases): Remove + caaar, etc., from list of new alias functions. + + * emacs-lisp/cl-lib.el (cl-caaar, etc): Rename to caaar, etc. + (gen-cXXr--rawname, gen-cXXr-all-cl-aliases): New function/macro + which generate obsolete cl- aliases for caaar, etc. Invoke them. + + * desktop.el: + * edmacro.el: + * emacs-lisp/cl-macs.el: + * frameset.el: + * ibuffer.el: + * mail/footnote.el: + * net/dbus.el: + * net/eudc-export.el: + * net/eudc.el: + * net/eudcb-ph.el: + * net/rcirc.el: + * net/secrets.el: + * play/5x5.el: + * play/decipher.el: + * play/hanoi.el: + * progmodes/hideif.el: + * ses.el: Replace cl-caaar, eudc-cadr, etc. with caaar and cadr, + etc. + 2015-04-05 Richard Stallman * mail/rmail.el (rmail-show-message-1): When displaying a mime message, diff --git a/lisp/desktop.el b/lisp/desktop.el index 3eca5a6..4b76052 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1468,7 +1468,7 @@ after that many seconds of idle time." (dolist (record compacted-vars) (let* ((var (car record)) - (deser-fun (cl-caddr (assq var desktop-var-serdes-funs)))) + (deser-fun (caddr (assq var desktop-var-serdes-funs)))) (if deser-fun (set var (funcall deser-fun (cadr record)))))))) result)))) diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 84dfd4f..d759160 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -612,7 +612,7 @@ This function assumes that the events can be stored in a string." ((eq (car ev) 'switch-frame)) ((equal ev '(menu-bar)) (push 'menu-bar result)) - ((equal (cl-cadadr ev) '(menu-bar)) + ((equal (cadadr ev) '(menu-bar)) (push (vector 'menu-bar (car ev)) result)) ;; It would be nice to do pop-up menus, too, but not enough ;; info is recorded in macros to make this possible. diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 10651cc..3ee5e04 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -385,8 +385,8 @@ Signal an error if X is not a list." (null x) (signal 'wrong-type-argument (list 'listp x 'x)))) -(cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.") -(cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.") +(cl--defalias 'cl-third 'caddr "Return the third element of the list X.") +(cl--defalias 'cl-fourth 'cadddr "Return the fourth element of the list X.") (defsubst cl-fifth (x) "Return the fifth element of the list X." @@ -418,126 +418,159 @@ Signal an error if X is not a list." (declare (gv-setter (lambda (store) `(setcar (nthcdr 9 ,x) ,store)))) (nth 9 x)) -(defun cl-caaar (x) +(defun caaar (x) "Return the `car' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (car x)))) -(defun cl-caadr (x) +(defun caadr (x) "Return the `car' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (cdr x)))) -(defun cl-cadar (x) +(defun cadar (x) "Return the `car' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (car x)))) -(defun cl-caddr (x) +(defun caddr (x) "Return the `car' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (cdr x)))) -(defun cl-cdaar (x) +(defun cdaar (x) "Return the `cdr' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (car x)))) -(defun cl-cdadr (x) +(defun cdadr (x) "Return the `cdr' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (cdr x)))) -(defun cl-cddar (x) +(defun cddar (x) "Return the `cdr' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (car x)))) -(defun cl-cdddr (x) +(defun cdddr (x) "Return the `cdr' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (cdr x)))) -(defun cl-caaaar (x) +(defun caaaar (x) "Return the `car' of the `car' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (car (car x))))) -(defun cl-caaadr (x) +(defun caaadr (x) "Return the `car' of the `car' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (car (cdr x))))) -(defun cl-caadar (x) +(defun caadar (x) "Return the `car' of the `car' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (cdr (car x))))) -(defun cl-caaddr (x) +(defun caaddr (x) "Return the `car' of the `car' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (car (cdr (cdr x))))) -(defun cl-cadaar (x) +(defun cadaar (x) "Return the `car' of the `cdr' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (car (car x))))) -(defun cl-cadadr (x) +(defun cadadr (x) "Return the `car' of the `cdr' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (car (cdr x))))) -(defun cl-caddar (x) +(defun caddar (x) "Return the `car' of the `cdr' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (cdr (car x))))) -(defun cl-cadddr (x) +(defun cadddr (x) "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (car (cdr (cdr (cdr x))))) -(defun cl-cdaaar (x) +(defun cdaaar (x) "Return the `cdr' of the `car' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (car (car x))))) -(defun cl-cdaadr (x) +(defun cdaadr (x) "Return the `cdr' of the `car' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (car (cdr x))))) -(defun cl-cdadar (x) +(defun cdadar (x) "Return the `cdr' of the `car' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (cdr (car x))))) -(defun cl-cdaddr (x) +(defun cdaddr (x) "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (car (cdr (cdr x))))) -(defun cl-cddaar (x) +(defun cddaar (x) "Return the `cdr' of the `cdr' of the `car' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (car (car x))))) -(defun cl-cddadr (x) +(defun cddadr (x) "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (car (cdr x))))) -(defun cl-cdddar (x) +(defun cdddar (x) "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (cdr (car x))))) -(defun cl-cddddr (x) +(defun cddddr (x) "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X." (declare (compiler-macro cl--compiler-macro-cXXr)) (cdr (cdr (cdr (cdr x))))) +;; Generate aliases cl-cXXr for all the above defuns, and mark them obsolete. +(eval-when-compile + (defun gen-cXXr--rawname (n bits) + "Generate and return a string like \"adad\" corresponding to N. +BITS is the number of a's and d's. +The \"corresponding\" means each bit of N is converted to an \"a\" (for zero) +or a \"d\" (for one)." + (let ((name (make-string bits ?a)) + (mask (lsh 1 (1- bits))) + (elt 0)) + (while (< elt bits) + (if (/= (logand n mask) 0) + (aset name elt ?d)) + (setq elt (1+ elt) + mask (lsh mask -1))) + name)) + + (defmacro gen-cXXr-all-cl-aliases (bits) + "Generate cl- aliases for all defuns `c[ad]+r' with BITS a's and d's. +Also mark the aliases as obsolete." + `(progn + ,@(mapcar + (lambda (n) + (let* ((raw (gen-cXXr--rawname n bits)) + (old (intern (concat "cl-c" raw "r"))) + (new (intern (concat "c" raw "r")))) + `(progn (defalias ',old ',new) + (make-obsolete ',old ',new "25.1")))) + (number-sequence 0 (1- (lsh 1 bits))))))) + +(gen-cXXr-all-cl-aliases 3) +(gen-cXXr-all-cl-aliases 4) + ;;(defun last* (x &optional n) ;; "Returns the last link in the list LIST. ;;With optional argument N, returns Nth-to-last link (default 1)." diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index f8ddc00..fa6a4bc 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -70,6 +70,9 @@ (setq form `(cons ,(car args) ,form))) form)) +;; Note: `cl--compiler-macro-cXXr' has been copied to +;; `internal--compiler-macro-cXXr' in subr.el. If you amend either +;; one, you may want to amend the other, too. ;;;###autoload (defun cl--compiler-macro-cXXr (form x) (let* ((head (car form)) @@ -500,7 +503,7 @@ its argument list allows full Common Lisp conventions." (while (and (eq (car args) '&aux) (pop args)) (while (and args (not (memq (car args) cl--lambda-list-keywords))) (if (consp (car args)) - (if (and cl--bind-enquote (cl-cadar args)) + (if (and cl--bind-enquote (cadar args)) (cl--do-arglist (caar args) `',(cadr (pop args))) (cl--do-arglist (caar args) (cadr (pop args)))) @@ -584,7 +587,7 @@ its argument list allows full Common Lisp conventions." (if (eq ?_ (aref name 0)) (setq name (substring name 1))) (intern (format ":%s" name))))) - (varg (if (consp (car arg)) (cl-cadar arg) (car arg))) + (varg (if (consp (car arg)) (cadar arg) (car arg))) (def (if (cdr arg) (cadr arg) ;; The ordering between those two or clauses is ;; irrelevant, since in practice only one of the two @@ -1188,10 +1191,10 @@ For more details, see Info node `(cl)Loop Facility'. (if (memq (car cl--loop-args) '(downto above)) (error "Must specify `from' value for downward cl-loop")) (let* ((down (or (eq (car cl--loop-args) 'downfrom) - (memq (cl-caddr cl--loop-args) + (memq (caddr cl--loop-args) '(downto above)))) (excl (or (memq (car cl--loop-args) '(above below)) - (memq (cl-caddr cl--loop-args) + (memq (caddr cl--loop-args) '(above below)))) (start (and (memq (car cl--loop-args) '(from upfrom downfrom)) @@ -1291,7 +1294,7 @@ For more details, see Info node `(cl)Loop Facility'. (temp-idx (if (eq (car cl--loop-args) 'using) (if (and (= (length (cadr cl--loop-args)) 2) - (eq (cl-caadr cl--loop-args) 'index)) + (eq (caadr cl--loop-args) 'index)) (cadr (cl--pop2 cl--loop-args)) (error "Bad `using' clause")) (make-symbol "--cl-idx--")))) @@ -1323,8 +1326,8 @@ For more details, see Info node `(cl)Loop Facility'. (other (if (eq (car cl--loop-args) 'using) (if (and (= (length (cadr cl--loop-args)) 2) - (memq (cl-caadr cl--loop-args) hash-types) - (not (eq (cl-caadr cl--loop-args) word))) + (memq (caadr cl--loop-args) hash-types) + (not (eq (caadr cl--loop-args) word))) (cadr (cl--pop2 cl--loop-args)) (error "Bad `using' clause")) (make-symbol "--cl-var--")))) @@ -1386,8 +1389,8 @@ For more details, see Info node `(cl)Loop Facility'. (other (if (eq (car cl--loop-args) 'using) (if (and (= (length (cadr cl--loop-args)) 2) - (memq (cl-caadr cl--loop-args) key-types) - (not (eq (cl-caadr cl--loop-args) word))) + (memq (caadr cl--loop-args) key-types) + (not (eq (caadr cl--loop-args) word))) (cadr (cl--pop2 cl--loop-args)) (error "Bad `using' clause")) (make-symbol "--cl-var--")))) @@ -1611,7 +1614,7 @@ If BODY is `setq', then use SPECS for assignments rather than for bindings." (let ((temps nil) (new nil)) (when par (let ((p specs)) - (while (and p (or (symbolp (car-safe (car p))) (null (cl-cadar p)))) + (while (and p (or (symbolp (car-safe (car p))) (null (cadar p)))) (setq p (cdr p))) (when p (setq par nil) @@ -1686,7 +1689,7 @@ such that COMBO is equivalent to (and . CLAUSES)." (setq clauses (cons (nconc (butlast (car clauses)) (if (eq (car-safe (cadr clauses)) 'progn) - (cl-cdadr clauses) + (cdadr clauses) (list (cadr clauses)))) (cddr clauses))) ;; A final (progn ,@A t) is moved outside of the `and'. @@ -1828,7 +1831,7 @@ from OBARRAY. (let (,(car spec)) (mapatoms #'(lambda (,(car spec)) ,@body) ,@(and (cadr spec) (list (cadr spec)))) - ,(cl-caddr spec)))) + ,(caddr spec)))) ;;;###autoload (defmacro cl-do-all-symbols (spec &rest body) @@ -2105,9 +2108,9 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). ;; FIXME: For N bindings, this will traverse `body' N times! (macroexpand-all (macroexp-progn body) (cons (list (symbol-name (caar bindings)) - (cl-cadar bindings)) + (cadar bindings)) macroexpand-all-environment)))) - (if (or (null (cdar bindings)) (cl-cddar bindings)) + (if (or (null (cdar bindings)) (cddar bindings)) (macroexp--warn-and-return (format "Malformed `cl-symbol-macrolet' binding: %S" (car bindings)) @@ -2216,7 +2219,7 @@ values. For compatibility, (cl-values A B C) is a synonym for (list A B C). ((and (eq (car-safe spec) 'warn) (boundp 'byte-compile-warnings)) (while (setq spec (cdr spec)) (if (consp (car spec)) - (if (eq (cl-cadar spec) 0) + (if (eq (cadar spec) 0) (byte-compile-disable-warning (caar spec)) (byte-compile-enable-warning (caar spec))))))) nil) @@ -2660,9 +2663,9 @@ non-nil value, that slot cannot be set via `setf'. (t `(and (consp cl-x) (memq (nth ,pos cl-x) ,tag-symbol)))))) pred-check (and pred-form (> safety 0) - (if (and (eq (cl-caadr pred-form) 'vectorp) + (if (and (eq (caadr pred-form) 'vectorp) (= safety 1)) - (cons 'and (cl-cdddr pred-form)) + (cons 'and (cdddr pred-form)) `(,predicate cl-x)))) (let ((pos 0) (descp descs)) (while descp @@ -3090,14 +3093,14 @@ macro that returns its `&whole' argument." cl-fifth cl-sixth cl-seventh cl-eighth cl-ninth cl-tenth cl-rest cl-endp cl-plusp cl-minusp - cl-caaar cl-caadr cl-cadar - cl-caddr cl-cdaar cl-cdadr - cl-cddar cl-cdddr cl-caaaar - cl-caaadr cl-caadar cl-caaddr - cl-cadaar cl-cadadr cl-caddar - cl-cadddr cl-cdaaar cl-cdaadr - cl-cdadar cl-cdaddr cl-cddaar - cl-cddadr cl-cdddar cl-cddddr)) + caaar caadr cadar + caddr cdaar cdadr + cddar cdddr caaaar + caaadr caadar caaddr + cadaar cadadr caddar + cadddr cdaaar cdaadr + cdadar cdaddr cddaar + cddadr cdddar cddddr)) (put y 'side-effect-free t)) ;;; Things that are inline. diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 5da1cea..be7b6f4 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -259,30 +259,6 @@ copy-list ldiff list* - cddddr - cdddar - cddadr - cddaar - cdaddr - cdadar - cdaadr - cdaaar - cadddr - caddar - cadadr - cadaar - caaddr - caadar - caaadr - caaaar - cdddr - cddar - cdadr - cdaar - caddr - cadar - caadr - caaar tenth ninth eighth @@ -397,7 +373,7 @@ lexical closures as in Common Lisp. (macroexpand-all `(cl-symbol-macrolet ,(mapcar (lambda (x) - `(,(car x) (symbol-value ,(cl-caddr x)))) + `(,(car x) (symbol-value ,(caddr x)))) vars) ,@body) (cons (cons 'function #'cl--function-convert) @@ -410,20 +386,20 @@ lexical closures as in Common Lisp. ;; dynamic scoping, since with lexical scoping we'd need ;; (let ((foo )) ...foo...). `(progn - ,@(mapcar (lambda (x) `(defvar ,(cl-caddr x))) vars) - (let ,(mapcar (lambda (x) (list (cl-caddr x) (cadr x))) vars) + ,@(mapcar (lambda (x) `(defvar ,(caddr x))) vars) + (let ,(mapcar (lambda (x) (list (caddr x) (cadr x))) vars) ,(cl-sublis (mapcar (lambda (x) - (cons (cl-caddr x) - `',(cl-caddr x))) + (cons (caddr x) + `',(caddr x))) vars) ebody))) `(let ,(mapcar (lambda (x) - (list (cl-caddr x) + (list (caddr x) `(make-symbol ,(format "--%s--" (car x))))) vars) (setf ,@(apply #'append (mapcar (lambda (x) - (list `(symbol-value ,(cl-caddr x)) (cadr x))) + (list `(symbol-value ,(caddr x)) (cadr x))) vars))) ,ebody)))) diff --git a/lisp/frameset.el b/lisp/frameset.el index 17fe39b..adff853 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -809,7 +809,7 @@ For the description of FORCE-ONSCREEN, see `frameset-restore'. When forced onscreen, frames wider than the monitor's workarea are converted to fullwidth, and frames taller than the workarea are converted to fullheight. NOTE: This only works for non-iconified frames." - (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) + (pcase-let* ((`(,left ,top ,width ,height) (cdadr (frame-monitor-attributes frame))) (right (+ left width -1)) (bottom (+ top height -1)) (fr-left (frameset-compute-pos (frame-parameter frame 'left) left right)) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8bd1e46..837fbae 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2162,7 +2162,7 @@ If optional arg SILENT is non-nil, do not display progress messages." (eq ibuffer-always-show-last-buffer :nomini) (minibufferp (cadr bufs))) - (cl-caddr bufs) + (caddr bufs) (cadr bufs)) (ibuffer-current-buffers-with-marks bufs) ibuffer-display-maybe-show-predicates))) @@ -2194,7 +2194,7 @@ If optional arg SILENT is non-nil, do not display progress messages." (require 'ibuf-ext)) (let* ((sortdat (assq ibuffer-sorting-mode ibuffer-sorting-functions-alist)) - (func (cl-caddr sortdat))) + (func (caddr sortdat))) (let ((result ;; actually sort the buffers (if (and sortdat func) diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index ea67443..d841187 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -644,7 +644,7 @@ by using `Footnote-back-to-message'." (interactive "*P") (let ((num (if footnote-text-marker-alist - (if (< (point) (cl-cadar (last footnote-pointer-marker-alist))) + (if (< (point) (cadar (last footnote-pointer-marker-alist))) (Footnote-make-hole) (1+ (caar (last footnote-text-marker-alist)))) 1))) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index b2c1ba8..4f63374 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -869,7 +869,7 @@ association to the service from D-Bus." ;; Service. (string-equal service (cadr e)) ;; Non-empty object path. - (cl-caddr e) + (caddr e) (throw :found t))))) dbus-registered-objects-table) nil)))) @@ -1474,7 +1474,7 @@ name of the property, and its value. If there are no properties, bus service path dbus-interface-properties "GetAll" :timeout 500 interface) result) - (add-to-list 'result (cons (car dict) (cl-caadr dict)) 'append))))) + (add-to-list 'result (cons (car dict) (caadr dict)) 'append))))) (defun dbus-register-property (bus service path interface property access value @@ -1672,7 +1672,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow." (if (cadr entry2) ;; "sv". (dolist (entry3 (cadr entry2)) - (setcdr entry3 (cl-caadr entry3))) + (setcdr entry3 (caadr entry3))) (setcdr entry2 nil))))) ;; Fallback: collect the information. Slooow! diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index 0e54d84..ec0914d 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el @@ -174,7 +174,7 @@ LOCATION is used as the phone location for BBDB." (condition-case err (setq phone-list (bbdb-parse-phone-number phone)) (error - (if (string= "phone number unparsable." (eudc-cadr err)) + (if (string= "phone number unparsable." (cadr err)) (if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone))) (error "Phone number unparsable") (setq phone-list (list (bbdb-string-trim phone)))) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index cf5d13f..ada9eae 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -105,18 +105,6 @@ ;; attribute name (defvar eudc-protocol-has-default-query-attributes nil) -(defun eudc-cadr (obj) - (car (cdr obj))) - -(defun eudc-cdar (obj) - (cdr (car obj))) - -(defun eudc-caar (obj) - (car (car obj))) - -(defun eudc-cdaar (obj) - (cdr (car (car obj)))) - (defun eudc-plist-member (plist prop) "Return t if PROP has a value specified in PLIST." (if (not (= 0 (% (length plist) 2))) @@ -555,10 +543,10 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." ;; Search for multiple records (while (and rec - (not (listp (eudc-cdar rec)))) + (not (listp (cdar rec)))) (setq rec (cdr rec))) - (if (null (eudc-cdar rec)) + (if (null (cdar rec)) (list record) ; No duplicate attrs in this record (mapc (function (lambda (field) @@ -590,7 +578,7 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." ((eq 'first method) (setq result (eudc-add-field-to-records (cons (car field) - (eudc-cadr field)) + (cadr field)) result))) ((eq 'concat method) (setq result @@ -710,7 +698,7 @@ If ERROR is non-nil, report an error if there is none." (let ((result (eudc-query (list (cons 'name name)) '(email))) email) (if (null (cdr result)) - (setq email (eudc-cdaar result)) + (setq email (cdaar result)) (error "Multiple match--use the query form")) (if error (if email @@ -728,7 +716,7 @@ If ERROR is non-nil, report an error if there is none." (let ((result (eudc-query (list (cons 'name name)) '(phone))) phone) (if (null (cdr result)) - (setq phone (eudc-cdaar result)) + (setq phone (cdaar result)) (error "Multiple match--use the query form")) (if error (if phone @@ -765,8 +753,8 @@ otherwise a list of symbols is returned." ;; If the same attribute appears more than once, merge ;; the corresponding values (while query-alist - (setq key (eudc-caar query-alist) - val (eudc-cdar query-alist) + (setq key (caar query-alist) + val (cdar query-alist) cell (assq key query)) (if cell (setcdr cell (concat (cdr cell) " " val)) @@ -863,7 +851,7 @@ see `eudc-inline-expansion-servers'" (catch 'found ;; Loop on the servers (while servers - (eudc-set-server (eudc-caar servers) (eudc-cdar servers) t) + (eudc-set-server (caar servers) (cdar servers) t) ;; Determine which formats apply in the query-format list (setq query-formats @@ -1047,14 +1035,14 @@ queries the server for the existing fields and displays a corresponding form." (point)) (setq set-server-p t)) ((and (eq (car sexp) 'setq) - (eq (eudc-cadr sexp) 'eudc-server-hotlist)) + (eq (cadr sexp) 'eudc-server-hotlist)) (delete-region (save-excursion (backward-sexp) (point)) (point)) (setq set-hotlist-p t)) ((and (eq (car sexp) 'provide) - (equal (eudc-cadr sexp) '(quote eudc-options-file))) + (equal (cadr sexp) '(quote eudc-options-file))) (setq provide-p t))) (if (and provide-p set-hotlist-p diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 1897e0b..15e15e2 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -81,7 +81,7 @@ are returned" (eudc-ph-do-request "fields") (if full-records (eudc-ph-parse-query-result) - (mapcar 'eudc-caar (eudc-ph-parse-query-result)))) + (mapcar 'caar (eudc-ph-parse-query-result)))) (defun eudc-ph-parse-query-result (&optional fields) "Return a list of alists of key/values from in `eudc-ph-process-buffer'. @@ -126,9 +126,9 @@ Fields not in FIELDS are discarded." (memq current-key fields)) (if key (setq record (cons (cons key value) record)) ; New key - (setcdr (car record) (if (listp (eudc-cdar record)) - (append (eudc-cdar record) (list value)) - (list (eudc-cdar record) value)))))))) + (setcdr (car record) (if (listp (cdar record)) + (append (cdar record) (list value)) + (list (cdar record) value)))))))) (and (not ignore) (or (null fields) (eq 'all fields) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 74d03f5..b418c51 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2148,7 +2148,7 @@ activity. Only run if the buffer is not visible and (when (and (listp x) (listp (cadr x))) (setcdr x (if (> (length (cdr x)) 1) (rcirc-make-trees (cdr x)) - (setcdr x (list (cl-cdadr x))))))) + (setcdr x (list (cdadr x))))))) alist))) ;;; /commands these are called with 3 args: PROCESS, TARGET, which is @@ -2693,7 +2693,7 @@ the only argument." (defun rcirc-handler-KICK (process sender args _text) (let* ((channel (car args)) (nick (cadr args)) - (reason (cl-caddr args)) + (reason (caddr args)) (message (concat nick " " channel " " reason))) (rcirc-print process sender "KICK" channel message t) ;; print in private chat buffer if it exists @@ -2777,7 +2777,7 @@ the only argument." "RPL_AWAY" (let* ((nick (cadr args)) (rec (assoc-string nick rcirc-nick-away-alist)) - (away-message (cl-caddr args))) + (away-message (caddr args))) (when (or (not rec) (not (string= (cdr rec) away-message))) ;; away message has changed @@ -2806,7 +2806,7 @@ the only argument." (let ((buffer (or (rcirc-get-buffer process (cadr args)) (rcirc-get-temp-buffer-create process (cadr args))))) (with-current-buffer buffer - (setq rcirc-topic (cl-caddr args))))) + (setq rcirc-topic (caddr args))))) (defun rcirc-handler-333 (process sender args _text) "333 says who set the topic and when. @@ -2814,16 +2814,16 @@ Not in rfc1459.txt" (let ((buffer (or (rcirc-get-buffer process (cadr args)) (rcirc-get-temp-buffer-create process (cadr args))))) (with-current-buffer buffer - (let ((setter (cl-caddr args)) + (let ((setter (caddr args)) (time (current-time-string (seconds-to-time - (string-to-number (cl-cadddr args)))))) + (string-to-number (cadddr args)))))) (rcirc-print process sender "TOPIC" (cadr args) (format "%s (%s on %s)" rcirc-topic setter time)))))) (defun rcirc-handler-477 (process sender args _text) "ERR_NOCHANMODES" - (rcirc-print process sender "477" (cadr args) (cl-caddr args))) + (rcirc-print process sender "477" (cadr args) (caddr args))) (defun rcirc-handler-MODE (process sender args _text) (let ((target (car args)) @@ -2883,9 +2883,9 @@ Passwords are stored in `rcirc-authinfo' (which see)." (dolist (i rcirc-authinfo) (let ((process (rcirc-buffer-process)) (server (car i)) - (nick (cl-caddr i)) + (nick (caddr i)) (method (cadr i)) - (args (cl-cdddr i))) + (args (cdddr i))) (when (and (string-match server rcirc-server)) (if (and (memq method '(nickserv chanserv bitlbee)) (string-match nick rcirc-nick)) diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 45caf7c..f7bb91b 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -702,7 +702,7 @@ If there is no such item, return nil." (let ((item-path (secrets-item-path collection item))) (unless (secrets-empty-path item-path) (dbus-byte-array-to-string - (cl-caddr + (caddr (dbus-call-method :session secrets-service item-path secrets-interface-item "GetSecret" :object-path secrets-session-path)))))) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index 0258f1e..8b1b217 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -322,7 +322,7 @@ Quit current game \\[5x5-quit-game]" (save-excursion (goto-char grid-org) (beginning-of-line (+ 1 (/ 5x5-y-scale 2))) - (let ((solution-grid (cl-cdadr 5x5-solver-output))) + (let ((solution-grid (cdadr 5x5-solver-output))) (dotimes (y 5x5-grid-size) (save-excursion (forward-char (+ 1 (/ (1+ 5x5-x-scale) 2))) @@ -747,9 +747,9 @@ Solutions are sorted from least to greatest Hamming weight." ;; The Hamming Weight is computed by matrix reduction ;; with an ad-hoc operator. (math-reduce-vec - ;; (cl-cadadr '(vec (mod x 2))) => x - (lambda (r x) (+ (if (integerp r) r (cl-cadadr r)) - (cl-cadadr x))) + ;; (cadadr '(vec (mod x 2))) => x + (lambda (r x) (+ (if (integerp r) r (cadadr r)) + (cadadr x))) solution); car (5x5-vec-to-grid (calcFunc-arrange solution 5x5-grid-size));cdr diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index f42ae90..98a3ae2 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -792,8 +792,8 @@ TOTAL is the total number of letters in the ciphertext." (while temp-list (insert (caar temp-list) (format "%4d%3d%% " - (cl-cadar temp-list) - (/ (* 100 (cl-cadar temp-list)) total))) + (cadar temp-list) + (/ (* 100 (cadar temp-list)) total))) (setq temp-list (nthcdr 4 temp-list))) (insert ?\n) (setq freq-list (cdr freq-list) diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index b868db6..d273445 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -277,7 +277,7 @@ BITS must be of length nrings. Start at START-TIME." ;; Disable display of line and column numbers, for speed. (line-number-mode nil) (column-number-mode nil)) ;; do it! - (hanoi-n bits rings (car poles) (cadr poles) (cl-caddr poles) + (hanoi-n bits rings (car poles) (cadr poles) (caddr poles) start-time)) (message "Done")) (setq buffer-read-only t) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 7f2fd92..64913c2 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -663,8 +663,8 @@ that form should be displayed.") (setq tok (cadr tokens)) (if (eq (car tokens) 'hif-lparen) (if (and (hif-if-valid-identifier-p tok) - (eq (cl-caddr tokens) 'hif-rparen)) - (setq tokens (cl-cdddr tokens)) + (eq (caddr tokens) 'hif-rparen)) + (setq tokens (cdddr tokens)) (error "#define followed by non-identifier: %S" tok)) (setq tok (car tokens) tokens (cdr tokens)) @@ -730,7 +730,7 @@ detecting self-reference." result)) ;; Argument list is nil, direct expansion (setq rep (hif-expand-token-list - (cl-caddr rep) ; Macro's token list + (caddr rep) ; Macro's token list tok expand_list)) ;; Replace all remaining references immediately (setq remains (cl-substitute tok rep remains)) diff --git a/lisp/ses.el b/lisp/ses.el index b0a09ff..f42b61c 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1577,7 +1577,7 @@ if the range was altered." (funcall field (ses-sym-rowcol min)))) ;; This range has changed size. (setq ses-relocate-return 'range)) - `(ses-range ,min ,max ,@(cl-cdddr range))))) + `(ses-range ,min ,max ,@(cdddr range))))) (defun ses-relocate-all (minrow mincol rowincr colincr) "Alter all cell values, symbols, formulas, and reference-lists to relocate diff --git a/lisp/subr.el b/lisp/subr.el index 163a1c4..00acdb6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -339,20 +339,41 @@ configuration." ;;;; List functions. -(defsubst caar (x) +;; Note: `internal--compiler-macro-cXXr' was copied from +;; `cl--compiler-macro-cXXr' in cl-macs.el. If you amend either one, +;; you may want to amend the other, too. +(defun internal--compiler-macro-cXXr (form x) + (let* ((head (car form)) + (n (symbol-name (car form))) + (i (- (length n) 2))) + (if (not (string-match "c[ad]+r\\'" n)) + (if (and (fboundp head) (symbolp (symbol-function head))) + (internal--compiler-macro-cXXr (cons (symbol-function head) (cdr form)) + x) + (error "Compiler macro for cXXr applied to non-cXXr form")) + (while (> i (match-beginning 0)) + (setq x (list (if (eq (aref n i) ?a) 'car 'cdr) x)) + (setq i (1- i))) + x))) + +(defun caar (x) "Return the car of the car of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) (car (car x))) -(defsubst cadr (x) +(defun cadr (x) "Return the car of the cdr of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) (car (cdr x))) -(defsubst cdar (x) +(defun cdar (x) "Return the cdr of the car of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) (cdr (car x))) -(defsubst cddr (x) +(defun cddr (x) "Return the cdr of the cdr of X." + (declare (compiler-macro internal--compiler-macro-cXXr)) (cdr (cdr x))) (defun last (list &optional n) commit 5842e489eef061766a747e26ca81e1ef6e2ece5a Merge: 4e23cd0 fdc5219 Author: Richard Stallman Date: Sun Apr 5 08:44:01 2015 -0400 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs Conflicts: lisp/ChangeLog commit 4e23cd0ccde4ad1e14fe2870ccf140487af649b2 Merge: dca743f 16eec6f Author: Richard Stallman Date: Sun Apr 5 08:36:56 2015 -0400 * mail/rmail.el (rmail-show-message-1): When displaying a mime message, indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard
 before armor.
           Ignore more kinds of whitespace in mime headers.
           Modify the decrypted mime part's mime type so it will be displayed
           by default when visiting this message again.
    
           * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
           (browse-url-firefox-arguments)
           (browse-url-firefox-startup-arguments): Doc fix.

commit fdc521952e6d68fa603aac899fe4c08e0a2ed480
Author: Artur Malabarba 
Date:   Sun Apr 5 11:01:09 2015 +0100

    emacs-lisp/package.el: Add package-initialize to user-init-file.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0870f0c..fb82b5b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-05  Artur Malabarba  
+
+	* emacs-lisp/package.el: Add package-initialize to user-init-file.
+	(package--ensure-init-file): New function.
+	(package-install, package-install-from-buffer): Use it.
+
 2015-04-05  Pete Williamson    (tiny-change)
 
 	Fix .emacs and .emacs.d/init file recursion problem for NaCl
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 83c5b2f..1880270 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1723,6 +1723,30 @@ PACKAGES are satisfied, i.e. that PACKAGES is computed
 using `package-compute-transaction'."
   (mapc #'package-install-from-archive packages))
 
+(defun package--ensure-init-file ()
+  "Ensure that the user's init file calls `package-initialize'."
+  ;; Don't mess with the init-file from "emacs -Q".
+  (when user-init-file
+    (let ((buffer (find-buffer-visiting user-init-file)))
+      (with-current-buffer (or buffer (find-file-noselect user-init-file))
+        (save-excursion
+          (save-restriction
+            (widen)
+            (goto-char (point-min))
+            (unless (search-forward "(package-initialize)" nil 'noerror)
+              (goto-char (point-min))
+              (insert
+               ";; Added by Package.el.  This must come before configurations of\n"
+               ";; installed packages.  Don't delete this line.  If you don't want it,\n"
+               ";; just comment it out by adding a semicolon to the start of the line.\n"
+               "(package-initialize)\n")
+              (unless (looking-at-p "$")
+                (insert "\n"))
+              (let ((file-precious-flag t))
+                (save-buffer)))
+            (unless buffer
+              (kill-buffer (current-buffer)))))))))
+
 ;;;###autoload
 (defun package-install (pkg &optional dont-select)
   "Install the package PKG.
@@ -1751,6 +1775,7 @@ to install it but still mark it as selected."
                                   package-archive-contents))
                     nil t))
            nil)))
+  (package--ensure-init-file)
   (let ((name (if (package-desc-p pkg)
                   (package-desc-name pkg)
                 pkg)))
@@ -1794,6 +1819,7 @@ is derived from the main .el file in the directory.
 
 Downloads and installs required packages as needed."
   (interactive)
+  (package--ensure-init-file)
   (let* ((pkg-desc
           (cond
             ((derived-mode-p 'dired-mode)

commit b47fe819f70cd48c5ca26e37843b878ecc0d0b66
Author: Artur Malabarba 
Date:   Sat Apr 4 21:00:38 2015 +0100

    emacs-lisp/package.el: Prevent outdated downloads-in-progress.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7fa39b4..0870f0c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -14,6 +14,9 @@
 	`package-archives' to `package--downloads-in-progress' instead of
 	overwriting it.
 	(package--with-work-buffer-async): Protect macro arguments.
+	(package--download-one-archive)
+	(package--download-and-read-archives): Prevent
+	downloads-in-progress list from becoming outdated.
 
 2015-04-04  Michael Albinus  
 
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 32a3e01..83c5b2f 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1397,8 +1397,12 @@ similar to an entry in `package-alist'.  Save the cached copy to
           ;; If we care, check it (perhaps async) and *then* write the file.
           (package--check-signature
            location file content async
+           ;; This function will be called after signature checking.
            (lambda (&optional good-sigs)
              (unless (or good-sigs (eq package-check-signature 'allow-unsigned))
+               ;; Even if the sig fails, this download is done, so
+               ;; remove it from the in-progress list.
+               (package--update-downloads-in-progress archive)
                (error "Unsigned archive `%s'" name))
              ;; Write out the archives file.
              (write-region content nil local-file nil 'silent)
@@ -1419,7 +1423,11 @@ perform the downloads asynchronously."
                 package--downloads-in-progress))
   (dolist (archive package-archives)
     (condition-case-unless-debug nil
-        (package--download-one-archive archive "archive-contents" async)
+        (package--download-one-archive
+         archive "archive-contents"
+         ;; Called if the async download fails
+         (when async
+           (lambda () (package--update-downloads-in-progress archive))))
       (error (message "Failed to download `%s' archive."
                (car archive))))))
 

commit dca743f0941909a80e3f28c023977120b6203e20
Author: Richard M. Stallman 
Date:   Sun Mar 22 03:51:55 2015 -0400

    Recognize more format variation.  Automatically reshow decrypted text.
    
    * mail/rmail.el	(rmail-epa-decrypt): Disregard 
 before armor.
    Ignore more kinds of whitespace in mime headers.
    Modify the decrypted mime part's mime type so it will be displayed
    by default when visiting this message again.
    
    * lisp/mail/rmail.el (rmail-show-message-1): When displaying a mime message,
    indicate start and finish in the echo area.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8631295..54d1840 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,11 @@
 	* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
 	indicate start and finish in the echo area.
 
+	* mail/rmail.el	(rmail-epa-decrypt): Disregard 
 before armor.
+	Ignore more kinds of whitespace in mime headers.
+	Modify the decrypted mime part's mime type so it will be displayed
+	by default when visiting this message again.
+
 	* net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
 	(browse-url-firefox-arguments)
 	(browse-url-firefox-startup-arguments): Doc fix.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 643b5f9..790254a 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4532,17 +4532,22 @@ encoded string (and the same mask) will decode the string."
 	(let ((coding-system-for-read coding-system-for-read)
 	      (case-fold-search t)
 	      unquote
-	      armor-start armor-prefix armor-end after-end)
+	      armor-start armor-prefix armor-end-regexp armor-end after-end)
 
 	  (setq armor-start (match-beginning 0)
 		armor-prefix (buffer-substring
 			      (line-beginning-position)
-			      armor-start)
-		armor-end (re-search-forward
-			   (concat "^"
-				   armor-prefix
-				   "-----END PGP MESSAGE-----$")
-			   nil t))
+			      armor-start))
+	  (if (string-match "
\\'" armor-prefix)
+	      (setq armor-prefix ""))
+
+	  (setq armor-end-regexp
+		(concat "^"
+			armor-prefix
+			"-----END PGP MESSAGE-----$"))
+	  (setq armor-end (re-search-forward armor-end-regexp
+					     nil t))
+
 	  (unless armor-end
 	    (error "Encryption armor beginning has no matching end"))
 	  (goto-char armor-start)
@@ -4563,13 +4568,13 @@ encoded string (and the same mask) will decode the string."
 
 		;; Use the charset specified in the armor.
 		(unless coding-system-for-read
-		  (if (re-search-forward "^Charset: \\(.*\\)" nil t)
+		  (if (re-search-forward "^[ \t]*Charset[ \t\n]*:[ \t\n]*\\(.*\\)" nil t)
 		      (setq coding-system-for-read
 			    (epa--find-coding-system-for-mime-charset
 			     (intern (downcase (match-string 1)))))))
 
 		(goto-char (point-min))
-		(if (re-search-forward "^[ \t]*Content-transfer-encoding[ \t]*:[ \t]*quoted-printable[ \t]*$" nil t)
+		(if (re-search-forward "^[ \t]*Content-transfer-encoding[ \t\n]*:[ \t\n]*quoted-printable[ \t]*$" nil t)
 		    (setq unquote t)))))
 
 	  (when unquote
@@ -4587,7 +4592,8 @@ encoded string (and the same mask) will decode the string."
 	       (goto-char armor-start)
 	       (current-buffer))))
 
-	  (push (list armor-start (- (point-max) after-end))
+	  (push (list armor-start (- (point-max) after-end) mime
+		      armor-end-regexp)
 		decrypts)))
 
       (unless decrypts
@@ -4603,14 +4609,35 @@ encoded string (and the same mask) will decode the string."
 	      (narrow-to-region beg end)
 	      (goto-char (point-min))
 	      (dolist (d decrypts)
+		;; Find, in the real Rmail buffer, the same armors
+		;; that we found and decrypted in the view buffer.
 		(if (re-search-forward "-----BEGIN PGP MESSAGE-----$" nil t)
-		    (let (armor-start armor-end)
+		    (let (armor-start armor-end armor-end-regexp)
 		      (setq armor-start (match-beginning 0)
-			    armor-end (re-search-forward "^-----END PGP MESSAGE-----$"
-							 nil t))
+			    armor-end-regexp (nth 3 d)
+			    armor-end (re-search-forward
+				       armor-end-regexp
+				       nil t))
+
+		      ;; Found as expected -- now replace it with the decrypt.
 		      (when armor-end
 			(delete-region armor-start armor-end)
-			(insert-buffer-substring from-buffer (nth 0 d) (nth 1 d)))))))))))))
+			(insert-buffer-substring from-buffer (nth 0 d) (nth 1 d)))
+
+		      ;; Change the mime type (if this is in a mime part)
+		      ;; so this part will display by default
+		      ;; when the message is shown later.
+		      (when (nth 2 d)
+			(goto-char armor-start)
+			(when (re-search-backward "^--" nil t)
+			  (save-restriction
+			    (narrow-to-region (point) armor-start)
+			    (when (re-search-forward "^content-type[ \t\n]*:[ \t\n]*" nil t)
+			      (when (looking-at "[^\n \t;]+")
+				(let ((value (match-string 0)))
+				  (unless (member value '("text/plain" "text/html"))
+				    (replace-match "text/plain"))))))))
+		      ))))))))))
  
 
 ;;;;  Desktop support

commit 1a80be15bb1974d454cf37bcd1bd1be64e2cb488
Author: Richard M. Stallman 
Date:   Sun Mar 22 03:45:03 2015 -0400

    Echo area shows when displaying a mime message.
    
    * lisp/mail/rmail.el (rmail-show-message-1): When displaying a mime message,
    indicate start and finish in the echo area.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be3a763..8631295 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2015-03-22  Richard Stallman  
 
+	* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
+	indicate start and finish in the echo area.
+
 	* net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
 	(browse-url-firefox-arguments)
 	(browse-url-firefox-startup-arguments): Doc fix.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 855a4c2..643b5f9 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2762,7 +2762,8 @@ The current mail message becomes the message displayed."
   (let ((mbox-buf rmail-buffer)
 	(view-buf rmail-view-buffer)
 	blurb beg end body-start coding-system character-coding
-	is-text-message header-style)
+	is-text-message header-style
+	showing-message)
     (if (not msg)
 	(setq msg rmail-current-message))
     (unless (setq blurb (rmail-no-mail-p))
@@ -2788,7 +2789,8 @@ The current mail message becomes the message displayed."
 	(setq beg (rmail-msgbeg msg)
 	      end (rmail-msgend msg))
 	(when (> (- end beg) rmail-show-message-verbose-min)
-	  (message "Showing message %d" msg))
+	  (setq showing-message t)
+	  (message "Showing message %d..." msg))
 	(narrow-to-region beg end)
 	(goto-char beg)
 	(with-current-buffer rmail-view-buffer
@@ -2802,6 +2804,8 @@ The current mail message becomes the message displayed."
 		 (re-search-forward "mime-version: 1.0" nil t))
 	    (let ((rmail-buffer mbox-buf)
 		  (rmail-view-buffer view-buf))
+	      (setq showing-message t)
+	      (message "Showing message %d..." msg)
 	      (set (make-local-variable 'rmail-mime-decoded) t)
 	      (funcall rmail-show-mime-function))
 	  (setq body-start (search-forward "\n\n" nil t))
@@ -2881,8 +2885,8 @@ The current mail message becomes the message displayed."
 	(rmail-swap-buffers)
 	(setq rmail-buffer-swapped t)
 	(run-hooks 'rmail-show-message-hook)
-	(when (> (- end beg) rmail-show-message-verbose-min)
-	  (message "Showing message %d...done" msg))))
+	(when showing-message
+	  (setq blurb (format "Showing message %d...done" msg)))))
     blurb))
 
 (defun rmail-copy-headers (beg end &optional ignored-headers)

commit 414e79feeb445dc141b65767dfc3ba8dbb55723c
Author: Richard M. Stallman 
Date:   Sun Mar 22 03:39:21 2015 -0400

    Prefer IceCat to Firefox and Iceweasel.
    
    * lisp/net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
    (browse-url-firefox-arguments)
    (browse-url-firefox-startup-arguments): Doc fix.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9570ba..be3a763 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-22  Richard Stallman  
+
+	* net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
+	(browse-url-firefox-arguments)
+	(browse-url-firefox-startup-arguments): Doc fix.
+
 2015-02-01  Joakim Verona  
 	Support for the new Xwidget feature.
 	* xwidget.el:
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 57c7b61..e21a4c2 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -317,21 +317,21 @@ Defaults to the value of `browse-url-mozilla-arguments' at the time
   :group 'browse-url)
 
 (defcustom browse-url-firefox-program
-  (let ((candidates '("firefox" "iceweasel" "icecat")))
+  (let ((candidates '("icecat" "iceweasel" "firefox")))
     (while (and candidates (not (executable-find (car candidates))))
       (setq candidates (cdr candidates)))
     (or (car candidates) "firefox"))
-  "The name by which to invoke Firefox."
+  "The name by which to invoke Firefox or a variant of it."
   :type 'string
   :group 'browse-url)
 
 (defcustom browse-url-firefox-arguments nil
-  "A list of strings to pass to Firefox as arguments."
+  "A list of strings to pass to Firefox (or variant) as arguments."
   :type '(repeat (string :tag "Argument"))
   :group 'browse-url)
 
 (defcustom browse-url-firefox-startup-arguments browse-url-firefox-arguments
-  "A list of strings to pass to Firefox when it starts up.
+  "A list of strings to pass to Firefox (or variant) when it starts up.
 Defaults to the value of `browse-url-firefox-arguments' at the time
 `browse-url' is loaded."
   :type '(repeat (string :tag "Argument"))