bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43165: [PATCH] Add load this file lisp function.


From: Jen-Chieh Shen
Subject: bug#43165: [PATCH] Add load this file lisp function.
Date: Wed, 2 Sep 2020 11:16:40 +0800

Hi, 

I think `load-this-file` could be kind of handy.Is related to `kill-buffer` and `kill-this-buffer`, etc.

What do you guys think?

Best,

Jen-Chieh Shen



From 50101ae92761a51032c469353ff5fb203b83e6ad Mon Sep 17 00:00:00 2001
From: jenchieh <jcs090218@gmail.com>
Date: Wed, 2 Sep 2020 11:11:57 +0800
Subject: [PATCH] Add load this file lisp function.

---
 lisp/files.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/files.el b/lisp/files.el
index 3403e257a1..374df0d85d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -900,6 +900,11 @@ recursion."
        (read-file-name "Load file: " nil nil 'lambda))))
   (load (expand-file-name file) nil nil t))
 
+(defun load-this-file ()
+  "Load current Lisp file."
+  (interactive)
+  (load-file (buffer-file-name)))
+
 (defun locate-file (filename path &optional suffixes predicate)
   "Search for FILENAME through PATH.
 If found, return the absolute file name of FILENAME; otherwise
--
2.27.0.windows.1

Attachment: load-this-file.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]