From fcd47a9c3a10b6028045773ff5b197a080ac345c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 6 May 2022 10:23:02 -0500 Subject: meh --- lisp/+browse-url.el | 6 +++--- lisp/+consult.el | 2 +- lisp/+dired.el | 23 +++++++++++------------ lisp/+init.el | 9 ++++----- lisp/+jabber.el | 12 ++++++++++++ lisp/+key.el | 6 +++--- lisp/+org.el | 13 ------------- 7 files changed, 34 insertions(+), 37 deletions(-) (limited to 'lisp') diff --git a/lisp/+browse-url.el b/lisp/+browse-url.el index dbbfef2..fc479e4 100644 --- a/lisp/+browse-url.el +++ b/lisp/+browse-url.el @@ -120,9 +120,9 @@ ARGS are ignored here, but passed on for later processing." ;; along with the rest of the args, in a list to the original caller (probably ;; `browse-url'.) (apply 'list - (cl-loop with url = (substring-no-properties - (if (consp url) (car url) url)) - for (regex . transformation) in +browse-url-transformations + (cl-loop with url = (substring-no-properties + (if (consp url) (car url) url)) + for (regex . transformation) in +browse-url-transformations if (string-match regex url) return (replace-match transformation nil nil url) ;; else diff --git a/lisp/+consult.el b/lisp/+consult.el index dc06ad5..21c2565 100644 --- a/lisp/+consult.el +++ b/lisp/+consult.el @@ -5,7 +5,7 @@ (defun +consult-project-root () "Return either the current project, or the VC root, of current file." (if (and (functionp 'project-current) - (project-current)) + (project-current)) (car (project-roots (project-current))) (vc-root-dir))) diff --git a/lisp/+dired.el b/lisp/+dired.el index 9a2e01a..2e42c19 100644 --- a/lisp/+dired.el +++ b/lisp/+dired.el @@ -2,18 +2,17 @@ ;;; Code: -(require 'vertico) - -(defun +dired-goto-file (file) - "ADVICE for `dired-goto-file' to make RET call `vertico-exit'." - (interactive ; stolen from `dired-goto-file' - (prog1 - (list (dlet ((vertico-map (copy-keymap vertico-map))) - (define-key vertico-map (kbd "RET") #'vertico-exit) - (expand-file-name (read-file-name "Goto file: " - (dired-current-directory))))) - (push-mark))) - (dired-goto-file file)) +(with-eval-after-load 'vertico + (defun +dired-goto-file (file) + "ADVICE for `dired-goto-file' to make RET call `vertico-exit'." + (interactive ; stolen from `dired-goto-file' + (prog1 + (list (dlet ((vertico-map (copy-keymap vertico-map))) + (define-key vertico-map (kbd "RET") #'vertico-exit) + (expand-file-name (read-file-name "Goto file: " + (dired-current-directory))))) + (push-mark))) + (dired-goto-file file))) ;;; [[https://www.reddit.com/r/emacs/comments/u2lf9t/weekly_tips_tricks_c_thread/i4n9aoa/?context=3][Dim files in .gitignore]] diff --git a/lisp/+init.el b/lisp/+init.el index 8f999f9..a3f680b 100644 --- a/lisp/+init.el +++ b/lisp/+init.el @@ -72,11 +72,10 @@ are sorted lexigraphically." ;; otherwise, sort lexigraphically (t (string< s1 s2))))))))) ;; Return to original point relative to the defun we were in - (goto-char (point-min)) - (re-search-forward current-defun-re) - (beginning-of-defun) - (goto-char (+ (point) defun-point)) - )) + (ignore-errors (goto-char (point-min)) + (re-search-forward current-defun-re) + (beginning-of-defun) + (goto-char (+ (point) defun-point))))) (defun +init-sort-then-save () "Sort init.el, then save it." diff --git a/lisp/+jabber.el b/lisp/+jabber.el index c5d568c..e018b0c 100644 --- a/lisp/+jabber.el +++ b/lisp/+jabber.el @@ -10,6 +10,18 @@ (require 'jabber) (require 'tracking) +(defgroup +jabber nil + "Extra jabber.el customizations." + :group 'jabber) + +(defcustom +jabber-ws-prefix 0 + "Width to pad left side of chats." + :type 'string) + +(defcustom +jabber-pre-prompt " \n" + "String to put before the prompt." + :type 'string) + (defvar +jabber-tracking-show-p #'jabber-activity-show-p-default "Function that checks if the given JID should be shown in the mode line. This does the same as `jabber-activity-show-p', but for the diff --git a/lisp/+key.el b/lisp/+key.el index ad3b215..a217dad 100644 --- a/lisp/+key.el +++ b/lisp/+key.el @@ -19,9 +19,9 @@ ;; I need to define this map before the proper mode map. (defvar +key-leader-map (let ((map (make-sparse-keymap)) - (c-z (global-key-binding "\C-z"))) - (define-key map "\C-z" c-z) - map) + (c-z (global-key-binding "\C-z"))) + ;;(define-key map "\C-z" c-z) + map) "A leader keymap under the \"C-z\" bind.") ;; http://xahlee.info/emacs/emacs/emacs_menu_app_keys.html and diff --git a/lisp/+org.el b/lisp/+org.el index 252ee55..6075b60 100644 --- a/lisp/+org.el +++ b/lisp/+org.el @@ -588,19 +588,6 @@ and POST-PROCESS are passed to `org-export-to-file'." ("—" "---")))) (replace-match replace nil nil))))) -;;; Toggle org-hide-emphasis-markers - -(define-minor-mode +org-show-mode - "Show emphasis markers and full links in `org-mode'." - :lighter "/*/" - (setq org-hide-emphasis-markers (not +org-show-mode) - org-link-descriptive (not +org-show-mode)) - (funcall (if +org-show-mode - #'remove-from-invisibility-spec - #'add-to-invisibility-spec) - '(org-link)) - (font-lock-update)) - ;;; go forward and backward in the tree, ~ cleanly ~ ;; https://stackoverflow.com/a/25201697/10756297 -- cgit 1.4.1-21-gabe81