diff --git a/core/core-sessions.el b/core/core-sessions.el index 410c512ee..4293e5a73 100644 --- a/core/core-sessions.el +++ b/core/core-sessions.el @@ -61,10 +61,10 @@ automatically renamed to the project name.") (add-hook 'focus-out-hook 'narf|wg-autosave-disable) (add-hook 'focus-in-hook 'narf|wg-autosave-enable) - ;; Don't mess with the modeline! + ;; Seriously, don't mess with the modeline! `wg-mode-line-display-on' isn't enough (advice-add 'wg-change-modeline :override 'ignore) - ;; Don't remember popup windows + ;; Don't remember popup and neotree windows (add-hook! kill-emacs (narf/popup-close-all) (when (and (featurep 'neotree) (neo-global--window-exists-p)) diff --git a/core/core-ui.el b/core/core-ui.el index 693dfd3ac..32d6b2186 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -145,21 +145,16 @@ (use-package nlinum :commands nlinum-mode :preface + (defface linum-highlight-face '((t (:inherit linum))) "Face for line highlights") (defvar narf--hl-nlinum-overlay nil) (defvar narf--hl-nlinum-line nil) (defvar nlinum-format "%4d ") - (defface linum-highlight-face '((t (:inherit linum))) "Face for line highlights") (setq linum-format "%3d ") :init (defun narf|nlinum-enable () (nlinum-mode +1) (add-hook 'post-command-hook 'narf|nlinum-hl-line t)) - (defun narf|nlinum-disable () - (nlinum-mode -1) - (remove-hook 'post-command-hook 'narf|nlinum-hl-line) - (narf|nlinum-unhl-line)) - (add-hook! (markdown-mode prog-mode scss-mode web-mode conf-mode) 'narf|nlinum-enable) @@ -320,8 +315,7 @@ anzu to be enabled." ;; TODO mode-line-iedit-face default face (spaceline-define-segment *iedit - "Show the number of matches and what match you're on (or after). Requires -iedit." + "Show the number of matches and what match you're on (or after). Requires iedit." (let ((this-oc (iedit-find-current-occurrence-overlay)) (length (or (ignore-errors (length iedit-occurrences-overlays)) 0))) (format " %s/%s " diff --git a/core/defuns/defuns-nlinum.el b/core/defuns/defuns-nlinum.el index 6c31cf8fe..405f6edd1 100644 --- a/core/defuns/defuns-nlinum.el +++ b/core/defuns/defuns-nlinum.el @@ -7,5 +7,11 @@ (narf|nlinum-disable) (narf|nlinum-enable))) +;;;###autoload +(defun narf|nlinum-disable () + (nlinum-mode -1) + (remove-hook 'post-command-hook 'narf|nlinum-hl-line) + (narf|nlinum-unhl-line)) + (provide 'defuns-nlinum) ;;; defuns-nlinum.el ends here diff --git a/core/defuns/defuns-workgroup.el b/core/defuns/defuns-workgroup.el index 0e74a4401..b35284a9e 100644 --- a/core/defuns/defuns-workgroup.el +++ b/core/defuns/defuns-workgroup.el @@ -29,7 +29,7 @@ ;;;###autoload (autoload 'narf:workgroup-new "defuns-workgroup" nil t) (evil-define-command narf:workgroup-new (bang name &optional silent) - "Create a new workgroup. If BANG, clone the current one to it." + "Create a new workgroup. If BANG, overwrite any workgroup named NAME." (interactive "") (unless name (setq name (format "#%s" (1+ (length (wg-workgroup-list))))))