* Re: #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards
@ 2016-05-12 14:32 Simon Friis Vindum
2016-05-12 16:44 ` Kaushal Modi
2016-05-12 17:06 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Simon Friis Vindum @ 2016-05-12 14:32 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
This small patch fixes the bug #17555. This increases the consistency
of `mark-paragraph` with `mark-word` and `mark-sexp`.
Currently "C-- M-h M-h" will end up selecting nothing since repeating
`mark-paragraph` always expands forwards even if `mark-paragraph` was
initially invoked with a negative prefix argument.
This is my first patch to Emacs. I have not signed the papers
assigning copyright to FSF. I would like to do so but I cannot figure
out how to.
Kind regards
Simon Friis Vindum
[-- Attachment #2: 0001-Mark-paragraph-will-extend-backwards-Bug-17555.patch --]
[-- Type: text/x-patch, Size: 1544 bytes --]
From 6f57c44850a330b7e3eacd91e2df28b71caffb36 Mon Sep 17 00:00:00 2001
From: paldepind <simonfv@gmail.com>
Date: Thu, 12 May 2016 16:08:09 +0200
Subject: [PATCH] Mark paragraph will extend backwards (Bug#17555)
---
lisp/textmodes/paragraphs.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index b7523ca..cc17941 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -382,22 +382,23 @@ at beginning of this or a previous paragraph.
Interactively (or if ALLOW-EXTEND is non-nil), if this command is
repeated or (in Transient Mark mode) if the mark is active,
it marks the next ARG paragraphs after the ones already marked."
- (interactive "p\np")
- (unless arg (setq arg 1))
- (when (zerop arg)
+ (interactive "P\np")
+ (when (and arg (zerop (prefix-numeric-value arg)))
(error "Cannot mark zero paragraphs"))
(cond ((and allow-extend
(or (and (eq last-command this-command) (mark t))
(and transient-mark-mode mark-active)))
+ (setq arg (if arg (prefix-numeric-value arg)
+ (if (< (mark) (point)) -1 1)))
(set-mark
(save-excursion
(goto-char (mark))
(forward-paragraph arg)
(point))))
(t
- (forward-paragraph arg)
+ (forward-paragraph (prefix-numeric-value arg))
(push-mark nil t t)
- (backward-paragraph arg))))
+ (backward-paragraph (prefix-numeric-value arg)))))
(defun kill-paragraph (arg)
"Kill forward to end of paragraph.
--
2.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards
2016-05-12 14:32 #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards Simon Friis Vindum
@ 2016-05-12 16:44 ` Kaushal Modi
2016-05-12 17:06 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2016-05-12 16:44 UTC (permalink / raw)
To: Simon Friis Vindum, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
On Thu, May 12, 2016 at 11:00 AM Simon Friis Vindum <simon@vindum.io> wrote:
> This is my first patch to Emacs. I have not signed the papers
> assigning copyright to FSF. I would like to do so but I cannot figure
> out how to.
>
I haven't got a chance to look at your patch. But can share my experience
about copyright assignment :)
Here are the steps I took and the process was smooth:
- Email FSF at assign@gnu.org requesting to initiate the copyright
assignment process.
- They will send you a 4 or 5 question questionnaire by email.
- You reply that via email.
- Then you get a format of disclosure that needs to be signed by your
school or employer.
- I did not face any problem there, the employer sent me the signed letter
in pdf form in 2 days.
- I was supposed to snail mail the physical signed copy to FSF but I didn't
have one and they were fine with the scanned signed letter pdf I emailed
them. I believe that is fine in US. But the person responding to you from
assign@gnu.org will guide you correctly.
- Done!
It took a couple of days, but it was all email transactions for me.
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1637 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards
2016-05-12 14:32 #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards Simon Friis Vindum
2016-05-12 16:44 ` Kaushal Modi
@ 2016-05-12 17:06 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2016-05-12 17:06 UTC (permalink / raw)
To: Simon Friis Vindum; +Cc: emacs-devel
> Date: Thu, 12 May 2016 16:32:02 +0200
> From: Simon Friis Vindum <simon@vindum.io>
>
> This is my first patch to Emacs. I have not signed the papers
> assigning copyright to FSF. I would like to do so but I cannot figure
> out how to.
Copyright assignment form sent off-list.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-12 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 14:32 #17555 24.4.50; 'mark-paragraph' does not allow extending the region backwards Simon Friis Vindum
2016-05-12 16:44 ` Kaushal Modi
2016-05-12 17:06 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).