mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +01:00
+fixes
This commit is contained in:
28
.emacs
28
.emacs
@@ -1,4 +1,4 @@
|
|||||||
;; Toms Emacs Config - portable - version (20170715.01) -*-emacs-lisp-*-
|
;; Toms Emacs Config - portable - version (20170718.01) -*-emacs-lisp-*-
|
||||||
;; * Introduction
|
;; * Introduction
|
||||||
|
|
||||||
;; This is my emacs config, it is more than twenty years old. It
|
;; This is my emacs config, it is more than twenty years old. It
|
||||||
@@ -555,6 +555,10 @@
|
|||||||
;; - fixed autoscratch hook
|
;; - fixed autoscratch hook
|
||||||
;; - add scratch alias
|
;; - add scratch alias
|
||||||
|
|
||||||
|
;; 20170718.01:
|
||||||
|
;; - better autoscratch config
|
||||||
|
;; - added persistent-scratch mode
|
||||||
|
|
||||||
;; ** TODO
|
;; ** TODO
|
||||||
|
|
||||||
;; - check helpful https://github.com/wilfred/helpful
|
;; - check helpful https://github.com/wilfred/helpful
|
||||||
@@ -583,7 +587,7 @@
|
|||||||
;; My emacs config has a version (consisting of a timestamp with a
|
;; My emacs config has a version (consisting of a timestamp with a
|
||||||
;; serial), which I display in the mode line. So I can clearly see, if
|
;; serial), which I display in the mode line. So I can clearly see, if
|
||||||
;; I'm using an outdated config somewhere.
|
;; I'm using an outdated config somewhere.
|
||||||
(defvar tvd-emacs-version "20170715.01")
|
(defvar tvd-emacs-version "20170718.01")
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1045,16 +1049,17 @@ to next buffer otherwise."
|
|||||||
|
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
;; ** More scratch space
|
;; ** More scratch space
|
||||||
|
;; *** Text scratch
|
||||||
;; Sometimes I need a text mode scratch buffer while scratch is
|
;; Sometimes I need a text mode scratch buffer while scratch is
|
||||||
;; already in use. So let's prepare one. I also add a buffer hook so that
|
;; already in use. So let's prepare one. I also add a buffer hook so that
|
||||||
;; this never gets deleted, but cleaned instead.
|
;; this never gets deleted, but cleaned instead.
|
||||||
|
|
||||||
;; [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html][Startup Summary]]
|
|
||||||
|
|
||||||
(with-current-buffer (get-buffer-create "*text*")
|
(with-current-buffer (get-buffer-create "*text*")
|
||||||
(text-mode))
|
(text-mode))
|
||||||
|
|
||||||
|
;; *** Autoscratch
|
||||||
|
;; use autoscratch otherwise
|
||||||
|
;; [[https://github.com/TLINDEN/autoscratch][autoscratch github]]
|
||||||
(require 'autoscratch)
|
(require 'autoscratch)
|
||||||
(setq initial-major-mode 'autoscratch-mode)
|
(setq initial-major-mode 'autoscratch-mode)
|
||||||
(add-hook 'autoscratch-mode-hook '(lambda ()
|
(add-hook 'autoscratch-mode-hook '(lambda ()
|
||||||
@@ -1062,6 +1067,19 @@ to next buffer otherwise."
|
|||||||
autoscratch-trigger-on-first-char t)))
|
autoscratch-trigger-on-first-char t)))
|
||||||
(defalias 'scratch 'autoscratch-buffer)
|
(defalias 'scratch 'autoscratch-buffer)
|
||||||
|
|
||||||
|
;; *** Persistent Scratch
|
||||||
|
;; I also like to be scratch buffers persistent with
|
||||||
|
;; [[https://github.com/Fanael/persistent-scratch][persistent-scratch]]
|
||||||
|
(require 'persistent-scratch)
|
||||||
|
(setq persistent-scratch-save-file (expand-file-name "scratches.el" user-init-dir))
|
||||||
|
(persistent-scratch-setup-default)
|
||||||
|
|
||||||
|
(defun tvd-autoscratch-p ()
|
||||||
|
"Return non-nil if the current buffer is a scratch buffer"
|
||||||
|
(string-match "scratch*" (buffer-name)))
|
||||||
|
|
||||||
|
(setq persistent-scratch-scratch-buffer-p-function 'tvd-autoscratch-p)
|
||||||
|
|
||||||
;; * Global Key Bindings
|
;; * Global Key Bindings
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
;; ** c-h != delete
|
;; ** c-h != delete
|
||||||
|
|||||||
920
emacs.html
920
emacs.html
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user