aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-07-03 20:11:53 +1000
committerYuchen Pei <id@ypei.org>2023-07-03 20:11:53 +1000
commite1640aa343f3b7c050ad525b508cea2ee9a48ce4 (patch)
tree59c80d81ec3f9ace008b3993402e2261b274867f
parent5686d46326931ad67615086c7eaffb2013fae6d9 (diff)
minor changes
-rw-r--r--emacs/.emacs.d/init/ycp-complete.el5
-rw-r--r--emacs/.emacs.d/init/ycp-editing.el5
-rw-r--r--emacs/.emacs.d/init/ycp-prog.el5
-rw-r--r--emacs/.emacs.d/init/ycp-vc.el9
-rw-r--r--emacs/.emacs.d/lisp/my/my-editing.el12
5 files changed, 24 insertions, 12 deletions
diff --git a/emacs/.emacs.d/init/ycp-complete.el b/emacs/.emacs.d/init/ycp-complete.el
index fefe711..d803d95 100644
--- a/emacs/.emacs.d/init/ycp-complete.el
+++ b/emacs/.emacs.d/init/ycp-complete.el
@@ -183,6 +183,11 @@
(dolist (backend '( cape-symbol cape-keyword cape-file cape-history cape-dabbrev))
(add-to-list 'completion-at-point-functions backend)))
+(my-package imenu
+ (:delay 5)
+ (my-keybind global-map "M-s i" #'imenu)
+ )
+
;;; consult
(my-package consult
(:install t)
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el
index 351fe2e..87e42c0 100644
--- a/emacs/.emacs.d/init/ycp-editing.el
+++ b/emacs/.emacs.d/init/ycp-editing.el
@@ -77,6 +77,11 @@
(advice-add 'find-file-other-window :around 'my-find-file-line-number)
)
+(my-package new-comment
+ (add-to-list 'safe-local-variable-values
+ '((comment-style . extra-line)
+ (comment-continue . " "))))
+
(setq viper-mode nil)
(my-package viper
(:delay 60))
diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el
index c6a5610..3426665 100644
--- a/emacs/.emacs.d/init/ycp-prog.el
+++ b/emacs/.emacs.d/init/ycp-prog.el
@@ -416,11 +416,6 @@
(:delay 60)
(require 'flycheck-crystal))
-(my-package imenu
- (:delay 5)
- (my-keybind global-map "C-c i" #'imenu)
- )
-
;;; proof-general
(my-package proof-general
(:install t)
diff --git a/emacs/.emacs.d/init/ycp-vc.el b/emacs/.emacs.d/init/ycp-vc.el
index abd02d1..57de6f1 100644
--- a/emacs/.emacs.d/init/ycp-vc.el
+++ b/emacs/.emacs.d/init/ycp-vc.el
@@ -29,6 +29,12 @@
;;; vc, magit, diff
+(my-package vc
+ (:delay 5)
+ ;; A var from newer emacs, in .dir-locals of emacs source
+ (add-to-list 'safe-local-variable-values
+ '(vc-prepare-patches-separately)))
+
(my-package vc-hooks
(:delay 5)
;;; avoid the "file is symlink to git controlled repo, follow?"
@@ -43,7 +49,8 @@
;; The following are from Emacs 27.1
(setq diff-font-lock-prettify t)
(setq diff-font-lock-syntax 'hunk-also)
- (add-to-list 'safe-local-variable-values '(diff-add-log-use-relative-names . t)))
+ (add-to-list 'safe-local-variable-values
+ '(diff-add-log-use-relative-names . t)))
(my-package ediff
(:delay 30)
diff --git a/emacs/.emacs.d/lisp/my/my-editing.el b/emacs/.emacs.d/lisp/my/my-editing.el
index 975b9ae..1a3747e 100644
--- a/emacs/.emacs.d/lisp/my/my-editing.el
+++ b/emacs/.emacs.d/lisp/my/my-editing.el
@@ -330,11 +330,11 @@ Basically move the line up
(forward-char col)))
(defun my-kill-line (&optional arg)
- "Calls `my-kill-forward' or `kill-line' in case of prefix arg."
+ "Calls `kill-line', or `my-kill-forward' in case of prefix arg."
(interactive "P")
(if arg
- (kill-line)
- (my-kill-forward)))
+ (my-kill-forward)
+ (kill-line)))
(defun my-kill-forward ()
"Kill towards end of line, but not out of sexp."
@@ -355,11 +355,11 @@ Basically move the line up
(kill-region (point) end))))
(defun my-kill-line-backward (&optional arg)
- "Calls `my-kill-backward' or `kill-line' with 0 in case of prefix arg."
+ "Calls `kill-line' with 0, or `my-kill-backward' in case of prefix arg."
(interactive "P")
(if arg
- (kill-line 0)
- (my-kill-backward)))
+ (my-kill-backward)
+ (kill-line 0)))
(defun my-kill-backward ()
"Kill towards beginning of line, but not out of sexp."