Minor refactor & reformatting across the board

This commit is contained in:
Henrik Lissner 2020-04-08 15:29:29 -04:00
parent 2957f5ff28
commit b78fc4eb76
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
27 changed files with 189 additions and 164 deletions

View file

@ -33,7 +33,7 @@ extension, try to guess one."
(file-name-extension buffer-file-name))
buffer-file-name
(format "%s%s" (buffer-file-name (buffer-base-buffer))
(if-let* ((ext (cdr (assq major-mode +editorconfig-mode-alist))))
(if-let (ext (alist-get major-mode +editorconfig-mode-alist))
(concat "." ext)
"")))))
(funcall orig-fn)))

View file

@ -62,30 +62,31 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
(dolist (mode (doom-enlist modes))
(let ((hook (intern (format "%s-hook" mode)))
(fn (intern (format "+lookup--init-%s-handlers-h" mode))))
(cond ((null (car plist))
(remove-hook hook fn)
(unintern fn nil))
((fset
fn
(lambda ()
(cl-destructuring-bind (&key definition references documentation file xref-backend async)
plist
(cl-mapc #'+lookup--set-handler
(list definition
references
documentation
file
xref-backend)
(list '+lookup-definition-functions
'+lookup-references-functions
'+lookup-documentation-functions
'+lookup-file-functions
'xref-backend-functions)
(make-list 5 async)
(make-list 5 (or (eq major-mode mode)
(and (boundp mode)
(symbol-value mode))))))))
(add-hook hook fn))))))
(if (null (car plist))
(progn
(remove-hook hook fn)
(unintern fn nil))
(fset
fn
(lambda ()
(cl-destructuring-bind (&key definition references documentation file xref-backend async)
plist
(cl-mapc #'+lookup--set-handler
(list definition
references
documentation
file
xref-backend)
(list '+lookup-definition-functions
'+lookup-references-functions
'+lookup-documentation-functions
'+lookup-file-functions
'xref-backend-functions)
(make-list 5 async)
(make-list 5 (or (eq major-mode mode)
(and (boundp mode)
(symbol-value mode))))))))
(add-hook hook fn)))))
;;

View file

@ -70,7 +70,7 @@
(set-popup-rule! "^\\(?:\\*magit\\|magit:\\| \\*transient\\*\\)" :ignore t)
(add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
;; Add --tags switch
;; Add additional switches that seem common enough
(transient-append-suffix 'magit-fetch "-p"
'("-t" "Fetch all tags" ("-t" "--tags")))
(transient-append-suffix 'magit-pull "-r"