]> code.delx.au - gnu-emacs/commitdiff
Merge from origin/emacs-25
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 May 2016 14:45:30 +0000 (07:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 May 2016 14:45:30 +0000 (07:45 -0700)
9c2a1a2 * doc/misc/texinfo.tex: Sync from gnulib.
66cd4d8 * lisp/emacs-lisp/find-func.el (find-feature-regexp) (find-al...
1a5a05c Do not mistake colon at the end of regexp for slash symbol
4c5a00b Make package-install-from-buffer not move point
9596ea1 ; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"
f79c352 Redo the fix for bug#21839
8d2f78c Don't treat JS spread as contination method call

doc/misc/texinfo.tex
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/find-func.el
lisp/emacs-lisp/lisp-mnt.el
lisp/emacs-lisp/package.el
lisp/help.el
lisp/progmodes/js.el
lisp/progmodes/ruby-mode.el
test/lisp/progmodes/ruby-mode-tests.el
test/manual/indent/js.js

index 37e2de896ecea748321b7537ba50930621e36d40..314063cafe18a2a5298ac35833377ed31f6db50f 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-04-14.07}
+\def\texinfoversion{2016-05-07.20}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
+% LaTeX's \typeout.  This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
@@ -1534,7 +1538,6 @@ output) for that.)}
   %
   % PDF outline support
   %
-  \pdfmakepagedesttrue \relax
   % Emulate the primitive of pdfTeX
   \def\pdfdest name#1 xyz{%
     \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
@@ -3270,8 +3273,8 @@ end
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
 % Unless we're in typewriter, use \ecfont because the CM text fonts do
 % not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
 \let\{=\mylbrace \let\lbracechar=\{
 \let\}=\myrbrace \let\rbracechar=\}
 \begingroup
@@ -4753,7 +4756,7 @@ end
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
 
-% Used when writing an index entry out to an index file, to prevent
+% Used when writing an index entry out to an index file to prevent
 % expansion of Texinfo commands that can appear in an index entry.
 %
 \def\indexdummies{%
@@ -4889,12 +4892,9 @@ end
   %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
+  \definedummyword\value
   %
   \normalturnoffactive
-  %
-  % Handle some cases of @value -- where it does not contain any
-  % (non-fully-expandable) commands.
-  \makevalueexpandable
 }
 
 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
@@ -5159,9 +5159,10 @@ end
   \ifx\suffix\indexisfl\def\suffix{f1}\fi
   % Open the file
   \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
-  % Using \immediate here prevents an object entering into the current box,
-  % which could confound checks such as those in \safewhatsit for preceding
-  % skips.
+  % Using \immediate above here prevents an object entering into the current 
+  % box, which could confound checks such as those in \safewhatsit for
+  % preceding skips.
+  \typeout{Writing index file \jobname.\suffix}%
 \fi}
 \def\indexisfl{fl}
 
@@ -5369,6 +5370,7 @@ end
     % index.  The easiest way to prevent this problem is to make sure
     % there is some text.
     \putwordIndexNonexistent
+    \typeout{No file \jobname.\indexname s.}%
   \else
     \catcode`\\ = 0
     %
@@ -6682,7 +6684,14 @@ end
   % 1 and 2 (the page numbers aren't printed), and so are the first
   % two pages of the document.  Thus, we'd have two destinations named
   % `1', and two named `2'.
-  \ifpdf \global\pdfmakepagedesttrue \fi
+  \ifpdf
+    \global\pdfmakepagedesttrue
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+    \else
+      \global\pdfmakepagedesttrue
+    \fi
+  \fi
 }
 
 
@@ -8862,6 +8871,7 @@ end
     % include an _ in the xref name, etc.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\Xthisreftitle
       \csname XR#1-title\endcsname
   }%
@@ -9002,14 +9012,14 @@ end
   \fi\fi\fi
 }
 
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME.  SUFFIX 
+% is output afterwards if non-empty.
 \def\refx#1#2{%
   \requireauxfile
   {%
     \indexnofonts
     \otherbackslash
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\thisrefX
       \csname XR#1\endcsname
   }%
@@ -9034,16 +9044,18 @@ end
   #2% Output the suffix in any case.
 }
 
-% This is the macro invoked by entries in the aux file.  Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions).  But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file.  Define a control 
+% sequence for a cross-reference target (we prepend XR to the control sequence 
+% name to avoid collisions).  The value is the page number.  If this is a float 
+% type, we have more work to do.
 %
 \def\xrdef#1#2{%
-  {% The node name might contain 8-bit characters, which in our current
-   % implementation are changed to commands like @'e.  Don't let these
-   % mess up the control sequence name.
+  {% Expand the node or anchor name to remove control sequences.
+   % \turnoffactive stops 8-bit characters being changed to commands
+   % like @'e.  \refx does the same to retrieve the value in the definition.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \xdef\safexrefname{#1}%
   }%
   %
index ae52e8bebeca0f5404dcb4af333081a95cf03553..68abe67698c2428e2018911c50cfe9297414bd00 100644 (file)
@@ -299,7 +299,8 @@ FORM is of the form (ARGS . BODY)."
                                ;; Be careful with make-symbol and (back)quote,
                                ;; see bug#12884.
                                (help--docstring-quote
-                                (let ((print-gensym nil) (print-quoted t))
+                                (let ((print-gensym nil) (print-quoted t)
+                                      (print-escape-newlines t))
                                   (format "%S" (cons 'fn (cl--make-usage-args
                                                           orig-args))))))
                               header)))
index c625fd345c9ef7c2b55fa812fb7499821201b856..7bc966366bd329b65854ca57f3caf591c31e9d83 100644 (file)
@@ -111,7 +111,7 @@ should insert the feature name."
   ;; (point-min), which is acceptable in this case.
   :type 'regexp
   :group 'xref
-  :version "25.0")
+  :version "25.1")
 
 (defcustom find-alias-regexp
   "(defalias +'%s"
@@ -120,7 +120,7 @@ Note it must contain a `%s' at the place where `format'
 should insert the feature name."
   :type 'regexp
   :group 'xref
-  :version "25.0")
+  :version "25.1")
 
 (defvar find-function-regexp-alist
   '((nil . find-function-regexp)
index 7d5b7dc749d6d7f01f9e3b0e35ce5813a109af35..46373da5eb91b5c8ad4421d97e2b2b9671127aa3 100644 (file)
@@ -265,17 +265,16 @@ a section."
 
 (defun lm-header (header)
   "Return the contents of the header named HEADER."
-  (save-excursion
-    (goto-char (point-min))
-    (let ((case-fold-search t))
-      (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
-                 ;;   RCS ident likes format "$identifier: data$"
-                 (looking-at
-                  (if (save-excursion
-                        (skip-chars-backward "^$" (match-beginning 0))
-                        (= (point) (match-beginning 0)))
-                      "[^\n]+" "[^$\n]+")))
-        (match-string-no-properties 0)))))
+  (goto-char (point-min))
+  (let ((case-fold-search t))
+    (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
+              ;;   RCS ident likes format "$identifier: data$"
+              (looking-at
+               (if (save-excursion
+                     (skip-chars-backward "^$" (match-beginning 0))
+                     (= (point) (match-beginning 0)))
+                   "[^\n]+" "[^$\n]+")))
+      (match-string-no-properties 0))))
 
 (defun lm-header-multiline (header)
   "Return the contents of the header named HEADER, with continuation lines.
index c05bb53b0b31cf0ed0087639e3a8a264c5320b83..fea184d624248d562fe43a09e93261e5f6cf8329 100644 (file)
@@ -1993,7 +1993,8 @@ Downloads and installs required packages as needed."
             ((derived-mode-p 'tar-mode)
              (package-tar-file-info))
             (t
-             (package-buffer-info))))
+             (save-excursion
+              (package-buffer-info)))))
          (name (package-desc-name pkg-desc)))
     ;; Download and install the dependencies.
     (let* ((requires (package-desc-reqs pkg-desc))
index 897cab5e37189337b2bbd1348f10737279b683db..b8485667ae03ff1f6ea60b2d08f576bba4372536 100644 (file)
@@ -1412,7 +1412,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
                (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")
              "\n\n")
            (if (stringp arglist)
-                (if (string-match "\\`[^ ]+\\(\\(?:.\\|\n\\)*\\))\\'" arglist)
+                (if (string-match "\\`[^ ]+\\(.*\\))\\'" arglist)
                     (concat "(fn" (match-string 1 arglist) ")")
                   (error "Unrecognized usage format"))
              (help--make-usage-docstring 'fn arglist)))))
@@ -1485,7 +1485,8 @@ the same names as used in the original source code, when possible."
 (define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1")
 
 (defun help--make-usage-docstring (fn arglist)
-  (help--docstring-quote (format "%S" (help--make-usage fn arglist))))
+  (let ((print-escape-newlines t))
+    (help--docstring-quote (format "%S" (help--make-usage fn arglist)))))
 
 \f
 (provide 'help)
index 9265e38e4bc166b8b942df9180890dd4faee060a..508195996b642021ebb3029928d50a1ed1af9f5b 100644 (file)
@@ -1745,7 +1745,7 @@ This performs fontification according to `js--class-styles'."
   "Regular expression matching variable declaration keywords.")
 
 (defconst js--indent-operator-re
-  (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|"
+  (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|"
           (js--regexp-opt-symbol '("in" "instanceof")))
   "Regexp matching operators that affect indentation of continued expressions.")
 
index 972bf99145e392d8d3380d07d0f3b2a9d031bf4e..cd3b04de712de918df3d009f36a148935914f11f 100644 (file)
@@ -1858,7 +1858,9 @@ It will be properly highlighted even when the call omits parens.")
             (string-to-syntax "'"))))
       ;; Symbols with special characters.
       ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)"
-       (3 (string-to-syntax "_")))
+       (3 (unless (nth 8 (syntax-ppss (match-beginning 3)))
+            (goto-char (match-end 0))
+            (string-to-syntax "_"))))
       ;; Part of method name when at the end of it.
       ("[!?]"
        (0 (unless (save-excursion
index 7e85fb83eddf25ada143a09665753a4e8a5a38c4..52126a3bdf142365eee3f57dfc39c4535079722a 100644 (file)
@@ -146,6 +146,9 @@ VALUES-PLIST is a list with alternating index and value elements."
 (ert-deftest ruby-slash-char-literal-is-not-mistaken-for-regexp ()
   (ruby-assert-state "?/" 3 nil))
 
+(ert-deftest ruby-regexp-is-not-mistaken-for-slash-symbol ()
+  (ruby-assert-state "x = /foo:/" 3 nil))
+
 (ert-deftest ruby-indent-simple ()
   (ruby-should-indent-buffer
    "if foo
index 23fae17b3ce58a5f9363e7e8d57ac79a73cbf07e..b40d47b3e5da00254c8fe81551ee1e61daa1b81f 100644 (file)
@@ -103,6 +103,12 @@ Foobar
     console.log(num);
   });
 
+var z = [
+  ...iterableObj,
+  4,
+  5
+]
+
 var arr = [
   -1, 2,
   -3, 4 +