General cleanup
This commit is contained in:
parent
0a4f4094b5
commit
d506d8690e
12 changed files with 24 additions and 48 deletions
|
@ -1,12 +1,6 @@
|
|||
;;; defuns-flycheck.el
|
||||
;; for ../core-flycheck.el
|
||||
|
||||
;;;###autoload
|
||||
(defun narf|flycheck-enable-maybe ()
|
||||
(unless (or (bound-and-true-p org-src-mode)
|
||||
(eq major-mode 'org-mode))
|
||||
(flycheck-mode +1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf*flycheck-buffer ()
|
||||
(when (bound-and-true-p flycheck-mode)
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
;;; defuns-popups.el
|
||||
|
||||
(defun narf*popup-add (&rest _)
|
||||
(add-to-list 'narf-popup-windows (get-buffer-window shackle-last-buffer)))
|
||||
(advice-add 'shackle-display-buffer :after 'narf*popup-add)
|
||||
|
||||
(defun narf--popup-remove (window)
|
||||
(setq narf-popup-windows (delete window narf-popup-windows)))
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ If ARG is nil this function calls `recompile', otherwise it calls
|
|||
;;;; Code running ;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;###autoload (autoload 'narf:eval-buffer "defuns-quickrun" nil t)
|
||||
(evil-define-command narf:eval-buffer ()
|
||||
:move-point nil
|
||||
:repeat nil
|
||||
:move-point nil :repeat nil
|
||||
(interactive)
|
||||
(cond ((eq major-mode 'emacs-lisp-mode)
|
||||
(narf:eval-region (point-min) (point-max)))
|
||||
|
@ -43,10 +42,10 @@ If ARG is nil this function calls `recompile', otherwise it calls
|
|||
|
||||
;;;###autoload (autoload 'narf:eval-region "defuns-quickrun" nil t)
|
||||
(evil-define-operator narf:eval-region (beg end)
|
||||
:move-point nil
|
||||
:repeat nil
|
||||
:move-point nil :repeat nil
|
||||
(interactive "<r>")
|
||||
(cond ((eq major-mode 'emacs-lisp-mode)
|
||||
(require 'pp)
|
||||
(let* ((pp-escape-newlines nil)
|
||||
(out (s-trim (pp-to-string (eval (read (buffer-substring-no-properties beg end))))))
|
||||
(lines (length (s-lines out))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue