aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2016-01-30 11:28:37 -0800
committerPaul Eggert2016-01-30 11:28:37 -0800
commit1a9cec16fe8d805dbb9f3a082bebcdefb878cf13 (patch)
treed9aeebb668e61da05bbf2ef88eabc9b4f015923a /lisp
parent3b71a72a777237c8ef34835a2021adc8eb5e5c7f (diff)
parent3f481ad0072ea4fe300af7f326de9049a8d32d4a (diff)
downloademacs-1a9cec16fe8d805dbb9f3a082bebcdefb878cf13.tar.gz
emacs-1a9cec16fe8d805dbb9f3a082bebcdefb878cf13.zip
Merge from origin/emacs-25
3f481ad Rename xref-query-replace to xref-query-replace-in-results 62f4ed4 Update cl-defgeneric and cl-defmethod docstrings 2111e0e Comment out next-error-function integration in xref 4e11ad3 Correct a use of "which" in intro.texi a1865bc Distinguish the two meanings of Java's keyword "default". Fixes bug #22358. 76045f7 Don't operate on menu bar of nonexistent frame c32f3bc Unbreak the GNUstep build.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired-aux.el4
-rw-r--r--lisp/emacs-lisp/cl-generic.el24
-rw-r--r--lisp/progmodes/cc-engine.el15
-rw-r--r--lisp/progmodes/cc-langs.el4
-rw-r--r--lisp/progmodes/xref.el10
5 files changed, 38 insertions, 19 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index ab10edeedbf..9bcb1f94b56 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -2714,7 +2714,7 @@ with the command \\[tags-loop-continue]."
2714 '(dired-get-marked-files nil nil 'dired-nondirectory-p))) 2714 '(dired-get-marked-files nil nil 'dired-nondirectory-p)))
2715 2715
2716(declare-function xref--show-xrefs "xref") 2716(declare-function xref--show-xrefs "xref")
2717(declare-function xref-query-replace "xref") 2717(declare-function xref-query-replace-in-results "xref")
2718 2718
2719;;;###autoload 2719;;;###autoload
2720(defun dired-do-find-regexp (regexp) 2720(defun dired-do-find-regexp (regexp)
@@ -2746,7 +2746,7 @@ with the command \\[tags-loop-continue]."
2746 "Query replace regexp in marked files" t t))) 2746 "Query replace regexp in marked files" t t)))
2747 (list (nth 0 common) (nth 1 common)))) 2747 (list (nth 0 common) (nth 1 common))))
2748 (with-current-buffer (dired-do-find-regexp from) 2748 (with-current-buffer (dired-do-find-regexp from)
2749 (xref-query-replace from to))) 2749 (xref-query-replace-in-results from to)))
2750 2750
2751(defun dired-nondirectory-p (file) 2751(defun dired-nondirectory-p (file)
2752 (not (file-directory-p file))) 2752 (not (file-directory-p file)))
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index b0815f5cf5f..5413bdbdf7f 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -83,8 +83,6 @@
83;; - A generic "filter" generalizer (e.g. could be used to cleanly add methods 83;; - A generic "filter" generalizer (e.g. could be used to cleanly add methods
84;; to cl-generic-combine-methods with a specializer that says it applies only 84;; to cl-generic-combine-methods with a specializer that says it applies only
85;; when some particular qualifier is used). 85;; when some particular qualifier is used).
86;; - A way to dispatch on the context (e.g. the major-mode, some global
87;; variable, you name it).
88 86
89;;; Code: 87;;; Code:
90 88
@@ -195,9 +193,9 @@ OPTIONS-AND-METHODS currently understands:
195- (declare DECLARATIONS) 193- (declare DECLARATIONS)
196- (:argument-precedence-order &rest ARGS) 194- (:argument-precedence-order &rest ARGS)
197- (:method [QUALIFIERS...] ARGS &rest BODY) 195- (:method [QUALIFIERS...] ARGS &rest BODY)
198BODY, if present, is used as the body of a default method. 196DEFAULT-BODY, if present, is used as the body of a default method.
199 197
200\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest BODY)" 198\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)"
201 (declare (indent 2) (doc-string 3)) 199 (declare (indent 2) (doc-string 3))
202 (let* ((doc (if (stringp (car-safe options-and-methods)) 200 (let* ((doc (if (stringp (car-safe options-and-methods))
203 (pop options-and-methods))) 201 (pop options-and-methods)))
@@ -360,10 +358,10 @@ the specializer used will be the one returned by BODY."
360(defmacro cl-defmethod (name args &rest body) 358(defmacro cl-defmethod (name args &rest body)
361 "Define a new method for generic function NAME. 359 "Define a new method for generic function NAME.
362I.e. it defines the implementation of NAME to use for invocations where the 360I.e. it defines the implementation of NAME to use for invocations where the
363value of the dispatch argument matches the specified TYPE. 361values of the dispatch arguments match the specified TYPEs.
364The dispatch argument has to be one of the mandatory arguments, and 362The dispatch arguments have to be among the mandatory arguments, and
365all methods of NAME have to use the same argument for dispatch. 363all methods of NAME have to use the same set of arguments for dispatch.
366The dispatch argument and TYPE are specified in ARGS where the corresponding 364Each dispatch argument and TYPE are specified in ARGS where the corresponding
367formal argument appears as (VAR TYPE) rather than just VAR. 365formal argument appears as (VAR TYPE) rather than just VAR.
368 366
369The optional second argument QUALIFIER is a specifier that 367The optional second argument QUALIFIER is a specifier that
@@ -373,8 +371,14 @@ modifies how the method is combined with other methods, including:
373 :around - Method will be called around everything else 371 :around - Method will be called around everything else
374The absence of QUALIFIER means this is a \"primary\" method. 372The absence of QUALIFIER means this is a \"primary\" method.
375 373
376Other than a type, TYPE can also be of the form `(eql VAL)' in 374TYPE can be one of the basic types (see the full list and their
377which case this method will be invoked when the argument is `eql' to VAL. 375hierarchy in `cl--generic-typeof-types'), CL struct type, or an
376EIEIO class.
377
378Other than that, TYPE can also be of the form `(eql VAL)' in
379which case this method will be invoked when the argument is `eql'
380to VAL, or `(head VAL)', in which case the argument is required
381to be a cons with VAL as its head.
378 382
379\(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" 383\(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)"
380 (declare (doc-string 3) (indent 2) 384 (declare (doc-string 3) (indent 2)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7d3f5282214..018805d679f 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -10066,7 +10066,19 @@ comment at the start of cc-engine.el for more info."
10066 paren-state))) 10066 paren-state)))
10067 10067
10068 ;; CASE 14: A case or default label 10068 ;; CASE 14: A case or default label
10069 ((looking-at c-label-kwds-regexp) 10069 ((save-excursion
10070 (and (looking-at c-label-kwds-regexp)
10071 (or (c-major-mode-is 'idl-mode)
10072 (and
10073 containing-sexp
10074 (goto-char containing-sexp)
10075 (eq (char-after) ?{)
10076 (progn (c-backward-syntactic-ws) t)
10077 (eq (char-before) ?\))
10078 (c-go-list-backward)
10079 (progn (c-backward-syntactic-ws) t)
10080 (c-simple-skip-symbol-backward)
10081 (looking-at c-block-stmt-2-key)))))
10070 (if containing-sexp 10082 (if containing-sexp
10071 (progn 10083 (progn
10072 (goto-char containing-sexp) 10084 (goto-char containing-sexp)
@@ -10082,6 +10094,7 @@ comment at the start of cc-engine.el for more info."
10082 ((save-excursion 10094 ((save-excursion
10083 (back-to-indentation) 10095 (back-to-indentation)
10084 (and (not (looking-at c-syntactic-ws-start)) 10096 (and (not (looking-at c-syntactic-ws-start))
10097 (not (looking-at c-label-kwds-regexp))
10085 (c-forward-label))) 10098 (c-forward-label)))
10086 (cond (containing-decl-open 10099 (cond (containing-decl-open
10087 (setq placeholder (c-add-class-syntax 'inclass 10100 (setq placeholder (c-add-class-syntax 'inclass
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index b52da3f662d..ef894043bce 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1972,8 +1972,8 @@ will be handled."
1972 ;; In CORBA CIDL: 1972 ;; In CORBA CIDL:
1973 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") 1973 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn")
1974 ;; Note: "const" is not used in Java, but it's still a reserved keyword. 1974 ;; Note: "const" is not used in Java, but it's still a reserved keyword.
1975 java '("abstract" "const" "final" "native" "private" "protected" "public" 1975 java '("abstract" "const" "default" "final" "native" "private" "protected"
1976 "static" "strictfp" "synchronized" "transient" "volatile") 1976 "public" "static" "strictfp" "synchronized" "transient" "volatile")
1977 pike '("final" "inline" "local" "nomask" "optional" "private" "protected" 1977 pike '("final" "inline" "local" "nomask" "optional" "private" "protected"
1978 "public" "static" "variant")) 1978 "public" "static" "variant"))
1979 1979
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index d32da371771..267853d1642 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -502,7 +502,7 @@ WINDOW controls how the buffer is displayed:
502 (xref-quit) 502 (xref-quit)
503 (xref--pop-to-location xref window))) 503 (xref--pop-to-location xref window)))
504 504
505(defun xref-query-replace (from to) 505(defun xref-query-replace-in-results (from to)
506 "Perform interactive replacement of FROM with TO in all displayed xrefs. 506 "Perform interactive replacement of FROM with TO in all displayed xrefs.
507 507
508This command interactively replaces FROM with TO in the names of the 508This command interactively replaces FROM with TO in the names of the
@@ -589,7 +589,7 @@ references displayed in the current *xref* buffer."
589 (define-key map [remap quit-window] #'xref-quit) 589 (define-key map [remap quit-window] #'xref-quit)
590 (define-key map (kbd "n") #'xref-next-line) 590 (define-key map (kbd "n") #'xref-next-line)
591 (define-key map (kbd "p") #'xref-prev-line) 591 (define-key map (kbd "p") #'xref-prev-line)
592 (define-key map (kbd "r") #'xref-query-replace) 592 (define-key map (kbd "r") #'xref-query-replace-in-results)
593 (define-key map (kbd "RET") #'xref-goto-xref) 593 (define-key map (kbd "RET") #'xref-goto-xref)
594 (define-key map (kbd "C-o") #'xref-show-location-at-point) 594 (define-key map (kbd "C-o") #'xref-show-location-at-point)
595 ;; suggested by Johan Claesson "to further reduce finger movement": 595 ;; suggested by Johan Claesson "to further reduce finger movement":
@@ -600,8 +600,10 @@ references displayed in the current *xref* buffer."
600(define-derived-mode xref--xref-buffer-mode special-mode "XREF" 600(define-derived-mode xref--xref-buffer-mode special-mode "XREF"
601 "Mode for displaying cross-references." 601 "Mode for displaying cross-references."
602 (setq buffer-read-only t) 602 (setq buffer-read-only t)
603 (setq next-error-function #'xref--next-error-function) 603 ;; FIXME: http://debbugs.gnu.org/20489
604 (setq next-error-last-buffer (current-buffer))) 604 ;; (setq next-error-function #'xref--next-error-function)
605 ;; (setq next-error-last-buffer (current-buffer))
606 )
605 607
606(defun xref--next-error-function (n reset?) 608(defun xref--next-error-function (n reset?)
607 (when reset? 609 (when reset?