mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 16:24:18 +00:00
Disable this temporarily, not working atm.
This commit is contained in:
parent
8a58d84b5e
commit
baba0294bb
2 changed files with 27 additions and 14 deletions
|
|
@ -27,17 +27,19 @@
|
|||
(defvar capture-count 0)
|
||||
|
||||
(defun warn-active-capture-template ()
|
||||
(or (zerop capture-count)
|
||||
(progn (pop-to-buffer
|
||||
(get-buffer
|
||||
(car
|
||||
(remove-if-not (lambda (b)
|
||||
(let ((case-fold-search nil))
|
||||
(and b
|
||||
(buffer-name b)
|
||||
(string-match-p "CAPTURE-.*" (buffer-name b)))))
|
||||
(buffer-list)))))
|
||||
(yes-or-no-p "Active capture templates exist; exit anyway? "))))
|
||||
;; (or (zerop capture-count)
|
||||
;; (progn (pop-to-buffer
|
||||
;; (get-buffer
|
||||
;; (car
|
||||
;; (remove-if-not (lambda (b)
|
||||
;; (let ((case-fold-search nil))
|
||||
;; (and b
|
||||
;; (buffer-name b)
|
||||
;; (string-match-p "CAPTURE-.*" (buffer-name b)))))
|
||||
;; (buffer-list)))))
|
||||
;; (yes-or-no-p "Active capture templates exist; exit anyway? ")))
|
||||
t
|
||||
)
|
||||
|
||||
(add-hook 'kill-emacs-query-functions
|
||||
#'warn-active-capture-template)
|
||||
|
|
|
|||
|
|
@ -86,9 +86,20 @@
|
|||
|
||||
(tab-bar-rename-tab "scratch1")
|
||||
|
||||
(add-hook 'server-after-make-frame-hook
|
||||
#'(lambda ()
|
||||
(tab-bar-rename-tab "scratch1")))
|
||||
(defvar tab-switch-mode-map nil)
|
||||
|
||||
(unless tab-switch-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "s-1") #'(lambda () (interactive) (switch-or-create-tab "1")))
|
||||
(define-key map (kbd "q") #'(lambda () (interactive) (tab-switch-mode -1)))
|
||||
(setq tab-switch-mode-map map)))
|
||||
|
||||
(define-minor-mode tab-switch-mode ""
|
||||
nil nil tab-switch-mode-map :global t)
|
||||
|
||||
;; (add-hook 'after-make-frame-functions
|
||||
;; #'(lambda ()
|
||||
;; (tab-bar-rename-tab "scratch1")))
|
||||
|
||||
(provide 'switch-tabs)
|
||||
;;; switch-tabs.el ends here
|
||||
|
|
|
|||
Loading…
Reference in a new issue