General, minor refactor & revision

Across the board. All the boards.
This commit is contained in:
Henrik Lissner 2018-06-16 12:26:58 +02:00
parent 02caf4eeac
commit 44363cae40
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 12 additions and 14 deletions

View file

@ -80,7 +80,7 @@
(sym (symbol-at-point))
(setting
(completing-read
"Describe setting: "
"Describe setter: "
;; TODO Could be cleaner (refactor me!)
(cl-loop with maxwidth = (apply #'max (mapcar #'length (mapcar #'symbol-name settings)))
for def in (sort settings #'string-lessp)

View file

@ -51,7 +51,7 @@ for confirmation to open it literally (read-only, disabled undo and in
fundamental-mode) for performance sake."
(when (and (not (memq major-mode doom-large-file-modes-list))
auto-mode-alist
(get-buffer-window (current-buffer)))
(get-buffer-window))
(when-let* ((size (nth 7 (file-attributes buffer-file-name))))
(when (and (> size (* 1024 1024 doom-large-file-size))
(y-or-n-p

View file

@ -28,7 +28,7 @@ default/fallback account."
(let ((context (make-mu4e-context
:name label
:enter-func (lambda () (mu4e-message "Switched to %s" label))
:leave-func (lambda () (mu4e-clear-caches))
:leave-func #'mu4e-clear-caches
:match-func
(lambda (msg)
(when msg

View file

@ -1,7 +1,5 @@
;;; completion/helm/config.el -*- lexical-binding: t; -*-
;; Warning: since I don't use helm, this may be out of date.
(defvar +helm-global-prompt " "
"The helm text prompt prefix string is globally replaced with this string.")
@ -180,7 +178,7 @@
:ni "M-k" #'helm-previous-line
:ni "C-f" #'helm-next-page
:ni "C-b" #'helm-previous-page
:n "<tab>" #'helm-select-action ; TODO: Ivy has "ga".
:n [tab] #'helm-select-action ; TODO: Ivy has "ga".
:n "[" #'helm-previous-source
:n "]" #'helm-next-source
:n "gk" #'helm-previous-source

View file

@ -614,7 +614,7 @@
:desc "Find documentation" :n "K" #'+lookup/documentation
:desc "Find library" :n "l" #'find-library
:desc "Command log" :n "L" #'global-command-log-mode
:desc "Toggle Emacs log" :n "m" #'view-echo-area-messages
:desc "View *Messages*" :n "m" #'view-echo-area-messages
:desc "Describe mode" :n "M" #'describe-mode
:desc "Toggle profiler" :n "p" #'doom/toggle-profiler
:desc "Reload theme" :n "r" #'doom//reload-theme
@ -665,8 +665,7 @@
:n "t" #'floobits-follow-mode-toggle
:n "U" #'floobits-share-dir-public)
;; macos
(:when IS-MAC
(:when (featurep! :tools macos)
:desc "Reveal in Finder" :n "o" #'+macos/reveal-in-finder
:desc "Reveal project in Finder" :n "O" #'+macos/reveal-project-in-finder
:desc "Send to Transmit" :n "u" #'+macos/send-to-transmit

View file

@ -58,8 +58,8 @@ Uses `+workspaces-main' to determine the name of the main workspace."
(with-selected-frame frame
;; The default perspective persp-mode makes (defined by
;; `persp-nil-name') is special and doesn't actually represent a real
;; persp object, so buffers can't really be assigned to it, among other
;; quirks. We create a *real* main workspace to fill this role.
;; persp object, so buffers can't really be assigned to it, among
;; other quirks. We create a *real* main workspace to fill this role.
(unless (persp-get-by-name +workspaces-main)
(persp-add-new +workspaces-main))
;; Switch to it if we aren't auto-loading the last session

View file

@ -78,7 +78,9 @@
(setq org-attach-directory (expand-file-name +org-attach-dir org-directory))
;; A shorter link to attachments
(push (cons "attach" (abbreviate-file-name org-attach-directory)) org-link-abbrev-alist)
(push (cons "attach" (abbreviate-file-name org-attach-directory))
org-link-abbrev-alist)
(org-link-set-parameters
"attach"
:follow (lambda (link) (find-file (expand-file-name link org-attach-directory)))

View file

@ -151,13 +151,12 @@ the command buffer."
;; `helpful'
(after! helpful
;; Open link in origin window (non-popup) instead of inside the popup window.
(defun +popup*helpful--navigate (button)
(let ((path (substring-no-properties (button-get button 'path)))
origin)
(save-popups!
(find-file path)
;; We use `get-text-property' to work around an Emacs 25 bug:
;; http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f7c4bad17d83297ee9a1b57552b1944020f23aea
(-when-let (pos (get-text-property button 'position
(marker-buffer button)))
(goto-char pos))