diff options
author | jao <jao@gnu.org> | 2022-10-03 02:28:02 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-10-03 02:33:52 +0100 |
commit | 649d6ff53accc4c07f3f771c7354b95c19511aa2 (patch) | |
tree | ad19073b2225095ccaf48cbb19a5de5ead240152 /attic/elisp | |
parent | 00f4ac1320d5f521e34b280a88eca6709cfff890 (diff) | |
download | elibs-649d6ff53accc4c07f3f771c7354b95c19511aa2.tar.gz elibs-649d6ff53accc4c07f3f771c7354b95c19511aa2.tar.bz2 |
attic
Diffstat (limited to 'attic/elisp')
-rw-r--r-- | attic/elisp/misc.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 12da196..8ae7ab8 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -687,3 +687,28 @@ (unless jao-modeline-in-minibuffer (add-hook 'jao-afio-switch-hook #'jao-afio--set-mode-line)) + +;; + +(defun jao-word-definition-lookup () + "Look up the word under cursor in a browser." + (interactive) + (require 'thingatpt) + (browse-url + (concat "http://www.wordnik.com/words/" + ;; "http://www.answers.com/main/ntquery?s=" + (thing-at-point 'word)))) + +;; + +(defun jao-notmuch-format-author (width msg) + (let* ((headers (plist-get msg :headers)) + (auth (notmuch-tree-clean-address (plist-get headers :From))) + (awidth (string-width auth)) + (auth (if (> awidth width) + (substring auth 0 width) + (concat auth (make-string (- width awidth) 32)))) + (face (if (plist-get msg :match) + 'notmuch-tree-match-author-face + 'notmuch-tree-no-match-author-face))) + (propertize auth 'face face))) |