mirror of
https://codeberg.org/scip/autoscratch.git
synced 2025-12-16 20:10:57 +01:00
remove if-mode condition, doesn't run in other modes anyway
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
autoscratch.elc
|
||||||
@@ -150,14 +150,13 @@ New name is '*autoscratch-<new-major-mode><N>*
|
|||||||
|
|
||||||
Executes `autoscratch-rename-hook' afterwards."
|
Executes `autoscratch-rename-hook' afterwards."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (eq major-mode "autoscratch-mode")
|
(rename-buffer
|
||||||
(rename-buffer
|
(generate-new-buffer-name
|
||||||
(generate-new-buffer-name
|
(format "*%s-scratch*"
|
||||||
(format "*%s-scratch*"
|
(replace-regexp-in-string
|
||||||
(replace-regexp-in-string
|
"-mode" ""
|
||||||
"-mode" ""
|
(format "%s" major-mode))))
|
||||||
(format "%s" major-mode))))
|
(run-hooks 'autoscratch-rename-hook)))
|
||||||
(run-hooks 'autoscratch-rename-hook))))
|
|
||||||
|
|
||||||
(defun autoscratch-buffer ()
|
(defun autoscratch-buffer ()
|
||||||
"Create and switch to a new autoscratch buffer."
|
"Create and switch to a new autoscratch buffer."
|
||||||
|
|||||||
Reference in New Issue
Block a user