]> git.eshelyaron.com Git - dict.git/commitdiff
MODIFIED: do not force set next-error buffer to Prolog buffer
authorEshel Yaron <me@eshelyaron.com>
Sun, 8 Jan 2023 14:35:52 +0000 (16:35 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 8 Jan 2023 14:35:52 +0000 (16:35 +0200)
sweeprolog.el

index 0c196f72aa140e5981e35a0c8c28b03b4790fdd8..d60a3d09e90167d73ecdca5ea7ff36b447b02098 100644 (file)
@@ -3884,18 +3884,13 @@ certain contexts to maintain conventional Prolog layout."
     (add-hook 'sweeprolog-analyze-region-start-hook #'sweeprolog-analyze-start-flymake nil t)
     (add-hook 'sweeprolog-analyze-region-fragment-hook #'sweeprolog-analyze-fragment-flymake nil t)
     (add-hook 'sweeprolog-analyze-region-end-hook #'sweeprolog-analyze-end-flymake nil t)
-    (setq-local next-error-function #'flymake-goto-next-error)
-    (add-hook 'window-selection-change-functions
-              (let ((buffer (current-buffer)))
-                (lambda (win)
-                  (when (equal buffer
-                               (window-buffer win))
-                    (next-error-select-buffer buffer))))
-              nil t))
+    (setq-local next-error-function #'flymake-goto-next-error))
   (when (and (boundp 'cycle-spacing-actions)
              (consp cycle-spacing-actions)
-             sweeprolog-enable-cycle-spacing
-             (setq-local cycle-spacing-actions (cons #'sweeprolog-align-spaces cycle-spacing-actions))))
+             sweeprolog-enable-cycle-spacing)
+    (setq-local cycle-spacing-actions
+                (cons #'sweeprolog-align-spaces
+                      cycle-spacing-actions)))
   (sweeprolog-ensure-initialized)
   (sweeprolog--update-buffer-last-modified-time)
   (let ((time (current-time)))