From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Hepburn Newsgroups: gmane.emacs.bugs Subject: bug#12785: [octave-mod] Changed behaviour of octave-mark-block? Date: Wed, 5 Dec 2012 23:04:56 +1100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1354709168 3182 80.91.229.3 (5 Dec 2012 12:06:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2012 12:06:08 +0000 (UTC) Cc: 12785-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 13:06:21 2012 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 1TgDk3-0005lQ-ST for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2012 13:06:20 +0100 Original-Received: from localhost ([::1]:45053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgDjr-0000Yx-My for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Dec 2012 07:06:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgDjj-0000YP-MK for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2012 07:06:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgDjf-0001SN-7H for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2012 07:05:59 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgDjf-0001SF-21 for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2012 07:05:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TgDjl-0004Ex-MJ for bug-gnu-emacs@gnu.org; Wed, 05 Dec 2012 07:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark Hepburn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Dec 2012 12:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12785-done@debbugs.gnu.org id=D12785.135470911016233 (code D ref 12785); Wed, 05 Dec 2012 12:06:01 +0000 Original-Received: (at 12785-done) by debbugs.gnu.org; 5 Dec 2012 12:05:10 +0000 Original-Received: from localhost ([127.0.0.1]:54397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgDiu-0004Dj-HD for submit@debbugs.gnu.org; Wed, 05 Dec 2012 07:05:10 -0500 Original-Received: from mail-ia0-f172.google.com ([209.85.210.172]:45608) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgDis-0004Dc-1A for 12785-done@debbugs.gnu.org; Wed, 05 Dec 2012 07:05:07 -0500 Original-Received: by mail-ia0-f172.google.com with SMTP id z13so3997951iaz.3 for <12785-done@debbugs.gnu.org>; Wed, 05 Dec 2012 04:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k/+ktePB9bMGWZ2DhqP4NxqNHU25hOWFVn4ln60+J3M=; b=xS0ySEBSYrQY0D8E9h/7qGqSQGLwy1F0c6LgFg+YYtsKAX8IDO4R6K59Ccx1vp6RjG F/RuYlftlY+xSP0V5PSosaR6sq+T5ey14CFmiK4Jc6rncBYcsuuqysWcsITgnSrHXIKC 7zF9fXQ8YY5LkOTZ4eegl4CL3alTJKexHgRNT+INA7hk9pPIGmZiYXL6l0zTuYLiD3in cKFCXdBDcEutlYIyKwNHrV14RbZZSuBpbxXBmb+sZZHISmwa735MLqrLnojyBB3tOs3g GTAGo+BH8rbnrZULqgxDdCZxC2nEqKASMbWD76qyA1MD3Sed6yYgXsCOCzcbqYlLjTnI kkxw== Original-Received: by 10.50.197.169 with SMTP id iv9mr1591519igc.32.1354709097094; Wed, 05 Dec 2012 04:04:57 -0800 (PST) Original-Received: by 10.64.81.50 with HTTP; Wed, 5 Dec 2012 04:04:56 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:67967 Archived-At: Thanks. On 5 December 2012 16:30, Stefan Monnier wrote: >> Regarding the "end|" case, the old mode wouldn't mark the block, and I feel >> that's correct behaviour. In the "|for" case as I mentioned, the old mode >> _did_ mark the block (not the enclosing one), but I agree that marking the >> enclosing block is probably preferable and more consistent. > > Indeed, the code tried to reproduce this "mark the block after point > instead of the enclosing one" but had a bug in it. > I've fixed the "starting within a token" problem as well as the above > check (so the inner `for' will be marked if you're right in front of it). > > > Stefan > > > === modified file 'lisp/progmodes/octave-mod.el' > --- lisp/progmodes/octave-mod.el 2012-09-17 05:41:04 +0000 > +++ lisp/progmodes/octave-mod.el 2012-12-05 05:21:07 +0000 > @@ -794,11 +794,14 @@ > "Put point at the beginning of this Octave block, mark at the end. > The block marked is the one that contains point or follows point." > (interactive) > + (if (and (looking-at "\\sw\\|\\s_") > + (looking-back "\\sw\\|\\s_" (1- (point)))) > + (skip-syntax-forward "w_")) > (unless (or (looking-at "\\s(") > (save-excursion > (let* ((token (funcall smie-forward-token-function)) > (level (assoc token smie-grammar))) > - (and level (null (cadr level)))))) > + (and level (not (numberp (cadr level))))))) > (backward-up-list 1)) > (mark-sexp)) > > -- Where the hell is Mark: http://blog.everythingtastesbetterwithchilli.com/