summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-dired.el14
-rw-r--r--lisp/init-org.el4
2 files changed, 8 insertions, 10 deletions
diff --git a/lisp/init-dired.el b/lisp/init-dired.el
index 590536e..1c2c1c5 100644
--- a/lisp/init-dired.el
+++ b/lisp/init-dired.el
@@ -36,8 +36,8 @@
This is similar to `dired-copy-filename-as-kill', but the leading
path is always relative to `projectile-project-root'."
(interactive)
- (let ((project-dir (projectile-project-root)))
- (km/dired-copy-filename-relative-to-directory project-dir)))
+ (km/dired-copy-filename-relative-to-directory
+ (projectile-project-root)))
(defun km/dired-copy-filename-relative-to-directory (directory)
"Like `dired-copy-filename-as-kill', but the filename is always
@@ -58,8 +58,8 @@ This is similar to `dired-copy-filename-as-kill', but the leading
path is always relative to the `default-directory' of the other
window."
(interactive)
- (let ((other-dir (km/other-default-directory)))
- (km/dired-copy-filename-relative-to-directory other-dir)))
+ (km/dired-copy-filename-relative-to-directory
+ (km/other-default-directory)))
(defun km/other-default-directory ()
"Get `default-directory' for result of `(other-window 1)'."
@@ -82,13 +82,11 @@ window."
(defun km/dired-switch-to-buffer ()
(interactive)
- (let ((buffer-name (km/dired-completing-buffer)))
- (switch-to-buffer buffer-name)))
+ (switch-to-buffer (km/dired-completing-buffer)))
(defun km/dired-switch-to-buffer-other-window ()
(interactive)
- (let ((buffer-name (km/dired-completing-buffer)))
- (pop-to-buffer buffer-name)))
+ (pop-to-buffer (km/dired-completing-buffer)))
(defun km/dired-completing-buffer ()
(ido-completing-read "Dired buffer: "
diff --git a/lisp/init-org.el b/lisp/init-org.el
index 23194fa..9d2b87b 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -448,8 +448,8 @@ A numeric prefix sets MAXLEVEL (defaults to 2)."
"Refile with `org-refile-targets' set to BUFFER file name.
A numeric prefix sets MAXLEVEL (defaults to 2)."
(interactive (list (km/get-org-file-buffer) current-prefix-arg))
- (let ((buffer-file (buffer-file-name buffer)))
- (km/org-refile-to-other-file buffer-file maxlevel)))
+ (km/org-refile-to-other-file (buffer-file-name buffer)
+ maxlevel))
(defun km/get-org-file-buffer ()
(get-buffer