Explorar o código

Speed up find-buffer-visiting

Carsten Dominik %!s(int64=16) %!d(string=hai) anos
pai
achega
4d2f9e1943
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -15452,9 +15452,10 @@ Counting starts at 1."
     (nreverse rtn)))
 
 (defun org-find-base-buffer-visiting (file)
-  "Like `find-buffer-visiting' but alway return the base buffer and
+  "Like `find-buffer-visiting' but always return the base buffer and
 not an indirect buffer."
-  (let ((buf (find-buffer-visiting file)))
+  (let ((buf (or (get-file-buffer file)
+		 (find-buffer-visiting file)))
     (if buf
 	(or (buffer-base-buffer buf) buf)
       nil)))