dev: updating pr7002 from pr
This commit is contained in:
commit
ae03012599
20 changed files with 167 additions and 148 deletions
|
@ -1050,9 +1050,9 @@ considered as well."
|
|||
"\n")))
|
||||
(print! (warn "Wrote extended straight log to %s")
|
||||
(path (let ((coding-system-for-write 'utf-8-auto))
|
||||
(with-file-modes #o600
|
||||
(with-temp-file error-file
|
||||
(insert-buffer-substring (straight--process-buffer)))
|
||||
(set-file-modes error-file #o600)
|
||||
(insert-buffer-substring (straight--process-buffer))))
|
||||
error-file))))
|
||||
((eq type 'error)
|
||||
(let* ((generic? (eq (car data) 'error))
|
||||
|
@ -1123,11 +1123,12 @@ See `doom-cli-log-file-format' for details."
|
|||
(let* ((buffer (doom-cli-context-stderr context))
|
||||
(file (doom-cli--output-file "log" context)))
|
||||
(when (> (buffer-size buffer) 0)
|
||||
(make-directory (file-name-directory file) t)
|
||||
(with-file-modes #o700
|
||||
(make-directory (file-name-directory file) t))
|
||||
(with-file-modes #o600
|
||||
(with-temp-file file
|
||||
(insert-buffer-substring buffer)
|
||||
(ansi-color-filter-region (point-min) (point-max)))
|
||||
(set-file-modes file #o600)))))
|
||||
(ansi-color-filter-region (point-min) (point-max))))))))
|
||||
|
||||
(defun doom-cli--output-benchmark-h (context)
|
||||
"Write this session's benchmark to stdout or stderr, depending.
|
||||
|
@ -1351,10 +1352,11 @@ ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
|||
|
||||
((let ((tmpfile (doom-cli--output-file 'output context))
|
||||
(coding-system-for-write 'utf-8-auto))
|
||||
(make-directory (file-name-directory tmpfile) t)
|
||||
(with-file-modes #o700
|
||||
(make-directory (file-name-directory tmpfile) t))
|
||||
(with-file-modes #o600
|
||||
(with-temp-file tmpfile
|
||||
(insert-buffer-substring (doom-cli-context-stdout context)))
|
||||
(set-file-modes tmpfile #o600)
|
||||
(insert-buffer-substring (doom-cli-context-stdout context))))
|
||||
(doom-cli--restart
|
||||
(format "%s <%s; rm -f%s %s"
|
||||
(or pager
|
||||
|
|
|
@ -801,7 +801,7 @@ This macro accepts, in order:
|
|||
func-forms)))
|
||||
`(progn
|
||||
,@defn-forms
|
||||
(dolist (hook (nreverse ',hook-forms))
|
||||
(dolist (hook ',(nreverse hook-forms))
|
||||
(dolist (func (list ,@func-forms))
|
||||
,(if remove-p
|
||||
`(remove-hook hook func ,local-p)
|
||||
|
|
74
lisp/doom.el
74
lisp/doom.el
|
@ -116,9 +116,9 @@
|
|||
(push 'dynamic-modules features))
|
||||
(if (fboundp #'json-parse-string)
|
||||
(push 'jansson features))
|
||||
(let ((inhibit-changing-match-data t))
|
||||
(if (string-match "HARFBUZZ" system-configuration-features) ; no alternative
|
||||
(push 'harfbuzz features)))
|
||||
(if (string-match-p "HARFBUZZ" system-configuration-features) ; no alternative
|
||||
(push 'harfbuzz features))
|
||||
|
||||
;; The `native-compile' feature exists whether or not it is functional (e.g.
|
||||
;; libgcc is available or not). This seems silly, so pretend it doesn't exist if
|
||||
;; it isn't functional.
|
||||
|
@ -237,7 +237,7 @@ These files should not be shared across systems. By default, it is used by
|
|||
|
||||
Data files contain shared and long-lived data that Doom, Emacs, and their
|
||||
packages require to function correctly or at all. Deleting them by hand will
|
||||
cause breakage, and require user intervention (e.g. a 'doom sync' or 'doom env')
|
||||
cause breakage, and require user intervention (e.g. a `doom sync` or `doom env`)
|
||||
to restore.
|
||||
|
||||
Use this for: server binaries, package source, pulled module libraries,
|
||||
|
@ -254,10 +254,10 @@ For profile-local data files, use `doom-profile-data-dir' instead.")
|
|||
(file-name-concat doom-local-dir "cache/"))
|
||||
"Where Doom stores its global cache files.
|
||||
|
||||
Cache files represent non-essential data that shouldn't be problematic when
|
||||
Cache files represent unessential data that shouldn't be problematic when
|
||||
deleted (besides, perhaps, a one-time performance hit), lack portability (and so
|
||||
shouldn't be copied to other systems/configs), and are regenerated when needed,
|
||||
without user input (e.g. a 'doom sync').
|
||||
without user input (e.g. a `doom sync`).
|
||||
|
||||
Some examples: images/data caches, elisp bytecode, natively compiled elisp,
|
||||
session files, ELPA archives, authinfo files, org-persist, etc.
|
||||
|
@ -273,11 +273,11 @@ For profile-local cache files, use `doom-profile-cache-dir' instead.")
|
|||
(file-name-concat doom-local-dir "state/"))
|
||||
"Where Doom stores its global state files.
|
||||
|
||||
State files contain non-essential, unportable, but persistent data which, if
|
||||
lost won't cause breakage, but may be inconvenient as they cannot be
|
||||
automatically regenerated or restored. For example, a recently-opened file list
|
||||
is not essential, but losing it means losing this record, and restoring it
|
||||
requires revisiting all those files.
|
||||
State files contain unessential, unportable, but persistent data which, if lost
|
||||
won't cause breakage, but may be inconvenient as they cannot be automatically
|
||||
regenerated or restored. For example, a recently-opened file list is not
|
||||
essential, but losing it means losing this record, and restoring it requires
|
||||
revisiting all those files.
|
||||
|
||||
Use this for: history, logs, user-saved data, autosaves/backup files, known
|
||||
projects, recent files, bookmarks.
|
||||
|
@ -331,15 +331,16 @@ users).")
|
|||
;; `file-remote-p'). You get a noteable boost to startup time by unsetting
|
||||
;; or simplifying its value.
|
||||
(let ((old-value (default-toplevel-value 'file-name-handler-alist)))
|
||||
(setq file-name-handler-alist
|
||||
;; HACK: If the bundled elisp for this Emacs install isn't
|
||||
;; byte-compiled (but is compressed), then leave the gzip file
|
||||
;; handler there so Emacs won't forget how to read read them.
|
||||
(set-default-toplevel-value
|
||||
'file-name-handler-alist
|
||||
;; HACK: If the bundled elisp for this Emacs install isn't byte-compiled
|
||||
;; (but is compressed), then leave the gzip file handler there so Emacs
|
||||
;; won't forget how to read read them.
|
||||
;;
|
||||
;; calc-loaddefs.el is our heuristic for this because it is built-in
|
||||
;; to all supported versions of Emacs, and calc.el explicitly loads
|
||||
;; it uncompiled. This ensures that the only other, possible
|
||||
;; fallback would be calc-loaddefs.el.gz.
|
||||
;; calc-loaddefs.el is our heuristic for this because it is built-in to
|
||||
;; all supported versions of Emacs, and calc.el explicitly loads it
|
||||
;; uncompiled. This ensures that the only other, possible fallback would
|
||||
;; be calc-loaddefs.el.gz.
|
||||
(if (eval-when-compile
|
||||
(locate-file-internal "calc-loaddefs.el" load-path))
|
||||
nil
|
||||
|
@ -352,7 +353,8 @@ users).")
|
|||
;; needed for handling encrypted or compressed files, among other things.
|
||||
(add-hook! 'emacs-startup-hook :depth 101
|
||||
(defun doom--reset-file-handler-alist-h ()
|
||||
(setq file-name-handler-alist
|
||||
(set-default-toplevel-value
|
||||
'file-name-handler-alist
|
||||
;; Merge instead of overwrite because there may have been changes to
|
||||
;; `file-name-handler-alist' since startup we want to preserve.
|
||||
(delete-dups (append file-name-handler-alist old-value))))))
|
||||
|
@ -409,23 +411,23 @@ users).")
|
|||
(define-advice startup--load-user-init-file (:before (&rest _) undo-silence)
|
||||
(advice-remove #'load-file #'load-file@silence))
|
||||
|
||||
;; PERF: `load-suffixes' and `load-file-rep-suffixes' are consulted on each
|
||||
;; `require' and `load'. Doom won't load any dmodules this early, so omit
|
||||
;; .so for a small startup boost. This is later restored in doom-start.
|
||||
;; PERF: `load-suffixes' and `load-file-rep-suffixes' are consulted on
|
||||
;; each `require' and `load'. Doom won't load any modules this early, so
|
||||
;; omit .so for a tiny startup boost. Is later restored in doom-start.
|
||||
(put 'load-suffixes 'initial-value (default-toplevel-value 'load-suffixes))
|
||||
(put 'load-file-rep-suffixes 'initial-value (default-toplevel-value 'load-file-rep-suffixes))
|
||||
(set-default-toplevel-value 'load-suffixes '(".elc" ".el"))
|
||||
(set-default-toplevel-value 'load-file-rep-suffixes '(""))
|
||||
;; COMPAT: Undo any problematic startup optimizations; from this point, I make
|
||||
;; no assumptions about what might be loaded in userland.
|
||||
;; COMPAT: Undo any problematic startup optimizations; from this point, I
|
||||
;; make no assumptions about what might be loaded in userland.
|
||||
(add-hook! 'doom-before-init-hook
|
||||
(defun doom--reset-load-suffixes-h ()
|
||||
(setq load-suffixes (get 'load-suffixes 'initial-value)
|
||||
load-file-rep-suffixes (get 'load-file-rep-suffixes 'initial-value))))
|
||||
|
||||
;; PERF: Doom uses `defcustom' to indicate variables that users are expected
|
||||
;; to reconfigure. Trouble is it fires off initializers meant to
|
||||
;; accommodate any user attempts to configure them before they were
|
||||
;; PERF: Doom uses `defcustom' to indicate variables that users are
|
||||
;; expected to reconfigure. Trouble is it fires off initializers meant
|
||||
;; to accommodate any user attempts to configure them before they were
|
||||
;; defined. This is unnecessary before $DOOMDIR/init.el is loaded, so I
|
||||
;; disable them until it is.
|
||||
(setq custom-dont-initialize t)
|
||||
|
@ -434,8 +436,8 @@ users).")
|
|||
(setq custom-dont-initialize nil)))
|
||||
|
||||
;; PERF: The mode-line procs a couple dozen times during startup. This is
|
||||
;; normally quite fast, but disabling the default mode-line and reducing the
|
||||
;; update delay timer seems to stave off ~30-50ms.
|
||||
;; normally quite fast, but disabling the default mode-line and reducing
|
||||
;; the update delay timer seems to stave off ~30-50ms.
|
||||
(put 'mode-line-format 'initial-value (default-toplevel-value 'mode-line-format))
|
||||
(setq-default mode-line-format nil)
|
||||
(dolist (buf (buffer-list))
|
||||
|
@ -444,7 +446,7 @@ users).")
|
|||
;; produce ugly flashes of unstyled Emacs.
|
||||
(setq-default inhibit-redisplay t
|
||||
inhibit-message t)
|
||||
;; COMPAT: Then reset it with advice, because `startup--load-user-init-file'
|
||||
;; COMPAT: Then reset with advice, because `startup--load-user-init-file'
|
||||
;; will never be interrupted by errors. And if these settings are left
|
||||
;; set, Emacs could appear frozen or garbled.
|
||||
(defun doom--reset-inhibited-vars-h ()
|
||||
|
@ -459,8 +461,8 @@ users).")
|
|||
(unless (default-toplevel-value 'mode-line-format)
|
||||
(setq-default mode-line-format (get 'mode-line-format 'initial-value))))
|
||||
|
||||
;; PERF: Doom disables the UI elements by default, so that there's less for
|
||||
;; the frame to initialize. However, the toolbar is still populated
|
||||
;; PERF: Doom disables the UI elements by default, so that there's less
|
||||
;; for the frame to initialize. However, the toolbar is still populated
|
||||
;; regardless, so I lazy load it until tool-bar-mode is actually used.
|
||||
(advice-add #'tool-bar-setup :override #'ignore)
|
||||
(define-advice startup--load-user-init-file (:before (&rest _) defer-tool-bar-setup)
|
||||
|
@ -497,7 +499,7 @@ All valid contexts:
|
|||
(put 'doom-context 'valid-values '(cli compile eval init modules packages reload doctor sandbox))
|
||||
(put 'doom-context 'risky-local-variable t)
|
||||
|
||||
(defun doom-context--check (context)
|
||||
(defun doom-context--assert (context)
|
||||
(let ((valid (get 'doom-context 'valid-values)))
|
||||
(unless (memq context valid)
|
||||
(signal 'doom-context-error
|
||||
|
@ -512,7 +514,7 @@ All valid contexts:
|
|||
|
||||
Return non-nil if successful. Throws an error if CONTEXT is invalid."
|
||||
(unless (memq context doom-context)
|
||||
(doom-context--check context)
|
||||
(doom-context--assert context)
|
||||
(doom-log ":context: +%s %s" context doom-context)
|
||||
(push context doom-context)))
|
||||
|
||||
|
@ -529,7 +531,7 @@ wasn't active when this was called."
|
|||
(setq doom-context (delq context doom-context))))
|
||||
|
||||
(defmacro doom-context-with (contexts &rest body)
|
||||
"Evaluate BODY with CONTEXT added to `doom-context'."
|
||||
"Evaluate BODY with CONTEXTS added to `doom-context'."
|
||||
(declare (indent 1))
|
||||
`(let ((doom-context doom-context))
|
||||
(dolist (context (ensure-list ,contexts))
|
||||
|
|
|
@ -220,7 +220,7 @@ single file or nested compound statement of `and' and `or' statements."
|
|||
(let* ((buffer-file-name (doom-path ,file))
|
||||
(coding-system-for-read (or ,coding 'binary))
|
||||
(coding-system-for-write (or coding-system-for-write coding-system-for-read 'binary)))
|
||||
(unless (eq coding-system-for-read 'binary)
|
||||
(when (eq coding-system-for-read 'binary)
|
||||
(set-buffer-multibyte nil)
|
||||
(setq-local buffer-file-coding-system 'binary))
|
||||
,@body))
|
||||
|
@ -245,7 +245,8 @@ special values:
|
|||
'read* -- read all forms in FILE and return it as a list of S-exps.
|
||||
'(read . N) -- read the first N (an integer) S-exps in FILE.
|
||||
|
||||
CODING dictates the encoding of the buffer. This defaults to `utf-8'.
|
||||
CODING dictates the encoding of the buffer. This defaults to `utf-8'. If set to
|
||||
nil, `binary' is used.
|
||||
|
||||
If NOERROR is non-nil, don't throw an error if FILE doesn't exist. This will
|
||||
still throw an error if FILE is unreadable, however.
|
||||
|
@ -301,18 +302,21 @@ If CONTENTS is list of forms. Any literal strings in the list are inserted
|
|||
verbatim, as text followed by a newline, with `insert'. Sexps are inserted with
|
||||
`prin1'. BY is the function to use to emit
|
||||
|
||||
MODE dictates the permissions of the file. If FILE already exists, its
|
||||
permissions will be changed.
|
||||
MODE dictates the permissions of created file and directories. MODE is either an
|
||||
integer or a cons cell whose car is the mode for files and cdr the mode for
|
||||
directories. If FILE already exists, its permissions will be changed. The
|
||||
permissions of existing directories will never be changed.
|
||||
|
||||
CODING dictates the encoding to read/write with (see `coding-system-for-write').
|
||||
If set to nil, `binary' is used.
|
||||
This defaults to `utf-8'. If set to nil, `binary' is used.
|
||||
|
||||
APPEND dictates where CONTENTS will be written. If neither is set,
|
||||
the file will be overwritten. If both are, the contents will be written to both
|
||||
ends. Set either APPEND or PREPEND to `noerror' to silently ignore read errors."
|
||||
(doom--with-prepared-file-buffer file coding mode
|
||||
(let ((contents (ensure-list contents))
|
||||
(let ((mode (ensure-list mode))
|
||||
(contents (ensure-list contents))
|
||||
datum)
|
||||
(doom--with-prepared-file-buffer file coding (car mode)
|
||||
(while (setq datum (pop contents))
|
||||
(cond ((stringp datum)
|
||||
(funcall
|
||||
|
@ -325,15 +329,21 @@ ends. Set either APPEND or PREPEND to `noerror' to silently ignore read errors."
|
|||
((let ((standard-output (current-buffer))
|
||||
(print-quoted t)
|
||||
(print-level nil)
|
||||
(print-length nil))
|
||||
(funcall printfn datum))))))
|
||||
(print-length nil)
|
||||
;; Escape special chars to avoid any shenanigans
|
||||
(print-escape-newlines t)
|
||||
(print-escape-control-characters t)
|
||||
(print-escape-nonascii t)
|
||||
(print-escape-multibyte t))
|
||||
(funcall printfn datum)))))
|
||||
(let (write-region-annotate-functions
|
||||
write-region-post-annotation-function)
|
||||
(when mkdir
|
||||
(with-file-modes (or (cdr mode) (default-file-modes))
|
||||
(make-directory (file-name-directory buffer-file-name)
|
||||
(eq mkdir 'parents)))
|
||||
(eq mkdir 'parents))))
|
||||
(write-region nil nil buffer-file-name append :silent))
|
||||
buffer-file-name))
|
||||
buffer-file-name)))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro with-file-contents! (file &rest body)
|
||||
|
|
|
@ -239,7 +239,7 @@ Must be run from a magit diff buffer."
|
|||
(unless (= (length before) (length after))
|
||||
(user-error "Uneven number of packages being bumped"))
|
||||
(dolist (p1 before)
|
||||
(when (and (listp p1) (eq (car p1) 'package!))
|
||||
(when (and (listp p1) (plist-get (cdr p1) :package))
|
||||
(cl-destructuring-bind (package &key plist _beg _end &allow-other-keys) p1
|
||||
(let ((p2 (cdr (assq package after))))
|
||||
(if (null p2)
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
:in PATH
|
||||
Sets what directory to base the search out of. Defaults to the current project's root.
|
||||
:recursive BOOL
|
||||
Whether or not to search files recursively from the base directory."
|
||||
Whether or not to search files recursively from the base directory.
|
||||
:args LIST
|
||||
Arguments to be appended to `consult-ripgrep-args'."
|
||||
(declare (indent defun))
|
||||
(unless (executable-find "rg")
|
||||
(user-error "Couldn't find ripgrep in your PATH"))
|
||||
|
@ -29,7 +31,7 @@
|
|||
"--path-separator / --smart-case --no-heading "
|
||||
"--with-filename --line-number --search-zip "
|
||||
"--hidden -g !.git -g !.svn -g !.hg "
|
||||
(mapconcat #'shell-quote-argument args " ")))
|
||||
(mapconcat #'identity args " ")))
|
||||
(prompt (if (stringp prompt) (string-trim prompt) "Search"))
|
||||
(query (or query
|
||||
(when (doom-region-active-p)
|
||||
|
|
|
@ -59,11 +59,16 @@
|
|||
(after! woman
|
||||
;; The woman-manpath default value does not necessarily match man. If we have
|
||||
;; man available but aren't using it for performance reasons, we can extract
|
||||
;; it's manpath.
|
||||
(when (executable-find "man")
|
||||
(setq woman-manpath
|
||||
;; its manpath.
|
||||
(let ((manpath (cond
|
||||
((executable-find "manpath")
|
||||
(split-string (cdr (doom-call-process "manpath"))
|
||||
path-separator t))
|
||||
((executable-find "man")
|
||||
(split-string (cdr (doom-call-process "man" "--path"))
|
||||
path-separator t))))
|
||||
path-separator t)))))
|
||||
(when manpath
|
||||
(setq woman-manpath manpath))))
|
||||
|
||||
|
||||
(use-package! drag-stuff
|
||||
|
|
|
@ -18,50 +18,9 @@
|
|||
(t (recurse (1+ attempt))))))
|
||||
(recurse 1))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +lisp/load-project-systems ()
|
||||
"Load all systems of the current Lisp project into Sly."
|
||||
(interactive)
|
||||
(thread-last (+lisp--project-asd-file)
|
||||
(+lisp--systems-from-asd)
|
||||
(mapcar (lambda (s) (format ":%s" s)))
|
||||
(funcall (lambda (ss) (string-join ss " ")))
|
||||
(format "(ql:quickload '(%s))")
|
||||
(sly-interactive-eval)))
|
||||
|
||||
(defun +lisp--project-asd-file ()
|
||||
"Yield an absolute file path to the current project's `.asd' file."
|
||||
(let* ((proot (doom-project-root))
|
||||
(files (doom-files-in proot :depth 1 :match "[.]asd$")))
|
||||
(pcase files
|
||||
('() (error "No .asd file found in: %s" proot))
|
||||
(`(,asdf) asdf)
|
||||
(_ (error "Too many .asd files found in : %s" proot)))))
|
||||
|
||||
(defun +lisp--systems-from-asd (asdf)
|
||||
"Given a path to an ASDF project definition, extract the names of
|
||||
the systems defined therein."
|
||||
(let ((file (doom-file-read asdf))
|
||||
(patt "defsystem \"\\([a-z-/]+\\)"))
|
||||
(when (not (string-match patt file))
|
||||
(error "No systems defined in: %s" asdf))
|
||||
(thread-last (s-match-strings-all patt file)
|
||||
(mapcar #'cl-second))))
|
||||
|
||||
;; TODO Get this to run in a comint buffer?
|
||||
;;;###autoload
|
||||
(defun +lisp/test-system ()
|
||||
"Run `asdf:test-system' on the selected system of the current project."
|
||||
(interactive)
|
||||
(thread-last (+lisp--project-asd-file)
|
||||
(+lisp--systems-from-asd)
|
||||
(completing-read "Test which Lisp system?")
|
||||
(format "(asdf:test-system :%s)")
|
||||
(sly-interactive-eval)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +lisp/reload-project ()
|
||||
"Restart the Sly session and reload the current project."
|
||||
"Restart the Sly session and reload a chosen system."
|
||||
(interactive)
|
||||
(sly-restart-inferior-lisp)
|
||||
(cl-labels ((recurse (attempt)
|
||||
|
@ -72,7 +31,7 @@ the systems defined therein."
|
|||
(error "Failed to reload Lisp project in 5 attempts.")
|
||||
(recurse (1+ attempt)))))))
|
||||
(recurse 1)
|
||||
(+lisp/load-project-systems)))
|
||||
(sly-asdf-load-system)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +lisp/find-file-in-quicklisp ()
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
:desc "Who sets" "S" #'sly-who-sets)
|
||||
(:prefix ("r" . "repl")
|
||||
:desc "Clear REPL" "c" #'sly-mrepl-clear-repl
|
||||
:desc "Load Project" "l" #'+lisp/load-project-systems
|
||||
:desc "Load System" "l" #'sly-asdf-load-system
|
||||
:desc "Quit connection" "q" #'sly-quit-lisp
|
||||
:desc "Restart connection" "r" #'sly-restart-inferior-lisp
|
||||
:desc "Reload Project" "R" #'+lisp/reload-project
|
||||
|
@ -154,7 +154,7 @@
|
|||
:desc "Replay stickers" "r" #'sly-stickers-replay
|
||||
:desc "Add/remove sticker" "s" #'sly-stickers-dwim)
|
||||
(:prefix ("t" . "test")
|
||||
:desc "Test System" "s" #'+lisp/test-system)
|
||||
:desc "Test System" "s" #'sly-asdf-test-system)
|
||||
(:prefix ("T" . "trace")
|
||||
:desc "Toggle" "t" #'sly-toggle-trace-fdefinition
|
||||
:desc "Toggle (fancy)" "T" #'sly-toggle-fancy-trace
|
||||
|
@ -168,3 +168,8 @@
|
|||
:defer t
|
||||
:init
|
||||
(add-to-list 'sly-contribs 'sly-repl-ansi-color))
|
||||
|
||||
(use-package! sly-asdf
|
||||
:defer t
|
||||
:init
|
||||
(add-to-list 'sly-contribs 'sly-asdf 'append))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/common-lisp/packages.el
|
||||
|
||||
(when (package! sly :pin "f34c22289a2b3ab10e607f9f8822d62bb5c98cf5")
|
||||
(when (package! sly :pin "ed17d2c2bd7aead0fbb09c3d22861c80a522a097")
|
||||
(package! sly-asdf :pin "6f9d751469bb82530db1673c22e7437ca6c95f45")
|
||||
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
|
||||
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))
|
||||
|
|
5
modules/lang/idris/doctor.el
Normal file
5
modules/lang/idris/doctor.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
;;; lang/idris/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (require 'idris-mode nil t)
|
||||
(unless (executable-find idris-interpreter-path)
|
||||
(warn! "Cannot find the idris interpreter. Most features will not work.")))
|
|
@ -182,19 +182,21 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
|
|||
(dolist (env '("itemize" "enumerate" "description"))
|
||||
(add-to-list 'LaTeX-indent-environment-list `(,env +latex-indent-item-fn)))
|
||||
|
||||
;; Fix #1849: allow fill-paragraph in itemize/enumerate.
|
||||
(defadvice! +latex--re-indent-itemize-and-enumerate-a (fn &rest args)
|
||||
;; Fix #1849: allow fill-paragraph in itemize/enumerate/description.
|
||||
(defadvice! +latex--re-indent-itemize-and-enumerate-and-description-a (fn &rest args)
|
||||
:around #'LaTeX-fill-region-as-para-do
|
||||
(let ((LaTeX-indent-environment-list
|
||||
(append LaTeX-indent-environment-list
|
||||
'(("itemize" +latex-indent-item-fn)
|
||||
("enumerate" +latex-indent-item-fn)))))
|
||||
("enumerate" +latex-indent-item-fn)
|
||||
("description" +latex-indent-item-fn)))))
|
||||
(apply fn args)))
|
||||
(defadvice! +latex--dont-indent-itemize-and-enumerate-a (fn &rest args)
|
||||
(defadvice! +latex--dont-indent-itemize-and-enumerate-and-description-a (fn &rest args)
|
||||
:around #'LaTeX-fill-region-as-paragraph
|
||||
(let ((LaTeX-indent-environment-list LaTeX-indent-environment-list))
|
||||
(delq! "itemize" LaTeX-indent-environment-list 'assoc)
|
||||
(delq! "enumerate" LaTeX-indent-environment-list 'assoc)
|
||||
(delq! "description" LaTeX-indent-environment-list 'assoc)
|
||||
(apply fn args))))
|
||||
|
||||
|
||||
|
|
|
@ -852,6 +852,17 @@ can grow up to be fully-fledged org-mode buffers."
|
|||
(add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h
|
||||
nil 'local))))))
|
||||
|
||||
(defadvice! +org--restart-mode-before-indirect-buffer-a (base-buffer &rest _)
|
||||
"Restart `org-mode' in buffers in which the mode has been deferred (see
|
||||
`+org-defer-mode-in-agenda-buffers-h') before they become the base buffer for an
|
||||
indirect buffer. This ensures that the buffer is fully functional not only when
|
||||
the *user* visits it, but also when some code interacts with it via an indirect
|
||||
buffer as done, e.g., by `org-capture'."
|
||||
:before #'make-indirect-buffer
|
||||
(with-current-buffer base-buffer
|
||||
(when (memq #'+org--restart-mode-h doom-switch-buffer-hook)
|
||||
(+org--restart-mode-h))))
|
||||
|
||||
(defvar recentf-exclude)
|
||||
(defadvice! +org--optimize-backgrounded-agenda-buffers-a (fn file)
|
||||
"Prevent temporarily opened agenda buffers from polluting recentf."
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
(package! eshell-syntax-highlighting :pin "4ac27eec6595ba116a6151dfaf0b0e0440101e10")
|
||||
|
||||
(unless IS-WINDOWS
|
||||
(package! fish-completion :pin "df42e153082927536763bdf408184152a7c938c3")
|
||||
(package! fish-completion :pin "d34d0b96fde63feedf13c4288183d8d4d4d748cf")
|
||||
(package! bash-completion :pin "f1daac0386c24cbe8a244a62c7588cc6847b07ae"))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;; Example:
|
||||
;; ((nil . ((ssh-deploy-root-local . "/local/path/to/project")
|
||||
;; (ssh-deploy-root-remote . "/ssh:user@server:/remote/project/")
|
||||
;; (ssh-deploy-on-explicit-save . t))))
|
||||
;; (ssh-deploy-on-explicit-save . 1))))
|
||||
;;
|
||||
;; Note: `ssh-deploy-root-local' is optional, and will resort to
|
||||
;; `doom-project-root' if unspecified.
|
||||
|
@ -20,7 +20,7 @@
|
|||
ssh-deploy-remote-changes-handler)
|
||||
:init
|
||||
(setq ssh-deploy-revision-folder (concat doom-cache-dir "ssh-revisions/")
|
||||
ssh-deploy-on-explicit-save t
|
||||
ssh-deploy-on-explicit-save 1
|
||||
ssh-deploy-automatically-detect-remote-changes nil)
|
||||
|
||||
;; Make these safe as file-local variables
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/doom/packages.el
|
||||
|
||||
(package! doom-themes :pin "4aee1f5a0e54552669f747aa7c25e6027e73d76d")
|
||||
(package! doom-themes :pin "ff26f26ea3d761375f5fc4070438fbd0f3473d33")
|
||||
(package! solaire-mode :pin "8af65fbdc50b25ed3214da949b8a484527c7cc14")
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
(use-package! highlight-indent-guides
|
||||
:hook ((prog-mode text-mode conf-mode) . highlight-indent-guides-mode)
|
||||
:init (setq highlight-indent-guides-method 'character)
|
||||
:init
|
||||
(setq highlight-indent-guides-method (if (display-graphic-p) 'bitmap 'character)
|
||||
highlight-indent-guides-bitmap-function #'highlight-indent-guides--bitmap-line)
|
||||
:config
|
||||
;; HACK: If this package is loaded too early (by the user, and in terminal
|
||||
;; Emacs), then `highlight-indent-guides-auto-set-faces' will have been
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; ui/modeline/packages.el
|
||||
|
||||
(unless (modulep! +light)
|
||||
(package! doom-modeline :pin "93f240f7a0bf35511cfc0a8dd75786744b4bcf77"))
|
||||
(package! doom-modeline :pin "bf880ae56f3f6aab7bd334de9bd9b455c63a24c0"))
|
||||
(package! anzu :pin "5abb37455ea44fa401d5f4c1bdc58adb2448db67")
|
||||
(when (modulep! :editor evil)
|
||||
(package! evil-anzu :pin "d1e98ee6976437164627542909a25c6946497899"))
|
||||
|
|
|
@ -505,11 +505,22 @@ Accepts the same arguments as `display-buffer-in-side-window'. You must set
|
|||
((not (numberp vslot))
|
||||
(error "Invalid vslot %s specified" vslot)))
|
||||
|
||||
(let* ((major (get-window-with-predicate
|
||||
(let* ((live (get-window-with-predicate
|
||||
(lambda (window)
|
||||
(and (eq (window-parameter window 'window-side) side)
|
||||
(eq (window-parameter window 'window-vslot) vslot)))
|
||||
nil))
|
||||
;; As opposed to the `window-side' property, the `window-vslot'
|
||||
;; property is set only on a single live window and never on internal
|
||||
;; windows. Moreover, as opposed to `window-with-parameter' (as used
|
||||
;; by the original `display-buffer-in-side-window'),
|
||||
;; `get-window-with-predicate' only returns live windows anyway. In
|
||||
;; any case, we will have missed the major side window and got a
|
||||
;; child instead if the major side window happens to be an internal
|
||||
;; window. In that case, the major side window is the parent of the
|
||||
;; live window.
|
||||
(major (and live
|
||||
(if (window-next-sibling live) (window-parent live) live)))
|
||||
(reversed (window--sides-reverse-on-frame-p (selected-frame)))
|
||||
(windows
|
||||
(cond ((window-live-p major)
|
||||
|
|
|
@ -44,14 +44,14 @@
|
|||
:to-contain '(size . 5)))))
|
||||
|
||||
(describe "popup rules"
|
||||
:var (origin a b c d e f g)
|
||||
:var (origin a b c d e f g h i)
|
||||
(before-all (setq origin (current-buffer)))
|
||||
(before-each
|
||||
(dolist (name '(a b c d e f g))
|
||||
(dolist (name '(a b c d e f g h i))
|
||||
(set name (get-buffer-create (symbol-name name)))))
|
||||
(after-each
|
||||
(let (kill-buffer-query-functions kill-buffer-hook)
|
||||
(dolist (x (list a b c d e f g))
|
||||
(dolist (x (list a b c d e f g h i))
|
||||
(ignore-errors (delete-window (get-buffer-window x)))
|
||||
(kill-buffer x))))
|
||||
|
||||
|
@ -64,11 +64,13 @@
|
|||
("d" :slot 2 :vslot 2)
|
||||
("e" :slot 1 :vslot 3)
|
||||
("f" :slot 1 :vslot 3)
|
||||
("g"))))
|
||||
("g" :slot 2 :vslot 3)
|
||||
("h" :slot 2 :vslot 3)
|
||||
("i"))))
|
||||
|
||||
(it "replaces popups with the same slots"
|
||||
(mapc #'display-buffer (list e f))
|
||||
(expect (length (+popup-windows)) :to-be 1))
|
||||
(mapc #'display-buffer (list e f g h))
|
||||
(expect (length (+popup-windows)) :to-be 2))
|
||||
|
||||
(it "replaces popups among multiple that have the same slots"
|
||||
(let ((first (display-buffer a))
|
||||
|
@ -92,7 +94,7 @@
|
|||
(expect (window-in-direction 'right first t)
|
||||
:to-equal second)))
|
||||
(it "obeys default :slot"
|
||||
(let ((window (display-buffer g)))
|
||||
(let ((window (display-buffer i)))
|
||||
(expect (window-parameter window 'window-slot) :to-be 1)
|
||||
(expect (window-parameter window 'window-vslot) :to-be 1))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue