Merge branch 'develop' into add-persistent-soft-package
This commit is contained in:
commit
dc24c1cddc
65 changed files with 490 additions and 373 deletions
|
@ -44,8 +44,7 @@ FRAME parameter defaults to current frame."
|
|||
(let* ((font (frame-parameter nil 'font))
|
||||
(font (doom--font-name font))
|
||||
(increment (* increment doom-font-increment))
|
||||
(zoom-factor (or doom--font-scale 0))
|
||||
success)
|
||||
(zoom-factor (or doom--font-scale 0)))
|
||||
(let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum))
|
||||
increment)))
|
||||
(unless (> new-size 0)
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
(car (gethash (symbol-name package) straight--build-cache)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-package-dependencies (package &optional recursive noerror)
|
||||
(defun doom-package-dependencies (package &optional recursive _noerror)
|
||||
"Return a list of dependencies for a package."
|
||||
(let ((deps (nth 1 (gethash (symbol-name package) straight--build-cache))))
|
||||
(if recursive
|
||||
|
@ -210,11 +210,12 @@ ones."
|
|||
"Return an alist mapping package names (strings) to pinned commits (strings)."
|
||||
(let (alist)
|
||||
(dolist (package doom-packages alist)
|
||||
(with-plist! (cdr package) (recipe modules disable ignore pin unpin)
|
||||
(cl-destructuring-bind (name &key disable ignore pin unpin &allow-other-keys)
|
||||
package
|
||||
(when (and (not ignore)
|
||||
(not disable)
|
||||
(or pin unpin))
|
||||
(setf (alist-get (doom-package-recipe-repo (car package)) alist
|
||||
(setf (alist-get (doom-package-recipe-repo name) alist
|
||||
nil 'remove #'equal)
|
||||
(unless unpin pin)))))))
|
||||
|
||||
|
@ -223,7 +224,9 @@ ones."
|
|||
"Return an alist mapping package names (strings) to pinned commits (strings)."
|
||||
(let (alist)
|
||||
(dolist (package doom-packages alist)
|
||||
(with-plist! (cdr package) (recipe modules disable ignore pin unpin)
|
||||
(cl-destructuring-bind
|
||||
(_ &key recipe disable ignore pin unpin &allow-other-keys)
|
||||
package
|
||||
(when (and (not ignore)
|
||||
(not disable)
|
||||
(or unpin
|
||||
|
@ -237,8 +240,11 @@ ones."
|
|||
"Return straight recipes for non-builtin packages with a local-repo."
|
||||
(let (recipes)
|
||||
(dolist (recipe (hash-table-values straight--recipe-cache))
|
||||
(with-plist! recipe (local-repo type)
|
||||
(when (and local-repo (not (eq type 'built-in)))
|
||||
(cl-destructuring-bind (&key local-repo type no-build &allow-other-keys)
|
||||
recipe
|
||||
(unless (or (null local-repo)
|
||||
(eq type 'built-in)
|
||||
no-build)
|
||||
(push recipe recipes))))
|
||||
(nreverse recipes)))
|
||||
|
||||
|
@ -291,25 +297,29 @@ Grabs the latest commit id of the package using 'git'."
|
|||
(user-error "Not on a `package!' call")
|
||||
(backward-char)
|
||||
(let* ((recipe (cdr (sexp-at-point)))
|
||||
(name (car recipe))
|
||||
(package (car recipe))
|
||||
(oldid (doom-package-get package :pin))
|
||||
(id
|
||||
(cdr (doom-call-process
|
||||
"git" "ls-remote"
|
||||
(straight-vc-git--destructure
|
||||
(doom-plist-merge
|
||||
(plist-get (cdr recipe) :recipe)
|
||||
(or (cdr (straight-recipes-retrieve name))
|
||||
(plist-get (cdr (assq name doom-packages)) :recipe)))
|
||||
(or (cdr (straight-recipes-retrieve package))
|
||||
(plist-get (cdr (assq package doom-packages)) :recipe)))
|
||||
(upstream-repo upstream-host)
|
||||
(straight-vc-git--encode-url upstream-repo upstream-host))))))
|
||||
(unless id
|
||||
(user-error "No id for %S package" name))
|
||||
(user-error "No id for %S package" package))
|
||||
(let* ((id (if select
|
||||
(car (split-string (completing-read "Commit: " (split-string id "\n" t))))
|
||||
(car (split-string id))))
|
||||
(id (substring id 0 10)))
|
||||
(if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t)
|
||||
(replace-match id t t nil 1)
|
||||
(thing-at-point--end-of-sexp)
|
||||
(backward-char)
|
||||
(insert " :pin " (prin1-to-string id))))))))
|
||||
(if (and oldid (string-match-p (concat "^" oldid) id))
|
||||
(user-error "No update necessary")
|
||||
(if (re-search-forward ":pin +\"\\([^\"]+\\)\"" (cdr (bounds-of-thing-at-point 'sexp)) t)
|
||||
(replace-match id t t nil 1)
|
||||
(thing-at-point--end-of-sexp)
|
||||
(backward-char)
|
||||
(insert " :pin " (prin1-to-string id)))
|
||||
(message "Updated %S: %s -> %s" package oldid id)))))))
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
;;; core/autoload/projects.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar projectile-project-root nil)
|
||||
(defvar projectile-enable-caching)
|
||||
(defvar projectile-require-project-root)
|
||||
|
||||
;;;###autoload (autoload 'projectile-relevant-known-projects "projectile")
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ following:
|
|||
;;
|
||||
;;; Commands
|
||||
|
||||
(defvar projectile-enable-caching)
|
||||
;;;###autoload
|
||||
(defun doom/open-scratch-buffer (&optional arg project-p)
|
||||
"Pop up a persistent scratch buffer.
|
||||
|
|
|
@ -117,34 +117,37 @@ in some cases."
|
|||
;;; Commands
|
||||
|
||||
(defun doom--bol-bot-eot-eol (&optional pos)
|
||||
(let* ((bol (if visual-line-mode
|
||||
(save-excursion
|
||||
(beginning-of-visual-line)
|
||||
(point))
|
||||
(line-beginning-position)))
|
||||
(bot (save-excursion
|
||||
(goto-char bol)
|
||||
(skip-chars-forward " \t\r")
|
||||
(point)))
|
||||
(eol (if visual-line-mode
|
||||
(save-excursion (end-of-visual-line) (point))
|
||||
(line-end-position)))
|
||||
(eot (or (save-excursion
|
||||
(if (not comment-use-syntax)
|
||||
(progn
|
||||
(goto-char bol)
|
||||
(when (re-search-forward comment-start-skip eol t)
|
||||
(or (match-end 1) (match-beginning 0))))
|
||||
(goto-char eol)
|
||||
(while (and (doom-point-in-comment-p)
|
||||
(> (point) bol))
|
||||
(backward-char))
|
||||
(skip-chars-backward " " bol)
|
||||
(unless (or (eq (char-after) 32) (eolp))
|
||||
(forward-char))
|
||||
(point)))
|
||||
eol)))
|
||||
(list bol bot eot eol)))
|
||||
(save-excursion
|
||||
(when pos
|
||||
(goto-char pos))
|
||||
(let* ((bol (if visual-line-mode
|
||||
(save-excursion
|
||||
(beginning-of-visual-line)
|
||||
(point))
|
||||
(line-beginning-position)))
|
||||
(bot (save-excursion
|
||||
(goto-char bol)
|
||||
(skip-chars-forward " \t\r")
|
||||
(point)))
|
||||
(eol (if visual-line-mode
|
||||
(save-excursion (end-of-visual-line) (point))
|
||||
(line-end-position)))
|
||||
(eot (or (save-excursion
|
||||
(if (not comment-use-syntax)
|
||||
(progn
|
||||
(goto-char bol)
|
||||
(when (re-search-forward comment-start-skip eol t)
|
||||
(or (match-end 1) (match-beginning 0))))
|
||||
(goto-char eol)
|
||||
(while (and (doom-point-in-comment-p)
|
||||
(> (point) bol))
|
||||
(backward-char))
|
||||
(skip-chars-backward " " bol)
|
||||
(unless (or (eq (char-after) 32) (eolp))
|
||||
(forward-char))
|
||||
(point)))
|
||||
eol)))
|
||||
(list bol bot eot eol))))
|
||||
|
||||
(defvar doom--last-backward-pt nil)
|
||||
;;;###autoload
|
||||
|
@ -154,7 +157,7 @@ beginning of the line. The opposite of
|
|||
`doom/forward-to-last-non-comment-or-eol'."
|
||||
(interactive "d")
|
||||
(let ((pt (or point (point))))
|
||||
(cl-destructuring-bind (bol bot _eot eol)
|
||||
(cl-destructuring-bind (bol bot _eot _eol)
|
||||
(doom--bol-bot-eot-eol pt)
|
||||
(cond ((> pt bot)
|
||||
(goto-char bot))
|
||||
|
|
|
@ -134,10 +134,8 @@ one wants that.")
|
|||
(form))))
|
||||
|
||||
(defun doom-cli--generate-autoloads-autodefs (file buffer module &optional module-enabled-p)
|
||||
(with-current-buffer
|
||||
(or (get-file-buffer file)
|
||||
(autoload-find-file file))
|
||||
(goto-char (point-min))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(while (re-search-forward "^;;;###autodef *\\([^\n]+\\)?\n" nil t)
|
||||
(let* ((standard-output buffer)
|
||||
(form (read (current-buffer)))
|
||||
|
|
|
@ -79,15 +79,23 @@ DOOMDIR environment variable. e.g.
|
|||
|
||||
(print! "Regenerating autoloads files")
|
||||
(doom-cli-reload-autoloads)
|
||||
|
||||
(if nofonts-p
|
||||
(print! (warn "Not installing fonts, as requested"))
|
||||
(when (or doom-auto-accept
|
||||
(y-or-n-p "Download and install all-the-icon's fonts?"))
|
||||
(require 'all-the-icons)
|
||||
(let ((window-system (cond (IS-MAC 'ns)
|
||||
(IS-LINUX 'x))))
|
||||
(all-the-icons-install-fonts 'yes))))
|
||||
|
||||
(cond (nofonts-p)
|
||||
(IS-WINDOWS
|
||||
(print! (warn "Doom cannot install all-the-icons' fonts on Windows!\n"))
|
||||
(print-group!
|
||||
(print!
|
||||
(concat "You'll have to do so manually:\n\n"
|
||||
" 1. Launch Doom Emacs\n"
|
||||
" 2. Execute 'M-x all-the-icons-install-fonts' to download the fonts\n"
|
||||
" 3. Open the download location in windows explorer\n"
|
||||
" 4. Open each font file to install them"))))
|
||||
((or doom-auto-accept
|
||||
(y-or-n-p "Download and install all-the-icon's fonts?"))
|
||||
(require 'all-the-icons)
|
||||
(let ((window-system (cond (IS-MAC 'ns)
|
||||
(IS-LINUX 'x))))
|
||||
(all-the-icons-install-fonts 'yes))))
|
||||
|
||||
(when (file-exists-p "~/.emacs")
|
||||
(print! (warn "A ~/.emacs file was detected. This conflicts with Doom and should be deleted!")))
|
||||
|
|
|
@ -194,7 +194,7 @@ declaration) or dependency thereof that hasn't already been."
|
|||
(setq output (doom--commit-log-between ref target-ref)))
|
||||
(doom--same-commit-p target-ref (straight-vc-get-commit type local-repo)))
|
||||
|
||||
((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc)
|
||||
((print! (start "\033[K(%d/%d) Re-cloning %s...") i total local-repo esc)
|
||||
(let ((repo (straight--repos-dir local-repo)))
|
||||
(ignore-errors
|
||||
(delete-directory repo 'recursive))
|
||||
|
@ -212,8 +212,9 @@ declaration) or dependency thereof that hasn't already been."
|
|||
(puthash local-repo t repos-to-rebuild)
|
||||
(puthash package t packages-to-rebuild)
|
||||
(unless (string-empty-p output)
|
||||
(print-group! (print! (info "%s" output))))
|
||||
(print! (success "(%d/%d) %s updated (%s -> %s)")
|
||||
(print! (start "\033[K(%d/%d) Updating %s...") i total local-repo)
|
||||
(print-group! (print! (indent 2 output))))
|
||||
(print! (success "\033[K(%d/%d) %s updated (%s -> %s)")
|
||||
i total local-repo
|
||||
(doom--abbrev-commit ref)
|
||||
(doom--abbrev-commit target-ref)))
|
||||
|
|
|
@ -43,10 +43,11 @@ possible."
|
|||
(and buffer-file-name
|
||||
(not doom-large-file-p)
|
||||
(file-exists-p buffer-file-name)
|
||||
(> (nth 7 (file-attributes buffer-file-name))
|
||||
(* 1024 1024
|
||||
(assoc-default buffer-file-name doom-large-file-size-alist
|
||||
#'string-match-p)))))
|
||||
(ignore-errors
|
||||
(> (nth 7 (file-attributes buffer-file-name))
|
||||
(* 1024 1024
|
||||
(assoc-default buffer-file-name doom-large-file-size-alist
|
||||
#'string-match-p))))))
|
||||
(prog1 (apply orig-fn args)
|
||||
(if (memq major-mode doom-large-file-excluded-modes)
|
||||
(setq doom-large-file-p nil)
|
||||
|
|
|
@ -282,7 +282,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
(setq window-resize-pixelwise t
|
||||
frame-resize-pixelwise t)
|
||||
|
||||
(unless EMACS27+
|
||||
(when (bound-and-true-p tool-bar-mode)
|
||||
;; We do this in early-init.el too, but in case the user is on Emacs 26 we do
|
||||
;; it here too: disable tool and scrollbars, as Doom encourages
|
||||
;; keyboard-centric workflows, so these are just clutter (the scrollbar also
|
||||
|
|
|
@ -134,6 +134,9 @@ users).")
|
|||
;;
|
||||
;;; Emacs core configuration
|
||||
|
||||
;; lo', longer logs ahoy, so we may reliably locate lapses in doom's logic
|
||||
(setq message-log-max 8192)
|
||||
|
||||
;; Reduce debug output, well, unless we've asked for it.
|
||||
(setq debug-on-error doom-debug-mode
|
||||
jka-compr-verbose doom-debug-mode)
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
;; core-editor.el
|
||||
(package! better-jumper :pin "6d240032ca")
|
||||
(package! dtrt-indent :pin "48221c928b")
|
||||
(package! helpful :pin "e511e8dbd3")
|
||||
(package! helpful :pin "c54e9ddbd6")
|
||||
(when IS-MAC
|
||||
(package! ns-auto-titlebar :pin "1efc30d385"))
|
||||
(package! pcre2el :pin "0b5b2a2c17")
|
||||
(package! smartparens :pin "9449ae0859")
|
||||
(package! smartparens :pin "be8d5c9a63")
|
||||
(package! so-long
|
||||
:built-in 'prefer ; included in Emacs 27+
|
||||
;; REVIEW so-long is slated to be published to ELPA eventually, but until then
|
||||
|
@ -37,11 +37,11 @@
|
|||
(package! xclip :pin "88003b782e"))
|
||||
|
||||
;; core-projects.el
|
||||
(package! projectile :pin "27a0da9cdc")
|
||||
(package! projectile :pin "84be1dada3")
|
||||
|
||||
;; core-keybinds.el
|
||||
(package! general :pin "f6e928622d")
|
||||
(package! which-key :pin "db3d003e90")
|
||||
(package! which-key :pin "cf44641485")
|
||||
|
||||
;; autoload/cache.el
|
||||
(package! persistent-soft :pin "a1e0ddf")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue