; Merge: some backports from master

Regression in Emacs 25.1
* "Don't require isearch-update before isearch-done"

This bug actually crashes in emacs-25
* "Avoid error in icalendar--read-element"

Doc fixes
* "Make a menu less ambiguous"
* "Doc fix for url-http"
This commit is contained in:
Noam Postavsky 2016-10-06 21:20:28 -04:00
commit fb12af2084
5 changed files with 27 additions and 13 deletions

View file

@ -1396,7 +1396,7 @@ init file (@pxref{Init Rebinding}).
* Minibuffer Maps:: The minibuffer uses its own local keymaps.
* Rebinding:: How to redefine one key's meaning conveniently.
* Init Rebinding:: Rebinding keys with your initialization file.
* Modifier Keys:: Using modifier keys in key bindings.
* Modifier Keys:: Using modifier keys.
* Function Keys:: Rebinding terminal function keys.
* Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
* Mouse Buttons:: Rebinding mouse buttons in Emacs.

View file

@ -361,7 +361,8 @@ Pass arguments REGEXP REP STRING FIXEDCASE LITERAL to
INVALUE gives the current iCalendar element we are reading.
INPARAMS gives the current parameters.....
This function calls itself recursively for each nested calendar element
it finds."
it finds. The current buffer should be an unfolded buffer as returned
from `icalendar--get-unfolded-buffer'."
(let (element children line name params param param-name param-value
value
(continue t))
@ -391,8 +392,9 @@ it finds."
(unless (looking-at ":")
(error "Oops"))
(forward-char 1)
(re-search-forward "\\(.*\\)\\(\r?\n[ \t].*\\)*" nil t)
(setq value (icalendar--rris "\r?\n[ \t]" "" (match-string 0)))
(let ((start (point)))
(end-of-line)
(setq value (buffer-substring start (point))))
(setq line (list name params value))
(cond ((eq name 'BEGIN)
(setq children

View file

@ -1049,9 +1049,10 @@ NOPUSH is t and EDIT is t."
(remove-hook 'mouse-leave-buffer-hook 'isearch-done)
(remove-hook 'kbd-macro-termination-hook 'isearch-done)
(setq isearch-lazy-highlight-start nil)
(with-current-buffer isearch--current-buffer
(setq isearch--current-buffer nil)
(setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit)))
(when (buffer-live-p isearch--current-buffer)
(with-current-buffer isearch--current-buffer
(setq isearch--current-buffer nil)
(setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit))))
;; Called by all commands that terminate isearch-mode.
;; If NOPUSH is non-nil, we don't push the string on the search ring.

View file

@ -1195,17 +1195,20 @@ the end of the document."
"Retrieve URL via HTTP asynchronously.
URL must be a parsed URL. See `url-generic-parse-url' for details.
When retrieval is completed, execute the function CALLBACK, passing it
an updated value of CBARGS as arguments. The first element in CBARGS
should be a plist describing what has happened so far during the
request, as described in the docstring of `url-retrieve' (if in
doubt, specify nil).
When retrieval is completed, execute the function CALLBACK,
passing it an updated value of CBARGS as arguments. The first
element in CBARGS should be a plist describing what has happened
so far during the request, as described in the docstring of
`url-retrieve' (if in doubt, specify nil). The current buffer
then CALLBACK is executed is the retrieval buffer.
Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a
previous `url-http' call, which is being re-attempted.
Optional arg GATEWAY-METHOD specifies the gateway to be used,
overriding the value of `url-gateway-method'."
overriding the value of `url-gateway-method'.
The return value of this function is the retrieval buffer."
(cl-check-type url vector "Need a pre-parsed URL.")
(let* ((host (url-host (or url-using-proxy url)))
(port (url-port (or url-using-proxy url)))

View file

@ -28,5 +28,13 @@
(isearch-update)
(should (equal isearch--current-buffer (current-buffer)))))
(ert-deftest isearch--test-done ()
;; Normal operation.
(isearch-update)
(isearch-done)
(should-not isearch--current-buffer)
;; Bug #21091: let `isearch-done' work without `isearch-update'.
(isearch-done))
(provide 'isearch-tests)
;;; isearch-tests.el ends here