diff options
| author | Yuchen Pei <id@ypei.org> | 2025-04-28 09:22:19 +1000 | 
|---|---|---|
| committer | Yuchen Pei <id@ypei.org> | 2025-04-28 09:22:19 +1000 | 
| commit | 17a89a2e1612f82fcfe2b2fd292f1973f885b3a0 (patch) | |
| tree | 1923ebaf10588e840d6ecc2be463434992ed32c1 | |
| parent | 32dd9dd3d3a0d00eaa71b1c6ecef2239f267564d (diff) | |
[emacs] Some small fixes with editing
| -rw-r--r-- | emacs/.emacs.d/init/ycp-editing.el | 5 | ||||
| -rw-r--r-- | emacs/.emacs.d/lisp/my/my-editing.el | 2 | 
2 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el index d497f42..031ae31 100644 --- a/emacs/.emacs.d/init/ycp-editing.el +++ b/emacs/.emacs.d/init/ycp-editing.el @@ -31,7 +31,10 @@  (setq-default truncate-lines nil)  (setq kill-do-not-save-duplicates t)  (setq kill-transform-function -      (lambda (s) (when (string-match-p "[^ \t\n]" s) s))) +      (lambda (s) (when (or +                         (derived-mode-p 'pdf-view-mode) +                         (string-match-p "[^ \t\n]" s)) +                    s)))  (setq bidi-inhibit-bpa t)  (setq save-interprogram-paste-before-kill t)  (setq kill-ring-max 200) diff --git a/emacs/.emacs.d/lisp/my/my-editing.el b/emacs/.emacs.d/lisp/my/my-editing.el index 13d80f8..e6499ff 100644 --- a/emacs/.emacs.d/lisp/my/my-editing.el +++ b/emacs/.emacs.d/lisp/my/my-editing.el @@ -528,7 +528,7 @@ With an prefix-arg, copy the file name relative to project root."    (interactive)    (let ((old-max (point-max))          (old-point (point))) -    (comment-kill (or n 1)) +    (when comment-start (comment-kill (or n 1)))      (when (= old-max (point-max))        (goto-char old-point)        (kill-sexp n))))  | 
