summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-27 14:11:44 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-29 21:47:37 -0700
commit756589550b58bc8485f68f10b732bbc93d70909c (patch)
treed938af6798efb746ca831ea9a682a364316aab0c
parent1ce37c45ba673715250002bb5324ca76e600619a (diff)
downloaddotfiles-756589550b58bc8485f68f10b732bbc93d70909c.tar.gz
have two confmacs* abbrevs and update & improve comment
-rw-r--r--.emacs.d/init.el44
1 files changed, 29 insertions, 15 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 02185e93..dbc8c7db 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -2448,27 +2448,41 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
;; - Emacs's Makefile rules for the .eln files are as yet somewhat flaky,
;; meaning that they don't always get recompiled when they need to.
;;
-;; Most of the time I'm working either on things other than Emacs or on Emacs
-;; at the Lisp level, and these etc/DEBUG-recommended options, other than
-;; --enable-check-lisp-object-type, really do slow Emacs down. It is quite
-;; quick to reconfigure and rebuild Emacs's C core with and without debug
-;; flags (the .elc and .eln stick around). Use an abbrev, without "&& make",
-;; to make it easy to reconfigure without the flags. This also makes it quick
-;; to reconfigure without --enable-check-lisp-object-type, for example, so
-;; that Lisp objects aren't structs and can be used in break point conditions.
+;; The configure flags in "confmacs0" are for when I am actively debugging
+;; Emacs. The flags in "confmacsg" are for day-to-day use, where I still want
+;; some debugging information available in case of an unexpected crash. The
+;; flags in "confmacs0" are recommended by etc/DEBUG, but other than
+;; --enable-check-lisp-object-type, they do noticeably slow Emacs down,
+;; especially Icomplete, and most of the time I'm working either on things
+;; other than Emacs or on Emacs at the Lisp level. "confmacsg" seems to be
+;; acceptably fast, and using these abbrevs to reconfigue and rebuild Emacs's
+;; C core back and forth is quick (the .elc stick around).
;;
-;; Delete the cache each time because I often change CFLAGS. It's still worth
-;; passing -C because configure often gets rerun by the Makefile when I rebase
-;; onto origin/master -- there is no --disable-maintainer-mode.
+;; We don't append "&& make" to the abbrev because I use 'C-x p c' to build.
+;;
+;; Order the flags such that ones I'm more likely to want to manually edit or
+;; remove for a particular build come later in the list. In particular, have
+;; --enable-check-lisp-object-type come last in the abbrev expansions because
+;; we sometimes need to quickly reconfigure without it, such that Lisp objects
+;; aren't structs and can be used in break point conditions.
+;;
+;; Delete the cache each time because we're often changing CFLAGS. It's still
+;; worth passing -C because configure often gets rerun by the Makefile when I
+;; rebase onto origin/master -- there is no --disable-maintainer-mode.
(with-eval-after-load 'esh-mode
- (define-abbrev eshell-mode-abbrev-table "confmacs"
- (string-join '("rm -f config.cache; ./configure -C"
+ (dolist (conf '(("confmacs0"
"--with-pgtk"
"--enable-checking='yes,glyphs'"
"CFLAGS='-O0 -g3'"
"--enable-check-lisp-object-type")
- " ")
- nil :system t))
+ ("confmacsg"
+ "--with-pgtk"
+ "--enable-checking='yes,glyphs'"
+ "CFLAGS='-Og -g3'"
+ "--enable-check-lisp-object-type")))
+ (define-abbrev eshell-mode-abbrev-table (car conf)
+ (string-join (cons "rm -f config.cache; ./configure -C" (cdr conf)) " ")
+ nil :system t)))
(defun spw/read-athenet-lxc ()
(let (lxcs