]> git.eshelyaron.com Git - dict.git/commitdiff
FIXED: (sweep-load-buffer): error after prompting for a buffer
authorEshel Yaron <me@eshelyaron.com>
Sun, 11 Sep 2022 16:15:21 +0000 (19:15 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Sep 2022 16:15:21 +0000 (19:15 +0300)
sweep.el

index 47661511b1724e940fc552e997f0efa0be9aa00b..a4b7b59964e4c9ce9e00d8b74c3f14035cb7b6d8 100644 (file)
--- a/sweep.el
+++ b/sweep.el
@@ -874,17 +874,18 @@ Interactively, if the major mode of the current buffer is
 `sweep-mode' and the command is called without a prefix argument,
 load the current buffer.  Otherwise, prompt for a `sweep-mode'
 buffer to load."
-  (interactive (if (and (not current-prefix-arg)
-                        (eq major-mode 'sweep-mode))
-                   (list (current-buffer))
-                 (read-buffer "Load buffer: "
-                              (when (eq major-mode 'sweep-mode)
-                                (buffer-name))
-                              t
-                              (lambda (b)
-                                (let ((n (or (and (consp b) (car b)) b)))
-                                  (with-current-buffer n
-                                    (eq major-mode 'sweep-mode)))))))
+  (interactive (list
+                (if (and (not current-prefix-arg)
+                         (eq major-mode 'sweep-mode))
+                    (current-buffer)
+                  (read-buffer "Load buffer: "
+                               (when (eq major-mode 'sweep-mode)
+                                 (buffer-name))
+                               t
+                               (lambda (b)
+                                 (let ((n (or (and (consp b) (car b)) b)))
+                                   (with-current-buffer n
+                                     (eq major-mode 'sweep-mode))))))))
   (with-current-buffer buffer
     (let* ((beg (point-min))
            (end (point-max))