diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/init.el b/init.el index b0d9d77..48f3d39 100644 --- a/init.el +++ b/init.el | |||
@@ -345,6 +345,7 @@ In short, DO NOT USE THIS FUNCTION!!!" | |||
345 | (blink-cursor-mode +1)) | 345 | (blink-cursor-mode +1)) |
346 | 346 | ||
347 | (setup cus-edit | 347 | (setup cus-edit |
348 | (:also-load acdw-cus-edit) | ||
348 | (:option custom-file (acdw/dir "custom.el") | 349 | (:option custom-file (acdw/dir "custom.el") |
349 | custom-magic-show nil | 350 | custom-magic-show nil |
350 | custom-magic-show-button t | 351 | custom-magic-show-button t |
@@ -359,34 +360,10 @@ In short, DO NOT USE THIS FUNCTION!!!" | |||
359 | 360 | ||
360 | ;; `Custom-mode-hook' fires /before/ the widgets are built, so I have to | 361 | ;; `Custom-mode-hook' fires /before/ the widgets are built, so I have to |
361 | ;; install advice after the widgets are made. | 362 | ;; install advice after the widgets are made. |
362 | (:advise custom-buffer-create :after | 363 | (:advise custom-buffer-create-internal :after #'acdw-cus/expand-widgets) |
363 | (defun custom-buffer@expand-widgets (&rest _) | ||
364 | "Expand descriptions in `Custom-mode' buffers." | ||
365 | (interactive) | ||
366 | ;; "More/Hide" widgets (thanks alphapapa!) | ||
367 | (widget-map-buttons (lambda (widget _) | ||
368 | (pcase (widget-get widget :off) | ||
369 | ("More" (widget-apply-action widget))) | ||
370 | nil)) | ||
371 | ;; "Show Value" widgets (the little triangles) | ||
372 | (widget-map-buttons (lambda (widget _) | ||
373 | (pcase (widget-get widget :off) | ||
374 | ("Show Value" | ||
375 | (widget-apply-action widget))) | ||
376 | nil)))) | ||
377 | 364 | ||
378 | (:with-mode Custom-mode | 365 | (:with-mode Custom-mode |
379 | (:local-set imenu-generic-expression ; thanks u/oantolin! | 366 | (:local-set imenu-generic-expression acdw-cus/imenu-generic-expression))) |
380 | '(("Faces" (rx (seq bol | ||
381 | (or "Show" "Hide") " " | ||
382 | (group (zero-or-more nonl)) | ||
383 | " face: [sample]")) | ||
384 | 1) | ||
385 | ("Variables" (rx (seq bol | ||
386 | (or "Show Value" "Hide") " " | ||
387 | (group (zero-or-more | ||
388 | (not (any "\n:")))))) | ||
389 | 1))))) | ||
390 | 367 | ||
391 | (setup debugger | 368 | (setup debugger |
392 | (:hook visual-line-mode)) | 369 | (:hook visual-line-mode)) |