emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 fb12af2: ; Merge: some backports from master


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-25 fb12af2: ; Merge: some backports from master
Date: Fri, 7 Oct 2016 01:27:43 +0000 (UTC)

branch: emacs-25
commit fb12af2084a751566ff5445654d75f5653f2253d
Merge: c4a5e7e 6234012
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    ; 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"
---
 doc/emacs/custom.texi           |    2 +-
 lisp/calendar/icalendar.el      |    8 +++++---
 lisp/isearch.el                 |    7 ++++---
 lisp/url/url-http.el            |   15 +++++++++------
 test/automated/isearch-tests.el |    8 ++++++++
 5 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index c109335..7716336 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -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.
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 386c554..c88f4ab 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -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
diff --git a/lisp/isearch.el b/lisp/isearch.el
index a972476..9df7627 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -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.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 8f36dde..e0e080e 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -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)))
diff --git a/test/automated/isearch-tests.el b/test/automated/isearch-tests.el
index 48c3424..52f312d 100644
--- a/test/automated/isearch-tests.el
+++ b/test/automated/isearch-tests.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]