Skip to content

Commit 8b3d62c

Browse files
committed
修改默认的library file为MAJOR-MODE.org
1 parent 45928d6 commit 8b3d62c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

code-library.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
(let* ((code (if (region-active-p)
5454
(buffer-substring-no-properties (region-beginning) (region-end))
5555
(thing-at-point 'defun)))
56+
(code-major-mode (replace-regexp-in-string "-mode$" "" (symbol-name major-mode)))
5657
(library-base-file (or (cdr (assoc major-mode code-library-mode-file-alist))
57-
"temp.org"))
58+
(concat code-major-mode ".org")))
5859
(library-file (concat code-library-path library-base-file))
5960
(export-file (file-name-nondirectory (buffer-file-name)))
60-
(head (read-string "请输入这段代码的说明"))
61-
(code-major-mode (replace-regexp-in-string "-mode$" "" (format "%s" major-mode))))
61+
(head (read-string "请输入这段代码的说明")))
6262
(save-excursion
6363
(find-file library-file)
6464
(end-of-buffer)

0 commit comments

Comments
 (0)