aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJohn Wiegley2016-03-11 13:33:32 -0800
committerJohn Wiegley2016-03-11 13:33:32 -0800
commit63efcc268635dea78c6bd80749eae4ee2c72d717 (patch)
tree888b43de0eb148cf46a129a15f08a80caa8a5dfe /lisp
parentb4fbd69b66a927ad8ff479bee6ca57e977d7e649 (diff)
parentfacb5e20ce186e47506860bde982e35020fedce5 (diff)
downloademacs-63efcc268635dea78c6bd80749eae4ee2c72d717.tar.gz
emacs-63efcc268635dea78c6bd80749eae4ee2c72d717.zip
Merge from origin/emacs-25
facb5e2 Update Emacs manual section related to character folding 4efea8e ; * etc/DEBUG: Fix a typo. (Bug#22984) f8df21b Update admin/notes/unicode 950be68 Add symref-filepattern entries for c?perl-mode 8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them. 985dacf ; NEWS update for the last change in etags 741a6f8 Sync with gnulib 7352c6c Rework C source files to avoid ^( a589e9a By default, etags produces unqualified Perl tag names 72c7438 Indent methods with keyword names correctly 28532a9 Propertize character literals and special global variables differently a7d6f39 ; Fix last change in NEWS 83b2a20 Change how /etc/NEWS presents character folding b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding off by default"" 711ca36 Properly handle lambda as read function (bug 22961) 1b9d616 Propertize operator symbol names with symbol syntax class 9b16bc2 Stop recognizing :#{} as symbol in ruby-mode 366ec77 Allow using the left shift operator without spaces on both sides 02bf7cc Properly handle unquoting in wdired (bug 22938) 16cf469 ; Spelling fix and tighten up comment f50bc04 Allow splat operator before percent literal 991c801 Don't apply the return value of goto-char as syntax class 6e63b3e Guard against nested percent literals 066f3bc Recognize iuwu-mod after an escaped newline 6f7a57c Fix symbolic mode string conversion for s and t 50b9826 Update 'ucs-names' database 993b2fb Improve doc string of 'shell-command' b71c717 Make the code in movemail_strftime more general cc057e4 Speed up redisplay of binary files with long series of nulls e51b27e Remove the highlighting support for quoting 'like this' inside Lisp docstrings b1abce1 Restore leading space in movemail pop output 98b8d44 Fix bidi-paragraph-direction in Rmail view buffer dc9d837 Don't misindent computed property generator methods 7923112 Fix mbox files produced by movemail on MS-Windows c45a1ca doc string file descriptor exhaustion fix 265141b Fix Bug#22814
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/semantic/symref/grep.el2
-rw-r--r--lisp/emacs-lisp/lisp-mode.el8
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/international/mule-cmds.el12
-rw-r--r--lisp/isearch.el2
-rw-r--r--lisp/mail/rmail.el7
-rw-r--r--lisp/progmodes/js.el11
-rw-r--r--lisp/progmodes/ruby-mode.el158
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/wdired.el22
10 files changed, 127 insertions, 103 deletions
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el
index 3b544d9f912..5d1fea8c829 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -48,6 +48,8 @@ and those hits returned.")
48 (html-mode "*.s?html" "*.php") 48 (html-mode "*.s?html" "*.php")
49 (ruby-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml" 49 (ruby-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
50 "Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile") 50 "Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
51 (perl-mode "*.pl" "*.PL")
52 (cperl-mode "*.pl" "*.PL")
51 ) 53 )
52 "List of major modes and file extension pattern. 54 "List of major modes and file extension pattern.
53See find -name man page for format.") 55See find -name man page for format.")
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8d57c193f4e..b4bb3b0acce 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -411,8 +411,8 @@ This will generate compile-time constants from BINDINGS."
411 ;; Words inside \\[] tend to be for `substitute-command-keys'. 411 ;; Words inside \\[] tend to be for `substitute-command-keys'.
412 (,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]") 412 (,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]")
413 (1 font-lock-constant-face prepend)) 413 (1 font-lock-constant-face prepend))
414 ;; Words inside ‘’ and '' and `' tend to be symbol names. 414 ;; Words inside ‘’ and `' tend to be symbol names.
415 (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)" 415 (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
416 lisp-mode-symbol-regexp "\\)['’]") 416 lisp-mode-symbol-regexp "\\)['’]")
417 (1 font-lock-constant-face prepend)) 417 (1 font-lock-constant-face prepend))
418 ;; Constant values. 418 ;; Constant values.
@@ -463,8 +463,8 @@ This will generate compile-time constants from BINDINGS."
463 ;; Erroneous structures. 463 ;; Erroneous structures.
464 (,(concat "(" cl-errs-re "\\_>") 464 (,(concat "(" cl-errs-re "\\_>")
465 (1 font-lock-warning-face)) 465 (1 font-lock-warning-face))
466 ;; Words inside ‘’ and '' and `' tend to be symbol names. 466 ;; Words inside ‘’ and `' tend to be symbol names.
467 (,(concat "['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)" 467 (,(concat "[`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)"
468 lisp-mode-symbol-regexp "\\)['’]") 468 lisp-mode-symbol-regexp "\\)['’]")
469 (1 font-lock-constant-face prepend)) 469 (1 font-lock-constant-face prepend))
470 ;; Constant values. 470 ;; Constant values.
diff --git a/lisp/files.el b/lisp/files.el
index 9b045a8b6e8..bd9792a51a2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6843,8 +6843,8 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)."
6843 (cond ((= char ?r) #o0444) 6843 (cond ((= char ?r) #o0444)
6844 ((= char ?w) #o0222) 6844 ((= char ?w) #o0222)
6845 ((= char ?x) #o0111) 6845 ((= char ?x) #o0111)
6846 ((= char ?s) #o1000) 6846 ((= char ?s) #o6000)
6847 ((= char ?t) #o6000) 6847 ((= char ?t) #o1000)
6848 ;; Rights relative to the previous file modes. 6848 ;; Rights relative to the previous file modes.
6849 ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111)) 6849 ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111))
6850 ((= char ?u) (let ((uright (logand #o4700 from))) 6850 ((= char ?u) (let ((uright (logand #o4700 from)))
@@ -6900,7 +6900,7 @@ as in \"og+rX-w\"."
6900 (mapcar 'file-modes-char-to-who 6900 (mapcar 'file-modes-char-to-who
6901 (match-string 1 modes))))) 6901 (match-string 1 modes)))))
6902 (when (= num-who 0) 6902 (when (= num-who 0)
6903 (setq num-who (default-file-modes))) 6903 (setq num-who (logior #o7000 (default-file-modes))))
6904 (setq num-modes 6904 (setq num-modes
6905 (file-modes-rights-to-number (substring modes (match-end 1)) 6905 (file-modes-rights-to-number (substring modes (match-end 1))
6906 num-who num-modes) 6906 num-who num-modes)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 2df847acc25..dc9699099e8 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2935,11 +2935,15 @@ on encoding."
2935 (#xA000 . #xD7FF) 2935 (#xA000 . #xD7FF)
2936 ;; (#xD800 . #xFAFF) Surrogate/Private 2936 ;; (#xD800 . #xFAFF) Surrogate/Private
2937 (#xFB00 . #x134FF) 2937 (#xFB00 . #x134FF)
2938 ;; (#x13500 . #x167FF) unused 2938 ;; (#x13500 . #x143FF) unused
2939 (#x16800 . #x16A3F) 2939 (#x14400 . #x14646)
2940 ;; (#x16A40 . #x1AFFF) unused 2940 ;; (#x14647 . #x167FF) unused
2941 (#x16800 . #x16F9F)
2942 ;; (#x16FA0 . #x1AFFF) unused
2941 (#x1B000 . #x1B0FF) 2943 (#x1B000 . #x1B0FF)
2942 ;; (#x1B100 . #x1CFFF) unused 2944 ;; (#x1B100 . #x1BBFF) unused
2945 (#x1BC00 . #x1BCAF)
2946 ;; (#x1BCB0 . #x1CFFF) unused
2943 (#x1D000 . #x1FFFF) 2947 (#x1D000 . #x1FFFF)
2944 ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused 2948 ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused
2945 (#xE0000 . #xE01FF))) 2949 (#xE0000 . #xE01FF)))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index c91ccfad27d..b8ada2c766a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -224,7 +224,7 @@ Default value, nil, means edit the string instead."
224 224
225(autoload 'character-fold-to-regexp "character-fold") 225(autoload 'character-fold-to-regexp "character-fold")
226 226
227(defcustom search-default-mode #'character-fold-to-regexp 227(defcustom search-default-mode nil
228 "Default mode to use when starting isearch. 228 "Default mode to use when starting isearch.
229Value is nil, t, or a function. 229Value is nil, t, or a function.
230 230
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 68b3cfdf501..29926108c15 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2800,7 +2800,12 @@ The current mail message becomes the message displayed."
2800 ;; rmail-header-style based on the binding in effect when 2800 ;; rmail-header-style based on the binding in effect when
2801 ;; this function is called; `rmail-toggle-headers' can 2801 ;; this function is called; `rmail-toggle-headers' can
2802 ;; inspect this value to determine how to toggle. 2802 ;; inspect this value to determine how to toggle.
2803 (set (make-local-variable 'rmail-header-style) header-style)) 2803 (set (make-local-variable 'rmail-header-style) header-style)
2804 ;; In case viewing the previous message sets the paragraph
2805 ;; direction non-nil, we reset it here to allow independent
2806 ;; dynamic determination of paragraph direction in every
2807 ;; message.
2808 (setq bidi-paragraph-direction nil))
2804 (if (and rmail-enable-mime 2809 (if (and rmail-enable-mime
2805 rmail-show-mime-function 2810 rmail-show-mime-function
2806 (re-search-forward "mime-version: 1.0" nil t)) 2811 (re-search-forward "mime-version: 1.0" nil t))
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 07849484b78..1e5cc60ee51 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1758,12 +1758,13 @@ This performs fontification according to `js--class-styles'."
1758 (eq (char-after) ??)))) 1758 (eq (char-after) ??))))
1759 (not (and 1759 (not (and
1760 (eq (char-after) ?*) 1760 (eq (char-after) ?*)
1761 (looking-at (concat "\\* *" js--name-re " *(")) 1761 ;; Generator method (possibly using computed property).
1762 (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))
1762 (save-excursion 1763 (save-excursion
1763 (goto-char (1- (match-end 0))) 1764 (js--backward-syntactic-ws)
1764 (let (forward-sexp-function) (forward-sexp)) 1765 ;; We might misindent some expressions that would
1765 (js--forward-syntactic-ws) 1766 ;; return NaN anyway. Shouldn't be a problem.
1766 (eq (char-after) ?{))))))) 1767 (memq (char-before) '(?, ?} ?{))))))))
1767 1768
1768(defun js--continued-expression-p () 1769(defun js--continued-expression-p ()
1769 "Return non-nil if the current line continues an expression." 1770 "Return non-nil if the current line continues an expression."
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index fb942b34ddc..d2370741972 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -420,7 +420,10 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
420 420
421(defun ruby-smie--bosp () 421(defun ruby-smie--bosp ()
422 (save-excursion (skip-chars-backward " \t") 422 (save-excursion (skip-chars-backward " \t")
423 (or (bolp) (memq (char-before) '(?\; ?=))))) 423 (or (and (bolp)
424 ;; Newline is escaped.
425 (not (eq (char-before (1- (point))) ?\\)))
426 (memq (char-before) '(?\; ?=)))))
424 427
425(defun ruby-smie--implicit-semi-p () 428(defun ruby-smie--implicit-semi-p ()
426 (save-excursion 429 (save-excursion
@@ -428,17 +431,11 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
428 (not (or (bolp) 431 (not (or (bolp)
429 (memq (char-before) '(?\[ ?\()) 432 (memq (char-before) '(?\[ ?\())
430 (and (memq (char-before) 433 (and (memq (char-before)
431 '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\\ ?& ?> ?< ?% ?~ ?^)) 434 '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\\ ?& ?> ?< ?% ?~ ?^ ?= ??))
432 ;; Not a binary operator symbol. 435 ;; Not a binary operator symbol like :+ or :[]=.
433 (not (eq (char-before (1- (point))) ?:)) 436 ;; Or a (method or symbol) name ending with ?.
434 ;; Not the end of a regexp or a percent literal. 437 ;; Or the end of a regexp or a percent literal.
435 (not (memq (car (syntax-after (1- (point)))) '(7 15)))) 438 (not (memq (car (syntax-after (1- (point)))) '(3 7 15))))
436 (and (eq (char-before) ?\?)
437 (equal (save-excursion (ruby-smie--backward-token)) "?"))
438 (and (eq (char-before) ?=)
439 ;; Not a symbol :==, :!=, or a foo= method.
440 (string-match "\\`\\s." (save-excursion
441 (ruby-smie--backward-token))))
442 (and (eq (char-before) ?|) 439 (and (eq (char-before) ?|)
443 (member (save-excursion (ruby-smie--backward-token)) 440 (member (save-excursion (ruby-smie--backward-token))
444 '("|" "||"))) 441 '("|" "||")))
@@ -482,12 +479,16 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
482 "else" "elsif" "do" "end" "and") 479 "else" "elsif" "do" "end" "and")
483 'symbols)))) 480 'symbols))))
484 (memq (car (syntax-after pos)) '(7 15)) 481 (memq (car (syntax-after pos)) '(7 15))
485 (looking-at "[([]\\|[-+!~]\\sw\\|:\\(?:\\sw\\|\\s.\\)"))))) 482 (looking-at "[([]\\|[-+!~:]\\(?:\\sw\\|\\s_\\)")))))
486 483
487(defun ruby-smie--at-dot-call () 484(defun ruby-smie--before-method-name ()
485 ;; Only need to be accurate when method has keyword name.
488 (and (eq ?w (char-syntax (following-char))) 486 (and (eq ?w (char-syntax (following-char)))
489 (eq (char-before) ?.) 487 (or
490 (not (eq (char-before (1- (point))) ?.)))) 488 (and
489 (eq (char-before) ?.)
490 (not (eq (char-before (1- (point))) ?.)))
491 (looking-back "^\\s *def\\s +\\=" (line-beginning-position)))))
491 492
492(defun ruby-smie--forward-token () 493(defun ruby-smie--forward-token ()
493 (let ((pos (point))) 494 (let ((pos (point)))
@@ -508,11 +509,9 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
508 (save-excursion 509 (save-excursion
509 (ruby-smie--args-separator-p (prog1 (point) (goto-char pos))))) 510 (ruby-smie--args-separator-p (prog1 (point) (goto-char pos)))))
510 " @ ") 511 " @ ")
511 ((looking-at ":\\s.+")
512 (goto-char (match-end 0)) (match-string 0)) ;bug#15208.
513 ((looking-at "\\s\"") "") ;A string. 512 ((looking-at "\\s\"") "") ;A string.
514 (t 513 (t
515 (let ((dot (ruby-smie--at-dot-call)) 514 (let ((dot (ruby-smie--before-method-name))
516 (tok (smie-default-forward-token))) 515 (tok (smie-default-forward-token)))
517 (when dot 516 (when dot
518 (setq tok (concat "." tok))) 517 (setq tok (concat "." tok)))
@@ -556,11 +555,9 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
556 " @ ") 555 " @ ")
557 (t 556 (t
558 (let ((tok (smie-default-backward-token)) 557 (let ((tok (smie-default-backward-token))
559 (dot (ruby-smie--at-dot-call))) 558 (dot (ruby-smie--before-method-name)))
560 (when dot 559 (when dot
561 (setq tok (concat "." tok))) 560 (setq tok (concat "." tok)))
562 (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok))
563 (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208.
564 (cond 561 (cond
565 ((member tok '("unless" "if" "while" "until")) 562 ((member tok '("unless" "if" "while" "until"))
566 (if (ruby-smie--bosp) 563 (if (ruby-smie--bosp)
@@ -669,7 +666,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
669 ;; Align to the previous `when', but look up the virtual 666 ;; Align to the previous `when', but look up the virtual
670 ;; indentation of `case'. 667 ;; indentation of `case'.
671 (if (smie-rule-sibling-p) 0 (smie-rule-parent))) 668 (if (smie-rule-sibling-p) 0 (smie-rule-parent)))
672 (`(:after . ,(or "=" "iuwu-mod" "+" "-" "*" "/" "&&" "||" "%" "**" "^" "&" 669 (`(:after . ,(or "=" "+" "-" "*" "/" "&&" "||" "%" "**" "^" "&"
673 "<=>" ">" "<" ">=" "<=" "==" "===" "!=" "<<" ">>" 670 "<=>" ">" "<" ">=" "<=" "==" "===" "!=" "<<" ">>"
674 "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^=" "|" 671 "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^=" "|"
675 "<<=" ">>=" "&&=" "||=" "and" "or")) 672 "<<=" ">>=" "&&=" "||=" "and" "or"))
@@ -682,6 +679,8 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
682 (if (ruby-smie--indent-to-stmt-p token) 679 (if (ruby-smie--indent-to-stmt-p token)
683 (ruby-smie--indent-to-stmt) 680 (ruby-smie--indent-to-stmt)
684 (cons 'column (current-column))))) 681 (cons 'column (current-column)))))
682 (`(:before . "iuwu-mod")
683 (smie-rule-parent ruby-indent-level))
685 )) 684 ))
686 685
687(defun ruby--at-indentation-p (&optional point) 686(defun ruby--at-indentation-p (&optional point)
@@ -889,12 +888,18 @@ and `\\' when preceded by `?'."
889 ((and (eq c ?:) (or (not b) (eq (char-syntax b) ? )))) 888 ((and (eq c ?:) (or (not b) (eq (char-syntax b) ? ))))
890 ((eq c ?\\) (eq b ??))))) 889 ((eq c ?\\) (eq b ??)))))
891 890
892(defun ruby-singleton-class-p (&optional pos) 891(defun ruby-verify-heredoc (&optional pos)
893 (save-excursion 892 (save-excursion
894 (when pos (goto-char pos)) 893 (when pos (goto-char pos))
895 (forward-word -1) 894 ;; Not right after a symbol or prefix character.
896 (and (or (bolp) (not (eq (char-before (point)) ?_))) 895 ;; Method names are only allowed when separated by
897 (looking-at ruby-singleton-class-re)))) 896 ;; whitespace. Not a limitation in Ruby, but it's hard for
897 ;; us to do better.
898 (when (not (memq (car (syntax-after (1- (point)))) '(2 3 6 10)))
899 (or (not (memq (char-before) '(?\s ?\t)))
900 (ignore (forward-word -1))
901 (eq (char-before) ?_)
902 (not (looking-at ruby-singleton-class-re))))))
898 903
899(defun ruby-expr-beg (&optional option) 904(defun ruby-expr-beg (&optional option)
900 "Check if point is possibly at the beginning of an expression. 905 "Check if point is possibly at the beginning of an expression.
@@ -914,7 +919,7 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'."
914 nil) 919 nil)
915 ((looking-at ruby-operator-re)) 920 ((looking-at ruby-operator-re))
916 ((eq option 'heredoc) 921 ((eq option 'heredoc)
917 (and (< space 0) (not (ruby-singleton-class-p start)))) 922 (and (< space 0) (ruby-verify-heredoc start)))
918 ((or (looking-at "[\\[({,;]") 923 ((or (looking-at "[\\[({,;]")
919 (and (looking-at "[!?]") 924 (and (looking-at "[!?]")
920 (or (not (eq option 'modifier)) 925 (or (not (eq option 'modifier))
@@ -1842,17 +1847,22 @@ It will be properly highlighted even when the call omits parens.")
1842 (syntax-propertize-rules 1847 (syntax-propertize-rules
1843 ;; $' $" $` .... are variables. 1848 ;; $' $" $` .... are variables.
1844 ;; ?' ?" ?` are character literals (one-char strings in 1.9+). 1849 ;; ?' ?" ?` are character literals (one-char strings in 1.9+).
1845 ("\\([?$]\\)[#\"'`]" 1850 ("\\([?$]\\)[#\"'`:?]"
1846 (1 (if (save-excursion 1851 (1 (if (save-excursion
1847 (nth 3 (syntax-ppss (match-beginning 0)))) 1852 (nth 3 (syntax-ppss (match-beginning 0))))
1848 ;; Within a string, skip. 1853 ;; Within a string, skip.
1849 (goto-char (match-end 1)) 1854 (ignore
1850 (string-to-syntax "\\")))) 1855 (goto-char (match-end 1)))
1851 ;; Part of symbol when at the end of a method name. 1856 (put-text-property (match-end 1) (match-end 0)
1857 'syntax-table (string-to-syntax "_"))
1858 (string-to-syntax "'"))))
1859 ;; Symbols with special characters.
1860 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)\\)"
1861 (3 (string-to-syntax "_")))
1862 ;; Part of method name when at the end of it.
1852 ("[!?]" 1863 ("[!?]"
1853 (0 (unless (save-excursion 1864 (0 (unless (save-excursion
1854 (or (nth 8 (syntax-ppss (match-beginning 0))) 1865 (or (nth 8 (syntax-ppss (match-beginning 0)))
1855 (eq (char-before) ?:)
1856 (let (parse-sexp-lookup-properties) 1866 (let (parse-sexp-lookup-properties)
1857 (zerop (skip-syntax-backward "w_"))) 1867 (zerop (skip-syntax-backward "w_")))
1858 (memq (preceding-char) '(?@ ?$)))) 1868 (memq (preceding-char) '(?@ ?$))))
@@ -1887,15 +1897,18 @@ It will be properly highlighted even when the call omits parens.")
1887 ("^\\(=\\)begin\\_>" (1 "!")) 1897 ("^\\(=\\)begin\\_>" (1 "!"))
1888 ;; Handle here documents. 1898 ;; Handle here documents.
1889 ((concat ruby-here-doc-beg-re ".*\\(\n\\)") 1899 ((concat ruby-here-doc-beg-re ".*\\(\n\\)")
1890 (7 (unless (or (nth 8 (save-excursion 1900 (7 (when (and (not (nth 8 (save-excursion
1891 (syntax-ppss (match-beginning 0)))) 1901 (syntax-ppss (match-beginning 0)))))
1892 (ruby-singleton-class-p (match-beginning 0))) 1902 (ruby-verify-heredoc (match-beginning 0)))
1893 (put-text-property (match-beginning 7) (match-end 7) 1903 (put-text-property (match-beginning 7) (match-end 7)
1894 'syntax-table (string-to-syntax "\"")) 1904 'syntax-table (string-to-syntax "\""))
1895 (ruby-syntax-propertize-heredoc end)))) 1905 (ruby-syntax-propertize-heredoc end))))
1896 ;; Handle percent literals: %w(), %q{}, etc. 1906 ;; Handle percent literals: %w(), %q{}, etc.
1897 ((concat "\\(?:^\\|[[ \t\n<+(,=]\\)" ruby-percent-literal-beg-re) 1907 ((concat "\\(?:^\\|[[ \t\n<+(,=*]\\)" ruby-percent-literal-beg-re)
1898 (1 (prog1 "|" (ruby-syntax-propertize-percent-literal end))))) 1908 (1 (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 1))))
1909 ;; Not inside a string, a comment, or a percent literal.
1910 (ruby-syntax-propertize-percent-literal end)
1911 (string-to-syntax "|")))))
1899 (point) end))) 1912 (point) end)))
1900 1913
1901(define-obsolete-function-alias 1914(define-obsolete-function-alias
@@ -1910,7 +1923,7 @@ It will be properly highlighted even when the call omits parens.")
1910 (beginning-of-line) 1923 (beginning-of-line)
1911 (while (re-search-forward ruby-here-doc-beg-re 1924 (while (re-search-forward ruby-here-doc-beg-re
1912 (line-end-position) t) 1925 (line-end-position) t)
1913 (unless (ruby-singleton-class-p (match-beginning 0)) 1926 (when (ruby-verify-heredoc (match-beginning 0))
1914 (push (concat (ruby-here-doc-end-match) "\n") res)))) 1927 (push (concat (ruby-here-doc-end-match) "\n") res))))
1915 (save-excursion 1928 (save-excursion
1916 ;; With multiple openers on the same line, we don't know in which 1929 ;; With multiple openers on the same line, we don't know in which
@@ -1938,35 +1951,33 @@ It will be properly highlighted even when the call omits parens.")
1938 1951
1939(defun ruby-syntax-propertize-percent-literal (limit) 1952(defun ruby-syntax-propertize-percent-literal (limit)
1940 (goto-char (match-beginning 2)) 1953 (goto-char (match-beginning 2))
1941 ;; Not inside a simple string or comment. 1954 (let* ((op (char-after))
1942 (when (eq t (nth 3 (syntax-ppss))) 1955 (ops (char-to-string op))
1943 (let* ((op (char-after)) 1956 (cl (or (cdr (aref (syntax-table) op))
1944 (ops (char-to-string op)) 1957 (cdr (assoc op '((?< . ?>))))))
1945 (cl (or (cdr (aref (syntax-table) op)) 1958 parse-sexp-lookup-properties)
1946 (cdr (assoc op '((?< . ?>)))))) 1959 (save-excursion
1947 parse-sexp-lookup-properties) 1960 (condition-case nil
1948 (save-excursion 1961 (progn
1949 (condition-case nil 1962 (if cl ; Paired delimiters.
1950 (progn 1963 ;; Delimiter pairs of the same kind can be nested
1951 (if cl ; Paired delimiters. 1964 ;; inside the literal, as long as they are balanced.
1952 ;; Delimiter pairs of the same kind can be nested 1965 ;; Create syntax table that ignores other characters.
1953 ;; inside the literal, as long as they are balanced. 1966 (with-syntax-table (make-char-table 'syntax-table nil)
1954 ;; Create syntax table that ignores other characters. 1967 (modify-syntax-entry op (concat "(" (char-to-string cl)))
1955 (with-syntax-table (make-char-table 'syntax-table nil) 1968 (modify-syntax-entry cl (concat ")" ops))
1956 (modify-syntax-entry op (concat "(" (char-to-string cl))) 1969 (modify-syntax-entry ?\\ "\\")
1957 (modify-syntax-entry cl (concat ")" ops)) 1970 (save-restriction
1958 (modify-syntax-entry ?\\ "\\") 1971 (narrow-to-region (point) limit)
1959 (save-restriction 1972 (forward-list))) ; skip to the paired character
1960 (narrow-to-region (point) limit) 1973 ;; Single character delimiter.
1961 (forward-list))) ; skip to the paired character 1974 (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*"
1962 ;; Single character delimiter. 1975 (regexp-quote ops)) limit nil))
1963 (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*" 1976 ;; Found the closing delimiter.
1964 (regexp-quote ops)) limit nil)) 1977 (put-text-property (1- (point)) (point) 'syntax-table
1965 ;; Found the closing delimiter. 1978 (string-to-syntax "|")))
1966 (put-text-property (1- (point)) (point) 'syntax-table 1979 ;; Unclosed literal, do nothing.
1967 (string-to-syntax "|"))) 1980 ((scan-error search-failed))))))
1968 ;; Unclosed literal, do nothing.
1969 ((scan-error search-failed)))))))
1970 1981
1971(defun ruby-syntax-propertize-expansion () 1982(defun ruby-syntax-propertize-expansion ()
1972 ;; Save the match data to a text property, for font-locking later. 1983 ;; Save the match data to a text property, for font-locking later.
@@ -2158,7 +2169,7 @@ See `font-lock-syntax-table'.")
2158 (1 font-lock-builtin-face)) 2169 (1 font-lock-builtin-face))
2159 ;; Here-doc beginnings. 2170 ;; Here-doc beginnings.
2160 (,ruby-here-doc-beg-re 2171 (,ruby-here-doc-beg-re
2161 (0 (unless (ruby-singleton-class-p (match-beginning 0)) 2172 (0 (when (ruby-verify-heredoc (match-beginning 0))
2162 'font-lock-string-face))) 2173 'font-lock-string-face)))
2163 ;; Perl-ish keywords. 2174 ;; Perl-ish keywords.
2164 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" 2175 "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
@@ -2169,17 +2180,14 @@ See `font-lock-syntax-table'.")
2169 ;; Keywords that evaluate to certain values. 2180 ;; Keywords that evaluate to certain values.
2170 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" 2181 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
2171 (0 font-lock-builtin-face)) 2182 (0 font-lock-builtin-face))
2172 ;; Symbols with symbol characters. 2183 ;; Symbols.
2173 ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" 2184 ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?"
2174 (2 font-lock-constant-face) 2185 (2 font-lock-constant-face)
2175 (3 (unless (and (eq (char-before (match-end 3)) ?=) 2186 (3 (unless (and (eq (char-before (match-end 3)) ?=)
2176 (eq (char-after (match-end 3)) ?>)) 2187 (eq (char-after (match-end 3)) ?>))
2177 ;; bug#18466 2188 ;; bug#18644
2178 font-lock-constant-face) 2189 font-lock-constant-face)
2179 nil t)) 2190 nil t))
2180 ;; Symbols with special characters.
2181 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2182 2 font-lock-constant-face)
2183 ;; Special globals. 2191 ;; Special globals.
2184 (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" 2192 (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
2185 (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME" 2193 (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME"
@@ -2219,7 +2227,7 @@ See `font-lock-syntax-table'.")
2219 1 font-lock-negation-char-face) 2227 1 font-lock-negation-char-face)
2220 ;; Character literals. 2228 ;; Character literals.
2221 ;; FIXME: Support longer escape sequences. 2229 ;; FIXME: Support longer escape sequences.
2222 ("\\_<\\?\\\\?\\S " 0 font-lock-string-face) 2230 ("\\?\\\\?\\_<.\\_>" 0 font-lock-string-face)
2223 ;; Regexp options. 2231 ;; Regexp options.
2224 ("\\(?:\\s|\\|/\\)\\([imxo]+\\)" 2232 ("\\(?:\\s|\\|/\\)\\([imxo]+\\)"
2225 1 (when (save-excursion 2233 1 (when (save-excursion
diff --git a/lisp/simple.el b/lisp/simple.el
index 8c9d546bb72..e5fb5f031dd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3195,6 +3195,8 @@ shell (with its need to quote arguments)."
3195 "Execute string COMMAND in inferior shell; display output, if any. 3195 "Execute string COMMAND in inferior shell; display output, if any.
3196With prefix argument, insert the COMMAND's output at point. 3196With prefix argument, insert the COMMAND's output at point.
3197 3197
3198Interactively, prompt for COMMAND in the minibuffer.
3199
3198If COMMAND ends in `&', execute it asynchronously. 3200If COMMAND ends in `&', execute it asynchronously.
3199The output appears in the buffer `*Async Shell Command*'. 3201The output appears in the buffer `*Async Shell Command*'.
3200That buffer is in shell mode. You can also use 3202That buffer is in shell mode. You can also use
diff --git a/lisp/wdired.el b/lisp/wdired.el
index d943dada030..91093032125 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -304,14 +304,15 @@ or \\[wdired-abort-changes] to abort changes")))
304 (put-text-property b-protection (point-max) 'read-only t)))) 304 (put-text-property b-protection (point-max) 'read-only t))))
305 305
306;; This code is a copy of some dired-get-filename lines. 306;; This code is a copy of some dired-get-filename lines.
307(defsubst wdired-normalize-filename (file) 307(defsubst wdired-normalize-filename (file unquotep)
308 (setq file 308 (when unquotep
309 ;; FIXME: shouldn't we check for a `b' argument or somesuch before 309 (setq file
310 ;; doing such unquoting? --Stef 310 ;; FIXME: shouldn't we check for a `b' argument or somesuch before
311 (read (concat 311 ;; doing such unquoting? --Stef
312 "\"" (replace-regexp-in-string 312 (read (concat
313 "\\([^\\]\\|\\`\\)\"" "\\1\\\\\"" file) 313 "\"" (replace-regexp-in-string
314 "\""))) 314 "\\([^\\]\\|\\`\\)\"" "\\1\\\\\"" file)
315 "\""))))
315 (and file buffer-file-coding-system 316 (and file buffer-file-coding-system
316 (not file-name-coding-system) 317 (not file-name-coding-system)
317 (not default-file-name-coding-system) 318 (not default-file-name-coding-system)
@@ -339,7 +340,8 @@ non-nil means return old filename."
339 ;; deletion. 340 ;; deletion.
340 (setq end (next-single-property-change beg 'end-name)) 341 (setq end (next-single-property-change beg 'end-name))
341 (setq file (buffer-substring-no-properties (1+ beg) end))) 342 (setq file (buffer-substring-no-properties (1+ beg) end)))
342 (and file (setq file (wdired-normalize-filename file)))) 343 ;; Don't unquote the old name, it wasn't quoted in the first place
344 (and file (setq file (wdired-normalize-filename file (not old)))))
343 (if (or no-dir old) 345 (if (or no-dir old)
344 file 346 file
345 (and file (> (length file) 0) 347 (and file (> (length file) 0)
@@ -644,7 +646,7 @@ If OLD, return the old target. If MOVE, move point before it."
644 (setq end (next-single-property-change beg 'end-link)) 646 (setq end (next-single-property-change beg 'end-link))
645 (setq target (buffer-substring-no-properties (1+ beg) end))) 647 (setq target (buffer-substring-no-properties (1+ beg) end)))
646 (if move (goto-char (1- beg))))) 648 (if move (goto-char (1- beg)))))
647 (and target (wdired-normalize-filename target)))) 649 (and target (wdired-normalize-filename target t))))
648 650
649(declare-function make-symbolic-link "fileio.c") 651(declare-function make-symbolic-link "fileio.c")
650 652