diff options
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-editing.el')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-editing.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-editing.el b/emacs/.emacs.d/lisp/my/my-editing.el index e6499ff..8ce68dd 100644 --- a/emacs/.emacs.d/lisp/my/my-editing.el +++ b/emacs/.emacs.d/lisp/my/my-editing.el @@ -189,7 +189,10 @@ by passing optional prefix ARG (\\[universal-argument])." (beginning-of-line) (newline) (forward-line -1) - (indent-according-to-mode)) + ;; `indent-according-to-mode' causes cursor to jump to the + ;; beginning of an org src block + (unless (and (derived-mode-p 'org-mode) (org-in-src-block-p)) + (indent-according-to-mode))) (forward-line -1) (my-new-line-below)))) @@ -547,7 +550,7 @@ With an prefix-arg, copy the file name relative to project root." (defun my-elide-region (b e) (interactive "r") (let ((message-elide-ellipsis - (if (> 1 (count-lines b (min (1+ e) (point-max)))) + (if (> (count-lines b (min (1+ e) (point-max))) 1) (concat comment-start " [... %l lines elided] ") |