From 102aece748c6854aac21ccdcc1c56c6b428e49a0 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 20 Oct 2026 20:10:40 +0200 Subject: misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- emacs/init.el | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index ebaf0d7..994f76b 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -66,11 +66,20 @@ (setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist)) ; OpenCL source files - -;; Load configurations from installed for other packages -((lambda () - (dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$")) - (load-file file)))) +;; M-up and M-down to transpose line +(defun move-line-up () + "Move the current line up one line." + (interactive) + (transpose-lines 1) + (forward-line -2)) +(defun move-line-down () + "Move the current line down one line." + (interactive) + (forward-line 1) + (transpose-lines 1) + (forward-line -1)) +(global-set-key (kbd "M-") #'move-line-up) +(global-set-key (kbd "M-") #'move-line-down) ;; Disable Emacs overriding the terminal's background @@ -78,6 +87,13 @@ (set-face-attribute 'default nil :background "unspecified-bg") (set-face-attribute 'default nil :foreground "unspecified-fg")) + ;; Disable Emacs take control over the terminal's mouse features ;; (This is important for copy and paste between Emacs and other applications) (unless (display-graphic-p) (xterm-mouse-mode -1)) + + +;; Load configurations from installed for other packages +((lambda () + (dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$")) + (load-file file)))) -- cgit v1.3.1