General cleanup

This commit is contained in:
Henrik Lissner 2017-02-03 08:03:48 -05:00
parent 02c88f21e0
commit e0652b311d
5 changed files with 30 additions and 31 deletions

View file

@ -24,7 +24,7 @@ major-modes, the process gets killed.")
;;;###autoload
(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
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))
(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 ;;;;;;;;;;;;;;;
;;;###autoload
(defun doom-buffer-list (&optional all-p)
"Get all buffers in the current project, in the current workgroup.

View file

@ -38,7 +38,7 @@
select-enable-clipboard t
select-enable-primary t)
(unless noninteractive
(let ((inhibit-message t))
;; Save point across sessions
(require 'saveplace)
(setq save-place-file (concat doom-cache-dir "saveplace")

View file

@ -1,5 +1,8 @@
;;; core-lib.el
(defvar +evil-leader)
(defvar +evil-localleader)
(defmacro λ! (&rest body)
"A shortcut for inline keybind lambdas."
`(lambda () (interactive) ,@body))

View file

@ -15,6 +15,28 @@
;; emacs update, or an update to any of the packages it tries to tame (like helm
;; 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
:config
(shackle-mode 1)
@ -58,27 +80,6 @@
(comint-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
"Minor mode for pop-up windows."
:init-value nil

View file

@ -74,7 +74,6 @@ line or use --debug-init to enable this.")
idle-update-delay 1 ; update ui less often
;; keep the point out of the minibuffer
minibuffer-prompt-properties '(read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)
;; History & backup settings
auto-save-default nil
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-store))
(package! smex :commands smex)
;;
(require! core-set) ; a centralized config system; provides `set!'
(require! core-states) ; TODO
(require! core-ui) ; draw me like one of your French editors