Selaa lähdekoodia

org-attach: Tiny refactoring

* lisp/org-attach.el (org-attach): Use `org-with-point-at'.
Nicolas Goaziou 5 vuotta sitten
vanhempi
commit
0a82c8370d
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. 1 4
      lisp/org-attach.el

+ 1 - 4
lisp/org-attach.el

@@ -254,10 +254,7 @@ Shows a list of commands and prompts for another key to execute a command."
 		       (get-text-property (point) 'org-marker)))
       (unless marker
 	(error "No item in current line")))
-    (save-excursion
-      (when marker
-	(set-buffer (marker-buffer marker))
-	(goto-char marker))
+    (org-with-point-at marker
       (org-back-to-heading-or-point-min t)
       (save-excursion
 	(save-window-excursion