diff options
| author | Mattias Andrée <m@maandree.se> | 2026-10-20 20:10:40 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-10-20 20:10:40 +0200 |
| commit | 102aece748c6854aac21ccdcc1c56c6b428e49a0 (patch) | |
| tree | cb55af0db6f41a907f1c328e3ece21b48fe60158 /emacs/init.el | |
| parent | Misc (diff) | |
| download | dotfiles-102aece748c6854aac21ccdcc1c56c6b428e49a0.tar.gz dotfiles-102aece748c6854aac21ccdcc1c56c6b428e49a0.tar.bz2 dotfiles-102aece748c6854aac21ccdcc1c56c6b428e49a0.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | emacs/init.el | 26 |
1 files changed, 21 insertions, 5 deletions
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-<up>") #'move-line-up) +(global-set-key (kbd "M-<down>") #'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)))) |
