From 8e6322c898fa057c367f534b632c37d2261c4600 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 26 Aug 2023 11:46:56 +1000 Subject: Fixing a few things --- emacs/.emacs.d/init/ycp-prog.el | 4 ++++ emacs/.emacs.d/lisp/my/my-dired.el | 2 +- emacs/.emacs.d/lisp/my/my-prog.el | 9 +++++++++ emacs/.emacs.d/lisp/my/my-utils.el | 8 ++++---- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el index 84ac0d2..d3373d9 100644 --- a/emacs/.emacs.d/init/ycp-prog.el +++ b/emacs/.emacs.d/init/ycp-prog.el @@ -234,6 +234,10 @@ "C-M-x" #'my-eval-defun-or-region) ) +;;; debugger +(my-package debugger + (my-override debugger-quit)) + (my-package inf-lisp (setq inferior-lisp-program "clisp")) diff --git a/emacs/.emacs.d/lisp/my/my-dired.el b/emacs/.emacs.d/lisp/my/my-dired.el index c64d9d2..c90b8c4 100644 --- a/emacs/.emacs.d/lisp/my/my-dired.el +++ b/emacs/.emacs.d/lisp/my/my-dired.el @@ -126,7 +126,7 @@ With a prefix-arg, delete without moving to trash." (if arg (let ((delete-by-moving-to-trash nil)) (funcall delete-fun)) - (delete-fun)) + (funcall delete-fun)) ) (defun my-dired-do-rename (rename-fun &optional arg) diff --git a/emacs/.emacs.d/lisp/my/my-prog.el b/emacs/.emacs.d/lisp/my/my-prog.el index 2bb4745..558117b 100644 --- a/emacs/.emacs.d/lisp/my/my-prog.el +++ b/emacs/.emacs.d/lisp/my/my-prog.el @@ -387,6 +387,15 @@ left and the source buffer on the right. (interactive) (insert (file-name-base (buffer-file-name)) "-")) +;; override `debugger-quit' - delete instead quit window +(defun my-debugger-quit () + "Quit debugging and return to the top level." + (interactive) + (if (= (recursion-depth) 0) + (delete-window) + (top-level))) + +;;; prog-mode (defun my-prog-modes-setup () (setq-local comment-auto-fill-only-comments t) (auto-fill-mode) diff --git a/emacs/.emacs.d/lisp/my/my-utils.el b/emacs/.emacs.d/lisp/my/my-utils.el index 1012de8..b10cd41 100644 --- a/emacs/.emacs.d/lisp/my/my-utils.el +++ b/emacs/.emacs.d/lisp/my/my-utils.el @@ -113,10 +113,10 @@ :from "^https://\\(www\\.\\)?youtube.com/\\(.*\\)$" :to "https://yewtu.be/%s" :parts (2)) - (:name reddit-to-teddit - :description "Reddit to Teddit" - :from "^https://\\(www\\.\\|old\\.\\)?reddit.com/\\(.*\\)$" - :to "https://teddit.net/%s" + (:name reddit-to-old + :description "Reddit to old Reddit" + :from "^https://\\(www\\.\\)?reddit.com/\\(.*\\)$" + :to "https://old.reddit.com/%s" :parts (2)) (:name twitter-to-nitter :description "Twitter to nitter." -- cgit v1.2.3