General refactor for comments & docstrings
This commit is contained in:
parent
2cc8a96a30
commit
6a03b37dd3
3 changed files with 15 additions and 13 deletions
|
@ -185,7 +185,7 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
|
|||
(defun +ivy/projectile-find-file ()
|
||||
"A more sensible `counsel-projectile-find-file', which will revert to
|
||||
`counsel-find-file' if invoked from $HOME, `counsel-file-jump' if invoked from a
|
||||
non-project, `projectile-find-file' if in a bug project (more than
|
||||
non-project, `projectile-find-file' if in a big project (more than
|
||||
`ivy-sort-max-size' files), or `counsel-projectile-find-file' otherwise.
|
||||
|
||||
The point of this is to avoid Emacs locking up indexing massive file trees."
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(if comment-line-break-function
|
||||
(funcall comment-line-break-function)
|
||||
(comment-indent-new-line)))
|
||||
;; Find a better way to do this
|
||||
;; TODO Find a better way to do this
|
||||
((and (eq major-mode 'haskell-mode)
|
||||
(fboundp 'haskell-indentation-newline-and-indent))
|
||||
(setq evil-auto-indent nil)
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
;; `evil'
|
||||
(progn
|
||||
(defun +popup*evil-command-window (hist cmd-key execute-fn)
|
||||
"The evil command window has a mind of its own (uses `switch-to-buffer'). We
|
||||
monkey patch it to use pop-to-buffer, and to remember the previous window."
|
||||
"Monkey patch the evil command window to use `pop-to-buffer' instead of
|
||||
`switch-to-buffer', allowing the popup manager to handle it."
|
||||
(when (eq major-mode 'evil-command-window-mode)
|
||||
(user-error "Cannot recursively open command line window"))
|
||||
(dolist (win (window-list))
|
||||
|
@ -153,8 +153,8 @@ the command buffer."
|
|||
|
||||
;; `helpful'
|
||||
(progn
|
||||
;; Open link in origin window (non-popup) instead of inside the popup window.
|
||||
(defun +popup*helpful--navigate (button)
|
||||
(defun +popup*helpful-open-in-origin-window (button)
|
||||
"Open links in non-popup, originating window rather than helpful's window."
|
||||
(let ((path (substring-no-properties (button-get button 'path)))
|
||||
enable-local-variables
|
||||
origin)
|
||||
|
@ -166,7 +166,7 @@ the command buffer."
|
|||
(setq origin (selected-window))
|
||||
(recenter))
|
||||
(select-window origin)))
|
||||
(advice-add #'helpful--navigate :override #'+popup*helpful--navigate))
|
||||
(advice-add #'helpful--navigate :override #'+popup*helpful-open-in-origin-window))
|
||||
|
||||
|
||||
;; `helm'
|
||||
|
@ -179,12 +179,14 @@ the command buffer."
|
|||
((symbol-function 'org-completing-read)
|
||||
(lambda (&rest args)
|
||||
(when-let* ((win (get-buffer-window "*Org Links*")))
|
||||
;; While helm opened as a popup, helm commands will mistaken
|
||||
;; the *Org Links* popup for the "originated window", and
|
||||
;; try to manipulate it, but since that is a popup too (as
|
||||
;; is a dedicated side window), Emacs errors and complains
|
||||
;; it can't do that. So we get rid of it.
|
||||
;; While helm is opened as a popup, it will mistaken the
|
||||
;; *Org Links* popup for the "originated window", and will
|
||||
;; target it for actions invoked by the user. However, since
|
||||
;; *Org Links* is a popup too (they're dedicated side
|
||||
;; windows), Emacs complains about being unable to split a
|
||||
;; side window. The simple fix: get rid of *Org Links*!
|
||||
(delete-window win)
|
||||
;; But it must exist for org to clean up later.
|
||||
(get-buffer-create "*Org Links*"))
|
||||
(apply old-org-completing-read args))))
|
||||
(apply orig-fn args)))
|
||||
|
@ -337,7 +339,7 @@ instead of switch-to-buffer-*."
|
|||
|
||||
;; `windmove'
|
||||
(progn
|
||||
;; Users should be about to hop into popups easily, but Elisp shouldn't.
|
||||
;; Users should be able to hop into popups easily, but Elisp shouldn't.
|
||||
(defun doom*ignore-window-parameters (orig-fn &rest args)
|
||||
"Allow *interactive* window moving commands to traverse popups."
|
||||
(cl-letf (((symbol-function #'windmove-find-other-window)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue