diff options
| author | Joakim Verona | 2015-01-22 08:27:13 +0100 |
|---|---|---|
| committer | Joakim Verona | 2015-01-22 08:27:13 +0100 |
| commit | 5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315 (patch) | |
| tree | c9e3511c8164d2154c91820e0d90521762dc7bdf /lisp | |
| parent | d6ada5ae0fad7a5c85eb28b102bc460e9fe0aceb (diff) | |
| parent | 7f4e7dd378c456b498c270b47b46aaae365a72ab (diff) | |
| download | emacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.tar.gz emacs-5c1d2b0f06ddb1f6b520b2446ce9e207e5bfc315.zip | |
merge master
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 38 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-generic.el | 5 | ||||
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc-dcc.el | 3 | ||||
| -rw-r--r-- | lisp/ffap.el | 4 | ||||
| -rw-r--r-- | lisp/files.el | 2 | ||||
| -rw-r--r-- | lisp/help.el | 2 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/etags.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 73 | ||||
| -rw-r--r-- | lisp/url/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/url/url-dav.el | 6 |
13 files changed, 108 insertions, 50 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7aa66bf9ad5..5cceb19ff1a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2015-01-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't downcase system diagnostics' first letters | ||
| 4 | * emacs-lisp/bytecomp.el (byte-compile-file): | ||
| 5 | * ffap.el (find-file-at-point): | ||
| 6 | * files.el (insert-file-1): | ||
| 7 | * net/ange-ftp.el (ange-ftp-barf-if-not-directory) | ||
| 8 | (ange-ftp-copy-file-internal): | ||
| 9 | * progmodes/etags.el (visit-tags-table): | ||
| 10 | Keep diagnostics consistent with system's. | ||
| 11 | * ffap.el (ffap-machine-p): | ||
| 12 | Ignore case while comparing diagnostics. | ||
| 13 | |||
| 14 | 2015-01-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 15 | |||
| 16 | * help.el (help-make-usage): Don't turn a "_" arg into an empty-string | ||
| 17 | arg (bug#19645). | ||
| 18 | * emacs-lisp/cl-generic.el (cl--generic-lambda): Don't confuse a string | ||
| 19 | body with a docstring. | ||
| 20 | |||
| 21 | 2015-01-22 Dmitry Gutov <dgutov@yandex.ru> | ||
| 22 | |||
| 23 | * progmodes/xref.el (xref-location-marker, xref-location-group): | ||
| 24 | Use `cl-defgeneric' and `cl-defmethod' instead of the EIEIO | ||
| 25 | counterparts. | ||
| 26 | |||
| 27 | * progmodes/etags.el (xref-location-marker): Same. | ||
| 28 | |||
| 29 | * progmodes/xref.el (xref--current): Rename from `xref--selected'. | ||
| 30 | (xref--inhibit-mark-current): Rename from | ||
| 31 | `xref--inhibit-mark-selected'. Update the usages. | ||
| 32 | (xref-quit): Reword the docstring. Kill buffers after quitting | ||
| 33 | windows instead of before. | ||
| 34 | (xref--insert-xrefs): Tweak help-echo. | ||
| 35 | (xref--read-identifier-history, xref--read-pattern-history): | ||
| 36 | New variables. | ||
| 37 | (xref--read-identifier, xref-find-apropos): Use them. | ||
| 38 | |||
| 1 | 2015-01-21 Ulrich Müller <ulm@gentoo.org> | 39 | 2015-01-21 Ulrich Müller <ulm@gentoo.org> |
| 2 | 40 | ||
| 3 | * play/gamegrid.el (gamegrid-add-score-with-update-game-score): | 41 | * play/gamegrid.el (gamegrid-add-score-with-update-game-score): |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8440570d755..2bd8d07851b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1863,8 +1863,8 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 1863 | (signal 'file-error | 1863 | (signal 'file-error |
| 1864 | (list "Opening output file" | 1864 | (list "Opening output file" |
| 1865 | (if (file-exists-p target-file) | 1865 | (if (file-exists-p target-file) |
| 1866 | "cannot overwrite file" | 1866 | "Cannot overwrite file" |
| 1867 | "directory not writable or nonexistent") | 1867 | "Directory not writable or nonexistent") |
| 1868 | target-file))) | 1868 | target-file))) |
| 1869 | (kill-buffer (current-buffer))) | 1869 | (kill-buffer (current-buffer))) |
| 1870 | (if (and byte-compile-generate-call-tree | 1870 | (if (and byte-compile-generate-call-tree |
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 8dee9a38ab0..f214faff237 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el | |||
| @@ -228,7 +228,8 @@ This macro can only be used within the lexical scope of a cl-generic method." | |||
| 228 | "Make the lambda expression for a method with ARGS and BODY." | 228 | "Make the lambda expression for a method with ARGS and BODY." |
| 229 | (let ((plain-args ()) | 229 | (let ((plain-args ()) |
| 230 | (specializers nil) | 230 | (specializers nil) |
| 231 | (doc-string (if (stringp (car-safe body)) (pop body))) | 231 | (doc-string (if (and (stringp (car-safe body)) (cdr body)) |
| 232 | (pop body))) | ||
| 232 | (mandatory t)) | 233 | (mandatory t)) |
| 233 | (dolist (arg args) | 234 | (dolist (arg args) |
| 234 | (push (pcase arg | 235 | (push (pcase arg |
| @@ -252,7 +253,7 @@ This macro can only be used within the lexical scope of a cl-generic method." | |||
| 252 | ;; destructuring args, `declare' and whatnot). | 253 | ;; destructuring args, `declare' and whatnot). |
| 253 | (pcase (macroexpand fun macroenv) | 254 | (pcase (macroexpand fun macroenv) |
| 254 | (`#'(lambda ,args . ,body) | 255 | (`#'(lambda ,args . ,body) |
| 255 | (let* ((doc-string (and doc-string (stringp (car body)) | 256 | (let* ((doc-string (and doc-string (stringp (car body)) (cdr body) |
| 256 | (pop body))) | 257 | (pop body))) |
| 257 | (cnm (make-symbol "cl--cnm")) | 258 | (cnm (make-symbol "cl--cnm")) |
| 258 | (nmp (make-symbol "cl--nmp")) | 259 | (nmp (make-symbol "cl--nmp")) |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 1b54fb6a48d..28ac7d38b96 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-01-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't downcase system diagnostics' first letters | ||
| 4 | * erc-dcc.el (erc-dcc-server): Ignore case while comparing diagnostics. | ||
| 5 | |||
| 1 | 2014-11-23 Michael Albinus <michael.albinus@gmx.de> | 6 | 2014-11-23 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * erc-desktop-notifications.el (erc-notifications-bus): | 8 | * erc-desktop-notifications.el (erc-notifications-bus): |
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 9d52c3b7c09..182f1e05921 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -379,7 +379,7 @@ created subprocess, or nil." | |||
| 379 | (set-process-filter-multibyte process nil))))) | 379 | (set-process-filter-multibyte process nil))))) |
| 380 | (file-error | 380 | (file-error |
| 381 | (unless (and (string= "Cannot bind server socket" (nth 1 err)) | 381 | (unless (and (string= "Cannot bind server socket" (nth 1 err)) |
| 382 | (string= "address already in use" (nth 2 err))) | 382 | (string= "address already in use" (downcase (nth 2 err)))) |
| 383 | (signal (car err) (cdr err))) | 383 | (signal (car err) (cdr err))) |
| 384 | (setq port (1+ port)) | 384 | (setq port (1+ port)) |
| 385 | (unless (< port upper) | 385 | (unless (< port upper) |
| @@ -1264,4 +1264,3 @@ other client." | |||
| 1264 | ;; Local Variables: | 1264 | ;; Local Variables: |
| 1265 | ;; indent-tabs-mode: nil | 1265 | ;; indent-tabs-mode: nil |
| 1266 | ;; End: | 1266 | ;; End: |
| 1267 | |||
diff --git a/lisp/ffap.el b/lisp/ffap.el index 1b8ea60e03b..350a6bdac20 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -476,7 +476,7 @@ Returned values: | |||
| 476 | ;; (file-error "connection failed" "address already in use" | 476 | ;; (file-error "connection failed" "address already in use" |
| 477 | ;; "ftp.uu.net" "ffap-machine-p") | 477 | ;; "ftp.uu.net" "ffap-machine-p") |
| 478 | ((equal mesg "connection failed") | 478 | ((equal mesg "connection failed") |
| 479 | (if (equal (nth 2 error) "permission denied") | 479 | (if (string= (downcase (nth 2 error)) "permission denied") |
| 480 | nil ; host does not exist | 480 | nil ; host does not exist |
| 481 | ;; Other errors mean the host exists: | 481 | ;; Other errors mean the host exists: |
| 482 | (nth 2 error))) | 482 | (nth 2 error))) |
| @@ -1439,7 +1439,7 @@ and the functions `ffap-file-at-point' and `ffap-url-at-point'." | |||
| 1439 | (expand-file-name filename))) | 1439 | (expand-file-name filename))) |
| 1440 | ;; User does not want to find a non-existent file: | 1440 | ;; User does not want to find a non-existent file: |
| 1441 | ((signal 'file-error (list "Opening file buffer" | 1441 | ((signal 'file-error (list "Opening file buffer" |
| 1442 | "no such file or directory" | 1442 | "No such file or directory" |
| 1443 | filename))))))) | 1443 | filename))))))) |
| 1444 | 1444 | ||
| 1445 | ;; Shortcut: allow {M-x ffap} rather than {M-x find-file-at-point}. | 1445 | ;; Shortcut: allow {M-x ffap} rather than {M-x find-file-at-point}. |
diff --git a/lisp/files.el b/lisp/files.el index e9632edacef..ed1943dfc28 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2128,7 +2128,7 @@ This function ensures that none of these modifications will take place." | |||
| 2128 | 2128 | ||
| 2129 | (defun insert-file-1 (filename insert-func) | 2129 | (defun insert-file-1 (filename insert-func) |
| 2130 | (if (file-directory-p filename) | 2130 | (if (file-directory-p filename) |
| 2131 | (signal 'file-error (list "Opening input file" "file is a directory" | 2131 | (signal 'file-error (list "Opening input file" "Is a directory" |
| 2132 | filename))) | 2132 | filename))) |
| 2133 | ;; Check whether the file is uncommonly large | 2133 | ;; Check whether the file is uncommonly large |
| 2134 | (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert" filename) | 2134 | (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert" filename) |
diff --git a/lisp/help.el b/lisp/help.el index 39ec6be1fde..bf724252d5a 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1445,7 +1445,7 @@ the same names as used in the original source code, when possible." | |||
| 1445 | (let ((name (symbol-name arg))) | 1445 | (let ((name (symbol-name arg))) |
| 1446 | (cond | 1446 | (cond |
| 1447 | ((string-match "\\`&" name) arg) | 1447 | ((string-match "\\`&" name) arg) |
| 1448 | ((string-match "\\`_" name) | 1448 | ((string-match "\\`_." name) |
| 1449 | (intern (upcase (substring name 1)))) | 1449 | (intern (upcase (substring name 1)))) |
| 1450 | (t (intern (upcase name))))))) | 1450 | (t (intern (upcase name))))))) |
| 1451 | arglist))) | 1451 | arglist))) |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 17db6e76ec9..52153ad8322 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1536,8 +1536,8 @@ then kill the related FTP process." | |||
| 1536 | (signal 'file-error | 1536 | (signal 'file-error |
| 1537 | (list "Opening directory" | 1537 | (list "Opening directory" |
| 1538 | (if (file-exists-p directory) | 1538 | (if (file-exists-p directory) |
| 1539 | "not a directory" | 1539 | "Not a directory" |
| 1540 | "no such file or directory") | 1540 | "No such file or directory") |
| 1541 | directory)))) | 1541 | directory)))) |
| 1542 | 1542 | ||
| 1543 | ;;;; ------------------------------------------------------------ | 1543 | ;;;; ------------------------------------------------------------ |
| @@ -3664,7 +3664,7 @@ so return the size on the remote host exactly. See RFC 3659." | |||
| 3664 | 3664 | ||
| 3665 | (or (file-exists-p filename) | 3665 | (or (file-exists-p filename) |
| 3666 | (signal 'file-error | 3666 | (signal 'file-error |
| 3667 | (list "Copy file" "no such file or directory" filename))) | 3667 | (list "Copy file" "No such file or directory" filename))) |
| 3668 | 3668 | ||
| 3669 | ;; canonicalize newname if a directory. | 3669 | ;; canonicalize newname if a directory. |
| 3670 | (if (file-directory-p newname) | 3670 | (if (file-directory-p newname) |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index dc3380d02f6..b470352f8dc 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -308,7 +308,7 @@ file the tag was in." | |||
| 308 | (save-excursion | 308 | (save-excursion |
| 309 | (or (visit-tags-table-buffer file) | 309 | (or (visit-tags-table-buffer file) |
| 310 | (signal 'file-error (list "Visiting tags table" | 310 | (signal 'file-error (list "Visiting tags table" |
| 311 | "file does not exist" | 311 | "No such file or directory" |
| 312 | file))) | 312 | file))) |
| 313 | ;; Set FILE to the expanded name. | 313 | ;; Set FILE to the expanded name. |
| 314 | (setq file tags-file-name))) | 314 | (setq file tags-file-name))) |
| @@ -2122,7 +2122,7 @@ for \\[find-tag] (which see)." | |||
| 2122 | (make-instance 'xref-etags-location :tag-info tag-info | 2122 | (make-instance 'xref-etags-location :tag-info tag-info |
| 2123 | :file (expand-file-name file))) | 2123 | :file (expand-file-name file))) |
| 2124 | 2124 | ||
| 2125 | (defmethod xref-location-marker ((l xref-etags-location)) | 2125 | (cl-defmethod xref-location-marker ((l xref-etags-location)) |
| 2126 | (with-slots (tag-info file) l | 2126 | (with-slots (tag-info file) l |
| 2127 | (let ((buffer (find-file-noselect file))) | 2127 | (let ((buffer (find-file-noselect file))) |
| 2128 | (with-current-buffer buffer | 2128 | (with-current-buffer buffer |
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ee8125073aa..55405b63fe0 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -66,10 +66,10 @@ | |||
| 66 | 66 | ||
| 67 | ;; If a backend decides to subclass xref-location it can provide | 67 | ;; If a backend decides to subclass xref-location it can provide |
| 68 | ;; methods for some of the following functions: | 68 | ;; methods for some of the following functions: |
| 69 | (defgeneric xref-location-marker (location) | 69 | (cl-defgeneric xref-location-marker (location) |
| 70 | "Return the marker for LOCATION.") | 70 | "Return the marker for LOCATION.") |
| 71 | 71 | ||
| 72 | (defgeneric xref-location-group (location) | 72 | (cl-defgeneric xref-location-group (location) |
| 73 | "Return a string used to group a set of locations. | 73 | "Return a string used to group a set of locations. |
| 74 | This is typically the filename.") | 74 | This is typically the filename.") |
| 75 | 75 | ||
| @@ -88,7 +88,7 @@ Line numbers start from 1 and columns from 0.") | |||
| 88 | "Create and return a new xref-file-location." | 88 | "Create and return a new xref-file-location." |
| 89 | (make-instance 'xref-file-location :file file :line line :column column)) | 89 | (make-instance 'xref-file-location :file file :line line :column column)) |
| 90 | 90 | ||
| 91 | (defmethod xref-location-marker ((l xref-file-location)) | 91 | (cl-defmethod xref-location-marker ((l xref-file-location)) |
| 92 | (with-slots (file line column) l | 92 | (with-slots (file line column) l |
| 93 | (with-current-buffer | 93 | (with-current-buffer |
| 94 | (or (get-file-buffer file) | 94 | (or (get-file-buffer file) |
| @@ -102,7 +102,7 @@ Line numbers start from 1 and columns from 0.") | |||
| 102 | (move-to-column column) | 102 | (move-to-column column) |
| 103 | (point-marker)))))) | 103 | (point-marker)))))) |
| 104 | 104 | ||
| 105 | (defmethod xref-location-group ((l xref-file-location)) | 105 | (cl-defmethod xref-location-group ((l xref-file-location)) |
| 106 | (oref l :file)) | 106 | (oref l :file)) |
| 107 | 107 | ||
| 108 | (defclass xref-buffer-location (xref-location) | 108 | (defclass xref-buffer-location (xref-location) |
| @@ -113,12 +113,12 @@ Line numbers start from 1 and columns from 0.") | |||
| 113 | "Create and return a new xref-buffer-location." | 113 | "Create and return a new xref-buffer-location." |
| 114 | (make-instance 'xref-buffer-location :buffer buffer :position position)) | 114 | (make-instance 'xref-buffer-location :buffer buffer :position position)) |
| 115 | 115 | ||
| 116 | (defmethod xref-location-marker ((l xref-buffer-location)) | 116 | (cl-defmethod xref-location-marker ((l xref-buffer-location)) |
| 117 | (with-slots (buffer position) l | 117 | (with-slots (buffer position) l |
| 118 | (let ((m (make-marker))) | 118 | (let ((m (make-marker))) |
| 119 | (move-marker m position buffer)))) | 119 | (move-marker m position buffer)))) |
| 120 | 120 | ||
| 121 | (defmethod xref-location-group ((l xref-buffer-location)) | 121 | (cl-defmethod xref-location-group ((l xref-buffer-location)) |
| 122 | (with-slots (buffer) l | 122 | (with-slots (buffer) l |
| 123 | (or (buffer-file-name buffer) | 123 | (or (buffer-file-name buffer) |
| 124 | (format "(buffer %s)" (buffer-name buffer))))) | 124 | (format "(buffer %s)" (buffer-name buffer))))) |
| @@ -134,10 +134,10 @@ actual location is not known.") | |||
| 134 | "Create and return a new xref-bogus-location." | 134 | "Create and return a new xref-bogus-location." |
| 135 | (make-instance 'xref-bogus-location :message message)) | 135 | (make-instance 'xref-bogus-location :message message)) |
| 136 | 136 | ||
| 137 | (defmethod xref-location-marker ((l xref-bogus-location)) | 137 | (cl-defmethod xref-location-marker ((l xref-bogus-location)) |
| 138 | (user-error "%s" (oref l :message))) | 138 | (user-error "%s" (oref l :message))) |
| 139 | 139 | ||
| 140 | (defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") | 140 | (cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)") |
| 141 | 141 | ||
| 142 | ;; This should be in elisp-mode.el, but it's preloaded, and we can't | 142 | ;; This should be in elisp-mode.el, but it's preloaded, and we can't |
| 143 | ;; preload defclass and defmethod (at least, not yet). | 143 | ;; preload defclass and defmethod (at least, not yet). |
| @@ -151,7 +151,7 @@ actual location is not known.") | |||
| 151 | (defun xref-make-elisp-location (symbol type file) | 151 | (defun xref-make-elisp-location (symbol type file) |
| 152 | (make-instance 'xref-elisp-location :symbol symbol :type type :file file)) | 152 | (make-instance 'xref-elisp-location :symbol symbol :type type :file file)) |
| 153 | 153 | ||
| 154 | (defmethod xref-location-marker ((l xref-elisp-location)) | 154 | (cl-defmethod xref-location-marker ((l xref-elisp-location)) |
| 155 | (with-slots (symbol type file) l | 155 | (with-slots (symbol type file) l |
| 156 | (let ((buffer-point | 156 | (let ((buffer-point |
| 157 | (pcase type | 157 | (pcase type |
| @@ -342,15 +342,15 @@ WINDOW controls how the buffer is displayed: | |||
| 342 | (defvar-local xref--temporary-buffers nil | 342 | (defvar-local xref--temporary-buffers nil |
| 343 | "List of buffers created by xref code.") | 343 | "List of buffers created by xref code.") |
| 344 | 344 | ||
| 345 | (defvar-local xref--selected nil | 345 | (defvar-local xref--current nil |
| 346 | "t if the current buffer has ever been selected. | 346 | "Non-nil if this buffer was once current, except while displaying xrefs. |
| 347 | Used for temporary buffers.") | 347 | Used for temporary buffers.") |
| 348 | 348 | ||
| 349 | (defvar xref--inhibit-mark-selected nil) | 349 | (defvar xref--inhibit-mark-current nil) |
| 350 | 350 | ||
| 351 | (defun xref--mark-selected () | 351 | (defun xref--mark-selected () |
| 352 | (unless xref--inhibit-mark-selected | 352 | (unless xref--inhibit-mark-current |
| 353 | (setq xref--selected t)) | 353 | (setq xref--current t)) |
| 354 | (remove-hook 'buffer-list-update-hook #'xref--mark-selected t)) | 354 | (remove-hook 'buffer-list-update-hook #'xref--mark-selected t)) |
| 355 | 355 | ||
| 356 | (defun xref--save-to-history (buf win) | 356 | (defun xref--save-to-history (buf win) |
| @@ -375,7 +375,7 @@ Used for temporary buffers.") | |||
| 375 | (condition-case err | 375 | (condition-case err |
| 376 | (let ((xref-buf (current-buffer)) | 376 | (let ((xref-buf (current-buffer)) |
| 377 | (bl (buffer-list)) | 377 | (bl (buffer-list)) |
| 378 | (xref--inhibit-mark-selected t)) | 378 | (xref--inhibit-mark-current t)) |
| 379 | (xref--goto-location location) | 379 | (xref--goto-location location) |
| 380 | (let ((buf (current-buffer))) | 380 | (let ((buf (current-buffer))) |
| 381 | (unless (memq buf bl) | 381 | (unless (memq buf bl) |
| @@ -438,29 +438,28 @@ Used for temporary buffers.") | |||
| 438 | (setq buffer-read-only t)) | 438 | (setq buffer-read-only t)) |
| 439 | 439 | ||
| 440 | (defun xref-quit (&optional kill) | 440 | (defun xref-quit (&optional kill) |
| 441 | "Perform cleanup, then quit the current window. | 441 | "Bury temporarily displayed buffers, then quit the current window. |
| 442 | The cleanup consists of burying all temporarily displayed | 442 | |
| 443 | buffers, and if KILL is non-nil, of killing all buffers that were | 443 | If KILL is non-nil, kill all buffers that were created in the |
| 444 | created in the process of showing xrefs. | 444 | process of showing xrefs, and also kill the current buffer. |
| 445 | 445 | ||
| 446 | Exceptions are made for buffers switched to by the user in the | 446 | The buffers that the user has otherwise interacted with in the |
| 447 | meantime, and other window configuration changes. These are | 447 | meantime are preserved." |
| 448 | preserved." | ||
| 449 | (interactive "P") | 448 | (interactive "P") |
| 450 | (let ((window (selected-window)) | 449 | (let ((window (selected-window)) |
| 451 | (history xref--display-history)) | 450 | (history xref--display-history)) |
| 452 | (setq xref--display-history nil) | 451 | (setq xref--display-history nil) |
| 452 | (pcase-dolist (`(,buf . ,win) history) | ||
| 453 | (when (and (window-live-p win) | ||
| 454 | (eq buf (window-buffer win))) | ||
| 455 | (quit-window nil win))) | ||
| 453 | (when kill | 456 | (when kill |
| 454 | (let ((xref--inhibit-mark-selected t) | 457 | (let ((xref--inhibit-mark-current t) |
| 455 | kill-buffer-query-functions) | 458 | kill-buffer-query-functions) |
| 456 | (dolist (buf xref--temporary-buffers) | 459 | (dolist (buf xref--temporary-buffers) |
| 457 | (unless (buffer-local-value 'xref--selected buf) | 460 | (unless (buffer-local-value 'xref--current buf) |
| 458 | (kill-buffer buf))) | 461 | (kill-buffer buf))) |
| 459 | (setq xref--temporary-buffers nil))) | 462 | (setq xref--temporary-buffers nil))) |
| 460 | (pcase-dolist (`(,buf . ,win) history) | ||
| 461 | (when (and (window-live-p win) | ||
| 462 | (eq buf (window-buffer win))) | ||
| 463 | (quit-window nil win))) | ||
| 464 | (quit-window kill window))) | 463 | (quit-window kill window))) |
| 465 | 464 | ||
| 466 | (defconst xref-buffer-name "*xref*" | 465 | (defconst xref-buffer-name "*xref*" |
| @@ -496,7 +495,9 @@ GROUP is a string for decoration purposes and XREF is an | |||
| 496 | 'face 'font-lock-keyword-face | 495 | 'face 'font-lock-keyword-face |
| 497 | 'mouse-face 'highlight | 496 | 'mouse-face 'highlight |
| 498 | 'keymap xref--button-map | 497 | 'keymap xref--button-map |
| 499 | 'help-echo "mouse-2: display in another window, RET or mouse-1: navigate") | 498 | 'help-echo |
| 499 | (concat "mouse-2: display in another window, " | ||
| 500 | "RET or mouse-1: follow reference")) | ||
| 500 | description)) | 501 | description)) |
| 501 | (when (or more1 more2) | 502 | (when (or more1 more2) |
| 502 | (insert "\n"))))) | 503 | (insert "\n"))))) |
| @@ -535,6 +536,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." | |||
| 535 | (defvar xref-show-xrefs-function 'xref--show-xref-buffer | 536 | (defvar xref-show-xrefs-function 'xref--show-xref-buffer |
| 536 | "Function to display a list of xrefs.") | 537 | "Function to display a list of xrefs.") |
| 537 | 538 | ||
| 539 | (defvar xref--read-identifier-history nil) | ||
| 540 | |||
| 541 | (defvar xref--read-pattern-history nil) | ||
| 542 | |||
| 538 | (defun xref--show-xrefs (input kind arg window) | 543 | (defun xref--show-xrefs (input kind arg window) |
| 539 | (let* ((bl (buffer-list)) | 544 | (let* ((bl (buffer-list)) |
| 540 | (xrefs (funcall xref-find-function kind arg)) | 545 | (xrefs (funcall xref-find-function kind arg)) |
| @@ -557,7 +562,8 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." | |||
| 557 | (cond ((or current-prefix-arg (not id)) | 562 | (cond ((or current-prefix-arg (not id)) |
| 558 | (completing-read prompt | 563 | (completing-read prompt |
| 559 | (funcall xref-identifier-completion-table-function) | 564 | (funcall xref-identifier-completion-table-function) |
| 560 | nil t id)) | 565 | nil t id |
| 566 | 'xref--read-identifier-history)) | ||
| 561 | (t id)))) | 567 | (t id)))) |
| 562 | 568 | ||
| 563 | 569 | ||
| @@ -593,12 +599,15 @@ With prefix argument, prompt for the identifier." | |||
| 593 | (interactive (list (xref--read-identifier "Find references of: "))) | 599 | (interactive (list (xref--read-identifier "Find references of: "))) |
| 594 | (xref--show-xrefs identifier 'references identifier nil)) | 600 | (xref--show-xrefs identifier 'references identifier nil)) |
| 595 | 601 | ||
| 602 | (declare-function apropos-parse-pattern "apropos" (pattern)) | ||
| 603 | |||
| 596 | ;;;###autoload | 604 | ;;;###autoload |
| 597 | (defun xref-find-apropos (pattern) | 605 | (defun xref-find-apropos (pattern) |
| 598 | "Find all meaningful symbols that match PATTERN. | 606 | "Find all meaningful symbols that match PATTERN. |
| 599 | The argument has the same meaning as in `apropos'." | 607 | The argument has the same meaning as in `apropos'." |
| 600 | (interactive (list (read-from-minibuffer | 608 | (interactive (list (read-from-minibuffer |
| 601 | "Search for pattern (word list or regexp): "))) | 609 | "Search for pattern (word list or regexp): " |
| 610 | nil nil nil 'xref--read-pattern-history))) | ||
| 602 | (require 'apropos) | 611 | (require 'apropos) |
| 603 | (xref--show-xrefs pattern 'apropos | 612 | (xref--show-xrefs pattern 'apropos |
| 604 | (apropos-parse-pattern | 613 | (apropos-parse-pattern |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 1f5ece02113..920d692d319 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-01-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't downcase system diagnostics' first letters | ||
| 4 | * url-dav.el (url-dav-delete-directory, url-dav-delete-file) | ||
| 5 | (url-dav-directory-files): Keep diagnostics consistent with system's. | ||
| 6 | |||
| 1 | 2014-12-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | 7 | 2014-12-12 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 8 | ||
| 3 | * url-http.el (url-http-parse-headers): `gnutls-available-p' is | 9 | * url-http.el (url-http-parse-headers): `gnutls-available-p' is |
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 65747e93000..61ca0885ec5 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el | |||
| @@ -741,7 +741,7 @@ files in the collection as well." | |||
| 741 | (if (and (not recursive) | 741 | (if (and (not recursive) |
| 742 | (/= (length props) 1)) | 742 | (/= (length props) 1)) |
| 743 | (signal 'file-error (list "Removing directory" | 743 | (signal 'file-error (list "Removing directory" |
| 744 | "directory not empty" url))))) | 744 | "Directory not empty" url))))) |
| 745 | 745 | ||
| 746 | (mapc (lambda (result) | 746 | (mapc (lambda (result) |
| 747 | (setq status (plist-get (cdr result) 'DAV:status)) | 747 | (setq status (plist-get (cdr result) 'DAV:status)) |
| @@ -760,7 +760,7 @@ files in the collection as well." | |||
| 760 | url lock-token | 760 | url lock-token |
| 761 | (setq props (url-dav-get-properties url)) | 761 | (setq props (url-dav-get-properties url)) |
| 762 | (if (eq (plist-get (cdar props) 'DAV:resourcetype) 'DAV:collection) | 762 | (if (eq (plist-get (cdar props) 'DAV:resourcetype) 'DAV:collection) |
| 763 | (signal 'file-error (list "Removing old name" "is a collection" url))))) | 763 | (signal 'file-error (list "Removing old name" "Is a collection" url))))) |
| 764 | 764 | ||
| 765 | (mapc (lambda (result) | 765 | (mapc (lambda (result) |
| 766 | (setq status (plist-get (cdr result) 'DAV:status)) | 766 | (setq status (plist-get (cdr result) 'DAV:status)) |
| @@ -787,7 +787,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 787 | 787 | ||
| 788 | (when (and (= (length properties) 1) | 788 | (when (and (= (length properties) 1) |
| 789 | (not (url-dav-file-directory-p url))) | 789 | (not (url-dav-file-directory-p url))) |
| 790 | (signal 'file-error (list "Opening directory" "not a directory" url))) | 790 | (signal 'file-error (list "Opening directory" "Not a directory" url))) |
| 791 | 791 | ||
| 792 | (while properties | 792 | (while properties |
| 793 | (setq child-props (pop properties) | 793 | (setq child-props (pop properties) |