General cleanup
This commit is contained in:
parent
02c88f21e0
commit
e0652b311d
5 changed files with 30 additions and 31 deletions
|
@ -24,7 +24,7 @@ major-modes, the process gets killed.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-narrow-buffer (beg end &optional clone-p)
|
(defun doom-narrow-buffer (beg end &optional clone-p)
|
||||||
"Restrict editing in this buffer to the current region, indirectly. With BANG,
|
"Restrict editing in this buffer to the current region, indirectly. With CLONE-P,
|
||||||
clone the buffer and hard-narrow the selection. If mark isn't active, then widen
|
clone the buffer and hard-narrow the selection. If mark isn't active, then widen
|
||||||
the buffer (if narrowed).
|
the buffer (if narrowed).
|
||||||
|
|
||||||
|
@ -45,15 +45,8 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
||||||
(setq doom-buffer--narrowed-origin nil))
|
(setq doom-buffer--narrowed-origin nil))
|
||||||
(widen))))
|
(widen))))
|
||||||
|
|
||||||
;;;###autoload (autoload 'doom:buffer-narrow "core/autoload/buffers" nil t)
|
|
||||||
(after! evil
|
|
||||||
(evil-define-operator doom:buffer-narrow (&optional beg end bang)
|
|
||||||
(interactive "<r><!>")
|
|
||||||
(doom-narrow-buffer beg end bang)))
|
|
||||||
|
|
||||||
|
|
||||||
;; Buffer Life and Death ;;;;;;;;;;;;;;;
|
;; Buffer Life and Death ;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-buffer-list (&optional all-p)
|
(defun doom-buffer-list (&optional all-p)
|
||||||
"Get all buffers in the current project, in the current workgroup.
|
"Get all buffers in the current project, in the current workgroup.
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
select-enable-clipboard t
|
select-enable-clipboard t
|
||||||
select-enable-primary t)
|
select-enable-primary t)
|
||||||
|
|
||||||
(unless noninteractive
|
(let ((inhibit-message t))
|
||||||
;; Save point across sessions
|
;; Save point across sessions
|
||||||
(require 'saveplace)
|
(require 'saveplace)
|
||||||
(setq save-place-file (concat doom-cache-dir "saveplace")
|
(setq save-place-file (concat doom-cache-dir "saveplace")
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
;;; core-lib.el
|
;;; core-lib.el
|
||||||
|
|
||||||
|
(defvar +evil-leader)
|
||||||
|
(defvar +evil-localleader)
|
||||||
|
|
||||||
(defmacro λ! (&rest body)
|
(defmacro λ! (&rest body)
|
||||||
"A shortcut for inline keybind lambdas."
|
"A shortcut for inline keybind lambdas."
|
||||||
`(lambda () (interactive) ,@body))
|
`(lambda () (interactive) ,@body))
|
||||||
|
|
|
@ -15,6 +15,28 @@
|
||||||
;; emacs update, or an update to any of the packages it tries to tame (like helm
|
;; emacs update, or an update to any of the packages it tries to tame (like helm
|
||||||
;; or org-mode).
|
;; or org-mode).
|
||||||
|
|
||||||
|
(defvar doom-popup-history nil
|
||||||
|
"A list of popups that were last closed. Used by `doom/popup-restore' and
|
||||||
|
`doom*popup-save'.")
|
||||||
|
|
||||||
|
(defvar doom-popup-remember-history t
|
||||||
|
"If non-nil, DOOM will remember the last popup(s) that were open in
|
||||||
|
`doom-popup-history'.")
|
||||||
|
|
||||||
|
(defvar doom-popup-other-window nil
|
||||||
|
"The last window selected before a popup was opened.")
|
||||||
|
|
||||||
|
(defvar-local doom-popup-rules nil
|
||||||
|
"The shackle rule that caused this buffer to be recognized as a popup.")
|
||||||
|
|
||||||
|
(defvar doom-popup-mode-map
|
||||||
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(define-key map [escape] 'doom/popup-close-maybe)
|
||||||
|
(define-key map (kbd "ESC") 'doom/popup-close-maybe)
|
||||||
|
map)
|
||||||
|
"Active keymap in popup windows.")
|
||||||
|
|
||||||
|
|
||||||
(package! shackle :demand t
|
(package! shackle :demand t
|
||||||
:config
|
:config
|
||||||
(shackle-mode 1)
|
(shackle-mode 1)
|
||||||
|
@ -58,27 +80,6 @@
|
||||||
(comint-mode :noesc t)
|
(comint-mode :noesc t)
|
||||||
(tabulated-list-mode :noesc t))
|
(tabulated-list-mode :noesc t))
|
||||||
|
|
||||||
(defvar doom-popup-history nil
|
|
||||||
"A list of popups that were last closed. Used by `doom/popup-restore' and
|
|
||||||
`doom*popup-save'.")
|
|
||||||
|
|
||||||
(defvar doom-popup-remember-history t
|
|
||||||
"If non-nil, DOOM will remember the last popup(s) that were open in
|
|
||||||
`doom-popup-history'.")
|
|
||||||
|
|
||||||
(defvar doom-popup-other-window nil
|
|
||||||
"The last window selected before a popup was opened.")
|
|
||||||
|
|
||||||
(defvar-local doom-popup-rules nil
|
|
||||||
"The shackle rule that caused this buffer to be recognized as a popup.")
|
|
||||||
|
|
||||||
(defvar doom-popup-mode-map
|
|
||||||
(let ((map (make-sparse-keymap)))
|
|
||||||
(define-key map [escape] 'doom/popup-close-maybe)
|
|
||||||
(define-key map (kbd "ESC") 'doom/popup-close-maybe)
|
|
||||||
map)
|
|
||||||
"Active keymap in popup windows.")
|
|
||||||
|
|
||||||
(define-minor-mode doom-popup-mode
|
(define-minor-mode doom-popup-mode
|
||||||
"Minor mode for pop-up windows."
|
"Minor mode for pop-up windows."
|
||||||
:init-value nil
|
:init-value nil
|
||||||
|
|
|
@ -74,7 +74,6 @@ line or use --debug-init to enable this.")
|
||||||
idle-update-delay 1 ; update ui less often
|
idle-update-delay 1 ; update ui less often
|
||||||
;; keep the point out of the minibuffer
|
;; keep the point out of the minibuffer
|
||||||
minibuffer-prompt-properties '(read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)
|
minibuffer-prompt-properties '(read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)
|
||||||
|
|
||||||
;; History & backup settings
|
;; History & backup settings
|
||||||
auto-save-default nil
|
auto-save-default nil
|
||||||
auto-save-list-file-name (concat doom-cache-dir "/autosave")
|
auto-save-list-file-name (concat doom-cache-dir "/autosave")
|
||||||
|
@ -153,6 +152,9 @@ enable multiple minor modes for the same regexp.")
|
||||||
persistent-soft-flush
|
persistent-soft-flush
|
||||||
persistent-soft-store))
|
persistent-soft-store))
|
||||||
|
|
||||||
|
(package! smex :commands smex)
|
||||||
|
|
||||||
|
;;
|
||||||
(require! core-set) ; a centralized config system; provides `set!'
|
(require! core-set) ; a centralized config system; provides `set!'
|
||||||
(require! core-states) ; TODO
|
(require! core-states) ; TODO
|
||||||
(require! core-ui) ; draw me like one of your French editors
|
(require! core-ui) ; draw me like one of your French editors
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue