dev: merging from main
This commit is contained in:
commit
9c0e95af1c
20 changed files with 237 additions and 140 deletions
|
@ -26,14 +26,14 @@
|
|||
"^WSL_INTEROP$"
|
||||
;; XDG variables that are best not persisted.
|
||||
"^XDG_CURRENT_DESKTOP$" "^XDG_RUNTIME_DIR$"
|
||||
"^XDG_\\(VTNR\\|SEAT\\|SESSION_\\(TYPE\\|CLASS\\)\\)"
|
||||
"^XDG_\\(VTNR$\\|SEAT$\\|BACKEND$\\|SESSION_\\)"
|
||||
;; Socket envvars, like I3SOCK, GREETD_SOCK, SEATD_SOCK, SWAYSOCK, etc.
|
||||
"SOCK$"
|
||||
;; ssh and gpg variables that could quickly become stale if persisted.
|
||||
"^SSH_\\(AUTH_SOCK\\|AGENT_PID\\)$" "^\\(SSH\\|GPG\\)_TTY$"
|
||||
"^GPG_AGENT_INFO$"
|
||||
;; Internal Doom envvars
|
||||
"^DEBUG$" "^INSECURE$" "^\\(EMACS\\|DOOM\\)DIR$"
|
||||
"^DEBUG$" "^INSECURE$" "^\\(EMACS\\|DOOM\\(LOCAL\\)?\\)DIR$"
|
||||
"^DOOM\\(PATH\\|PROFILE\\)$" "^__")
|
||||
"Environment variables to omit from envvar files.
|
||||
|
||||
|
|
|
@ -23,11 +23,12 @@
|
|||
doom-cache-dir
|
||||
doom-state-dir))
|
||||
|
||||
;; HACK: bin/doom invokes Emacs with --no-site-lisp solely to allow us to load
|
||||
;; site-start manually, here, to suppress any output it produces, and they
|
||||
;; almost always produce some. This causes premature redraws of the Emacs
|
||||
;; frame during startup (to display those messages in the minibuffer), which
|
||||
;; -- as I mention in the comments of doom.el -- really hurts startup time.
|
||||
;; HACK: bin/doom invokes Emacs with --no-site-lisp so that site files can be
|
||||
;; loaded manually, here, where I can suppress any output it produces, and
|
||||
;; they almost always produce some. This output pollutes the output of doom
|
||||
;; scripts with potentially confusing -- but always unimportant --
|
||||
;; information to the user, like deprecation notices, file-loaded messages,
|
||||
;; and linter warnings. With this, that output is suppressed.
|
||||
(quiet!
|
||||
(require 'cl nil t)
|
||||
(unless site-run-file
|
||||
|
|
13
lisp/doom.el
13
lisp/doom.el
|
@ -487,12 +487,13 @@ users).")
|
|||
;; later (see `startup--load-user-init-file@undo-hacks').
|
||||
(advice-add #'tool-bar-setup :override #'ignore)
|
||||
|
||||
;; PERF,UX: site-lisp files are often obnoxiously noisy (emitting load
|
||||
;; messages or other output to *Messages* or stdout). These queue
|
||||
;; unnecessary redraws at startup which impact startup time depending on
|
||||
;; window system. It also pollutes the logs. By suppressing it now, I can
|
||||
;; load it myself, later, in a more controlled way (see
|
||||
;; `startup--load-user-init-file@undo-hacks').
|
||||
;; PERF,UX: site-lisp files are often obnoxiously noisy (emitting output
|
||||
;; that isn't useful to end-users, like load messages, deprecation
|
||||
;; notices, and linter warnings. Displaying these in the minibuffer causes
|
||||
;; unnecessary redraws at startup which can impact startup time
|
||||
;; drastically and cause flashes of white. It also pollutes the logs. By
|
||||
;; suppressing it here, I load it myself, later, in a more controlled way
|
||||
;; (see `startup--load-user-init-file@undo-hacks').
|
||||
(put 'site-run-file 'initial-value site-run-file)
|
||||
(setq site-run-file nil)
|
||||
|
||||
|
|
|
@ -155,9 +155,14 @@ If DIR is not a project, it will be indexed (but not cached)."
|
|||
((and (bound-and-true-p helm-mode)
|
||||
(fboundp 'helm-find-files))
|
||||
(call-interactively #'helm-find-files))
|
||||
((when-let ((project-current-directory-override t)
|
||||
(pr (project-current t dir)))
|
||||
(project-find-file-in nil nil pr)))
|
||||
((when-let* ((project-current-directory-override t)
|
||||
(pr (project-current t dir)))
|
||||
(condition-case _
|
||||
(project-find-file-in nil nil pr)
|
||||
;; FIX: project.el throws errors if DIR is an empty directory,
|
||||
;; which is poor UX.
|
||||
(wrong-type-argument
|
||||
(call-interactively #'find-file)))))
|
||||
((call-interactively #'find-file)))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -135,6 +135,19 @@ Uses `evil-visual-end' if available."
|
|||
(marker-position evil-visual-end))
|
||||
(region-end)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-region (&optional as-list)
|
||||
"Return the bounds of the current seelction.
|
||||
|
||||
If AS-LIST is non-nil, returns (BEG END). Otherwise returns a cons cell (BEG .
|
||||
END)."
|
||||
(let* ((active (doom-region-active-p))
|
||||
(beg (if active (doom-region-beginning)))
|
||||
(end (if active (doom-region-end))))
|
||||
(if as-list
|
||||
(list beg end)
|
||||
(cons beg end))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-thing-at-point-or-region (&optional thing prompt)
|
||||
"Grab the current selection, THING at point, or xref identifier at point.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue