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

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

bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs


From: Drew Adams
Subject: bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp
Date: Tue, 11 Oct 2016 14:15:39 -0700 (PDT)

1. Respect of the optional arg even for non-interactive use is an
   improvement, I think.

2. And it seems that no code distributed with Emacs calls `mark-defun'
   with the optional arg.  So no problem there.  And it is unlikely
   that 3rd-party code would call with the arg and expect it to be
   ignored (as was the case before).

3. With this at the top of *scratch* (note the blank line at top)
   and point between the comment and the defun, each of `M-- C-M-h'
   and `C-M-h' seems to loop indefinitely.

-------------8<----------------

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

(defun a ()
  nil)
-------------8<----------------

4. And with the same thing, but without the blank line at the top,
   both `M-- C-M-h' and `C-M-h' select the defun plus the comment,
   except that they do not select the first comment line.  Intended?

5. `M-- C-M-h' and `C-M-h' always seem to select blank lines before
   the defun.  Should they (what for)?

6. Interactively, I would rather see repeated use of `C-M-h', after an
   initial use of `C-M-h' with a negative prefix arg (e.g. `M-- C-M-h'),
   continue to select defuns backward.  IOW, not need to use `M--'
   explicitly for each `C-M-h'.

   You can just hold down `C-M-h', to select multiple defuns forward.
   I would like to be able to do the same thing, but backward, by
   using `M-- C-M-h C-M-h C-M-h C-M-h...' (just hold down the chord).

   If you do that, then a negative prefix arg should not mean backward;
   it should just mean change direction (backward if previous command
   was not `mark-defun').

7. Someone will really need to test this with more than just Emacs Lisp.
   The comments talk about Python and nesting, etc.

HTH.





reply via email to

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