* bug#3437: Add patch to bug #3437
@ 2009-06-09 15:17 Teemu Likonen
0 siblings, 0 replies; only message in thread
From: Teemu Likonen @ 2009-06-09 15:17 UTC (permalink / raw
To: 3437
[-- Attachment #1: Type: text/plain, Size: 365 bytes --]
Here's a patch that does what I mean. It changes the original "if" form
to "cond" form and adds a condition branch for the case when the point
is at the end of logical line:
(cond ((eolp)
(goto-char (1+ (point))))
...)
The semantics of the original "if" form is reproduced in the place of
"..." above, that is, as other "cond" branches.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: simple.el.patch --]
[-- Type: text/x-diff, Size: 951 bytes --]
--- simple.el.orig 2009-06-09 17:42:26.000000000 +0300
+++ simple.el 2009-06-09 17:54:16.000000000 +0300
@@ -4488,15 +4488,18 @@
(signal 'end-of-buffer nil))
(setq end (save-excursion
(end-of-visual-line) (point)))
- (if (or (save-excursion
- ;; If trailing whitespace is visible,
- ;; don't treat it as nothing.
- (unless show-trailing-whitespace
- (skip-chars-forward " \t" end))
- (= (point) end))
- (and kill-whole-line (bolp)))
- (line-move 1)
- (goto-char end)))
+ (cond ((eolp)
+ (goto-char (1+ (point))))
+ ((or (save-excursion
+ ;; If trailing whitespace is visible,
+ ;; don't treat it as nothing.
+ (unless show-trailing-whitespace
+ (skip-chars-forward " \t" end))
+ (= (point) end))
+ (and kill-whole-line (bolp)))
+ (line-move 1))
+ (t
+ (goto-char end))))
(kill-region opoint (point))))
(defun next-logical-line (&optional arg try-vscroll)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-09 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-09 15:17 bug#3437: Add patch to bug #3437 Teemu Likonen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.