all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 19665@debbugs.gnu.org
Subject: bug#19665: 25.0.50; python.el: mark defun bug when point is in class statement
Date: Mon, 9 Feb 2015 13:46:03 -0300	[thread overview]
Message-ID: <CAELgYheZ0mU+LEzYUF45kJTPzm7uKz15yp7XQt3wEfV1h2t3ng@mail.gmail.com> (raw)
In-Reply-To: <CAELgYhdvG1mU8TuVVOsL8dqG6S0TKOZDUAZYd4_ydFO6_Wkn9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

Updated patch, see detailed discussion in

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19748



On Fri, Jan 23, 2015 at 1:13 PM, GNU bug Tracking System
<help-debbugs@gnu.org> wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-gnu-emacs@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 19665@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 19665: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19665
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems

[-- Attachment #2: mark-defun.patch --]
[-- Type: text/x-patch, Size: 1260 bytes --]

diff --git a/.emacs.d/lisp/python.el b/.emacs.d/lisp/python.el
index 30b62f5..0337a17 100644
--- a/.emacs.d/lisp/python.el
+++ b/.emacs.d/lisp/python.el
@@ -284,6 +284,7 @@
     (define-key map [remap backward-sentence] 'python-nav-backward-block)
     (define-key map [remap forward-sentence] 'python-nav-forward-block)
     (define-key map [remap backward-up-list] 'python-nav-backward-up-list)
+    (define-key map [remap mark-defun] 'python-mark-defun)
     (define-key map "\C-c\C-j" 'imenu)
     ;; Indent specific
     (define-key map "\177" 'python-indent-dedent-line-backspace)
@@ -1285,7 +1286,7 @@ With positive ARG search backwards, else search forwards."
                      0))))
          (found
           (progn
-            (when (and (< arg 0)
+            (when (and (> arg 0)
                        (python-info-looking-at-beginning-of-defun))
               (end-of-line 1))
             (while (and (funcall re-search-fn
@@ -4460,6 +4461,12 @@ default to utf-8."
 \f
 ;;; Utility functions
 
+(defun python-mark-defun ()
+  (interactive)
+  (when (python-info-looking-at-beginning-of-defun)
+    (end-of-line 1))
+  (mark-defun))
+
 (defun python-util-goto-line (line-number)
   "Move point to LINE-NUMBER."
   (goto-char (point-min))

  parent reply	other threads:[~2015-02-09 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 16:12 bug#19665: 25.0.50; python.el: mark defun bug when point is in class statement Carlos Pita
2015-01-23 21:17 ` bug#19665: Carlos Pita
2015-02-02 19:33 ` bug#19665: Carlos Pita
2015-02-09 16:46 ` Carlos Pita [this message]
2015-02-09 17:36 ` bug#19665: 25.0.50; python.el: mark defun bug when point is in class statement Carlos Pita
2015-02-11 15:52 ` Carlos Pita
2015-07-06  4:05 ` Fabián Ezequiel Gallina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAELgYheZ0mU+LEzYUF45kJTPzm7uKz15yp7XQt3wEfV1h2t3ng@mail.gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=19665@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.