bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45318: 28.0.50; mark-paragraph


From: H. Dieter Wilhelm
Subject: bug#45318: 28.0.50; mark-paragraph
Date: Sun, 03 Jan 2021 23:29:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>> Create a buffer in Fundamental mode, insert the text
>>
>> this is
>> a test
>>
>> with no newline at the end, put point at the end,  and type M-h.
>>
>> It does not set the mark.
>
> It's this bit:
>
>         ;; don't activate the mark when at eob
>         ((and (eobp) (> numeric-arg 0)))

I'm sorry for the mistake.  Here's the correction of M-h for above
bug report:

modified   lisp/textmodes/paragraphs.el
@@ -401,8 +401,9 @@ mark-paragraph
              (goto-char (mark))
              (forward-paragraph arg)
              (point))))
-         ;; don't activate the mark when at eob
-         ((and (eobp) (> numeric-arg 0)))
+         ;; don't activate the mark when at eob in an empty paragraph
+         ;; with a positive ARG
+         ((and (eobp) (bolp) (> numeric-arg 0)))
          (t
           (unless (save-excursion
                     (forward-line 0)

But I would like to extend this solution for the following case: (and
(eobp) (bolp)).  The current implementation of M-h is doing nothing (for
positive arguments) because - formally - the cursor sits in an "empty"
paragraph and there are no further paragraphs below.

But in this situation applying M-h clearly shows the user's intention to
mark the paragraph above the cursor (and possibly further ones above
when typing M-hhhh).

What is your opinion?

   Thank you


> commit eb090f65ceb0ae8a90829e911694348583135ba5
> Now added to the Cc's.

Thank you Lars

      Dieter

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany





reply via email to

[Prev in Thread] Current Thread [Next in Thread]