From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.bugs Subject: bug#21072: 24.5; inconsistent behaviour of `C-M-h (mark-defun)' in Emacs Lisp Date: Thu, 16 Jul 2015 08:12:12 +0200 Message-ID: <55A74B3C.8030608@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437027203 4372 80.91.229.3 (16 Jul 2015 06:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2015 06:13:23 +0000 (UTC) To: 21072@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 16 08:13:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFcPt-00046n-QJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jul 2015 08:13:10 +0200 Original-Received: from localhost ([::1]:38603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcPt-0001d8-06 for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jul 2015 02:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcPp-0001cs-LM for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFcPm-0004ui-BH for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:13:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcPm-0004ue-6M for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZFcPl-0005ha-VO for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Raffaele Ricciardi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jul 2015 06:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21072 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143702715121880 (code B ref -1); Thu, 16 Jul 2015 06:13:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jul 2015 06:12:31 +0000 Original-Received: from localhost ([127.0.0.1]:50563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFcPG-0005gp-KR for submit@debbugs.gnu.org; Thu, 16 Jul 2015 02:12:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54115) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFcPD-0005gb-Rh for submit@debbugs.gnu.org; Thu, 16 Jul 2015 02:12:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFcP7-0004hr-G4 for submit@debbugs.gnu.org; Thu, 16 Jul 2015 02:12:22 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcP7-0004hn-Dx for submit@debbugs.gnu.org; Thu, 16 Jul 2015 02:12:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcP6-0001ZP-1E for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:12:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFcP2-0004gx-Qx for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:12:19 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:33103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFcP2-0004gh-Gr for bug-gnu-emacs@gnu.org; Thu, 16 Jul 2015 02:12:16 -0400 Original-Received: by widic2 with SMTP id ic2so6176073wid.0 for ; Wed, 15 Jul 2015 23:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=tNoZ9bCXsezadA8lEJcTjLb0n/fVhsHtrMk/SXJND2U=; b=tL27AZDnkZ+3GthGAcDi7XeiDANooiciTcoWNq/cw2BN26K3o0SUFhSxGk24TC/wbN 8AsncriQ3v21FzcO7MR30P/swbyWDvi26LaHhmHGzhY1bTsrNh9y2BkfFaeNhU6LRkE3 HlnPwzfPJWsW1ZLJjtEkQ72uhwNopgMAVH9fHx8982vEk/Z+uH4Usrsj0QPUDlk+LYzQ JEDvuV6Kwo0XHR8CfubLk0V+IJWE1e3KcAqX3COXwA5JIEp9i65kKJo8Yt7eG9Gflc+y OMIhGp6riWmtt8kdmjlMsoph/rzmj4+h3iYPjwPYo4BGKZT94RFXjphor29eXEJZ/3RV n7NQ== X-Received: by 10.194.8.40 with SMTP id o8mr15696743wja.100.1437027134608; Wed, 15 Jul 2015 23:12:14 -0700 (PDT) Original-Received: from [192.168.1.129] (81.203.145.32.dyn.user.ono.com. [81.203.145.32]) by smtp.gmail.com with ESMTPSA id m4sm11204829wjb.37.2015.07.15.23.12.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jul 2015 23:12:13 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104984 Archived-At: Dear Emacs maintainers, the documentation for `mark-defun' says: The defun marked is the one that contains point or follows point. However, Emacs may mark the preceding defun instead, and it may mark an unrelated preceding comment along with the defun. Please follow this recipe: - emacs -Q - make sure that *scratch* contains the following code: ------------------------------------------------------------------------ ;; 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) (defun b () nil) ------------------------------------------------------------------------ - move point anywhere inside the second defun; - press `C-M-h' and Emacs will correctly mark the current defun; - press `C-g C-M-h' and Emacs will incorrectly mark the previous defun; - now move point anywhere inside the first definition; - press `C-M-h' and Emacs will correctly mark the current defun; - press `C-g C-M-h' and Emacs will incorrectly mark the defun along with the preceding comment; - now make sure that *scratch* contains the following code: ------------------------------------------------------------------------ ;; 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) ;; 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 b () nil) ------------------------------------------------------------------------ - move point anywhere inside the second comment and press `C-M-h': Emacs will correctly mark the following defun; - move point anywhere inside the first comment and press `C-M-h': Emacs will incorrectly mark the comment along with the defun. Thanks for your attention. Best Regards. -- In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5) of 2015-06-23 on debian Windowing system distributor `The X.Org Foundation', version 11.0.11604000 System Description: Debian GNU/Linux 8.1 (jessie) Configured using: `configure --prefix=/opt/emacs/emacs-24.5' Important settings: value of $LC_MONETARY: en_GB.utf8 value of $LC_NUMERIC: en_GB.utf8 value of $LC_TIME: en_GB.utf8 value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Quit Mark set [2 times] Quit Mark set [2 times] Quit Mark set [2 times] Quit Mark set [2 times] Quit Mark set [2 times] Quit Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 73007 6360) (symbols 48 17564 0) (miscs 40 53 254) (strings 32 9482 4902) (string-bytes 1 268085) (vectors 16 8916) (vector-slots 8 383708 18759) (floats 8 64 360) (intervals 56 334 13) (buffers 960 11) (heap 1024 48896 861))