branch: externals/auctex
commit e783b973e9c367d1ab31ca07bc31a0b19c110f28
Author: Alex Branham <[email protected]>
Commit: Alex Branham <[email protected]>
Fix TeX-dwim-master
* tex.el (TeX-dwim-master): `cl-return' is much easier to work with if
we're alerady using cl- functions, so convert `dolist' to `cl-loop.'
Signed-off-by: Ikumi Keita <[email protected]>
---
tex.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tex.el b/tex.el
index 51480d0..83d360a 100644
--- a/tex.el
+++ b/tex.el
@@ -2391,11 +2391,12 @@ this variable to \"<none>\"."
(defun TeX-dwim-master ()
"Find a likely `TeX-master'."
(let ((dir default-directory))
- (dolist (buf (buffer-list))
- (when (with-current-buffer buf
- (and (equal dir default-directory)
- (stringp TeX-master)))
- (cl-return (with-current-buffer buf TeX-master))))))
+ (cl-loop for buf in (buffer-list)
+ until
+ (when (with-current-buffer buf
+ (and (equal dir default-directory)
+ (stringp TeX-master)))
+ (cl-return (with-current-buffer buf TeX-master))))))
(defun TeX-master-file-ask ()
"Ask for master file, set `TeX-master' and add local variables."