about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-01-13 22:00:09 -0600
committerCase Duckworth2022-01-13 22:00:09 -0600
commit6ffc1e7e42cd51a9601a10182bb5bd5ead31a9fe (patch)
treef2061ecab1eb94c7dbf3e77dc708e7d3e8959a34 /lisp
parentAdd snippets/ (diff)
parentWhatever (diff)
downloademacs-6ffc1e7e42cd51a9601a10182bb5bd5ead31a9fe.tar.gz
emacs-6ffc1e7e42cd51a9601a10182bb5bd5ead31a9fe.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+tab-bar.el8
-rw-r--r--lisp/remember.el19
2 files changed, 24 insertions, 3 deletions
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 1dc1f68..1ee7606 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -21,6 +21,14 @@
21(defvar +tab-bar-show-original nil 21(defvar +tab-bar-show-original nil
22 "Original value of `tab-bar-show'.") 22 "Original value of `tab-bar-show'.")
23 23
24(defun +tab-bar-basename ()
25 "Generate the tab name from the basename of the buffer of the
26 selected window."
27 (let* ((tab-file-name (buffer-file-name (window-buffer (minibuffer-selected-window)))))
28 (if tab-file-name
29 (file-name-nondirectory tab-file-name)
30 (+tab-bar-tab-name-truncated-left))))
31
24(defun +tab-bar-tab-name-truncated-left () 32(defun +tab-bar-tab-name-truncated-left ()
25 "Generate the tab name from the buffer of the selected window. 33 "Generate the tab name from the buffer of the selected window.
26This is just like `tab-bar-tab-name-truncated', but truncates the 34This is just like `tab-bar-tab-name-truncated', but truncates the
diff --git a/lisp/remember.el b/lisp/remember.el index 39476d1..a759419 100644 --- a/lisp/remember.el +++ b/lisp/remember.el
@@ -1,4 +1,17 @@
1;; ABANDON ALL HOPE YE WHO ENTER HERE 1;;; remember.el --- Remember variables and modes -*- lexical-binding: t; -*-
2
3;;; Code:
4
5(defmacro remember-remember (alist)
6 (let* ((template (format "remember--%s-%%s" (gensym)))
7 (reset-fn (intern (format template "recall")))
8 (things (cl-loop for (sym . newval) in alist
9 as rem = (intern (format template sym))
10
11 ;; Collect original values
12
13 )))))
14
2 15
3(defmacro remember-set (&rest symbols) 16(defmacro remember-set (&rest symbols)
4 "Setup a closure remembering symbols to apply with 17 "Setup a closure remembering symbols to apply with
@@ -6,7 +19,7 @@
6SYMBOLS is a plist: the properties are symbols or mode names, and 19SYMBOLS is a plist: the properties are symbols or mode names, and
7their values what to set after `remember-setup'." 20their values what to set after `remember-setup'."
8 (let* ((template (format "remember--%s-%%s" (gensym))) 21 (let* ((template (format "remember--%s-%%s" (gensym)))
9 (reset-fn (intern (format template "reset" "fn"))) 22 (reset-fn (intern (format template "reset")))
10 (list (cl-loop for sym in symbols by #'cddr 23 (list (cl-loop for sym in symbols by #'cddr
11 collect `(,(intern (format template sym)) 24 collect `(,(intern (format template sym))
12 ,sym) 25 ,sym)
@@ -39,5 +52,5 @@ their values what to set after `remember-setup'."
39 52
40;; test 53;; test
41 54
42(setq fn (remember-set display-fill-column-indicator-mode disable)) 55(set 'fn (remember-set display-fill-column-indicator-mode disable))
43(funcall fn) 56(funcall fn)