From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: patch for completion in octave Date: Tue, 08 Feb 2011 15:39:36 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297197609 15502 80.91.229.12 (8 Feb 2011 20:40:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2011 20:40:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alexander Klimov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 08 21:40:03 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PmuLt-00074j-OX for ged-emacs-devel@m.gmane.org; Tue, 08 Feb 2011 21:39:57 +0100 Original-Received: from localhost ([127.0.0.1]:59389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmuLt-0007xN-7K for ged-emacs-devel@m.gmane.org; Tue, 08 Feb 2011 15:39:57 -0500 Original-Received: from [140.186.70.92] (port=42307 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmuLg-0007vb-KY for emacs-devel@gnu.org; Tue, 08 Feb 2011 15:39:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmuLe-00051F-FT for emacs-devel@gnu.org; Tue, 08 Feb 2011 15:39:43 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:33972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmuLe-000513-6S for emacs-devel@gnu.org; Tue, 08 Feb 2011 15:39:42 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p18KeDjK019125; Tue, 8 Feb 2011 15:40:13 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 4115DB4106; Tue, 8 Feb 2011 15:39:36 -0500 (EST) In-Reply-To: (Alexander Klimov's message of "Tue, 8 Feb 2011 14:49:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135770 Archived-At: > The current version of inferior-octave-complete includes in the string > for completion symbols like `=', e.g., after > M-x run-octave > x=lins > user gets an error > No completions of x=linsp > Since in octave > The name of a variable must be a sequence of letters, digits and > underscores, > the following patch corrects the problem: > === modified file 'lisp/progmodes/octave-inf.el' > --- lisp/progmodes/octave-inf.el 2011-01-26 08:36:39 +0000 > +++ lisp/progmodes/octave-inf.el 2011-02-08 12:45:02 +0000 > @@ -267,7 +267,7 @@ > (let* ((end (point)) > (command > (save-excursion > - (skip-syntax-backward "w_" (comint-line-beginning-position)) > + (skip-chars-backward "a-zA-Z0-9_" (comint-line-beginning-position)) > (buffer-substring-no-properties (point) end))) > (proc (get-buffer-process inferior-octave-buffer))) > (cond (inferior-octave-complete-impossible Thanks for your report. Before going ahead and installing your patch, I'd like to make sure I understand the problem: as far as I can tell, the character = has syntax "." in octave-mode, but for some reason octave-inf.el does not use octave-mode's syntax-table. So, could you try the patch below instead for a little while and see if it fixes your problem (it should) and if it doesn't introduce other issues? Stefan === modified file 'lisp/progmodes/octave-inf.el' --- lisp/progmodes/octave-inf.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/octave-inf.el 2011-02-08 20:38:06 +0000 @@ -73,10 +73,7 @@ "Keymap used in Inferior Octave mode.") (defvar inferior-octave-mode-syntax-table - (let ((table (make-syntax-table))) - (modify-syntax-entry ?\` "w" table) - (modify-syntax-entry ?\# "<" table) - (modify-syntax-entry ?\n ">" table) + (let ((table (make-syntax-table octave-mode-syntax-table))) table) "Syntax table in use in inferior-octave-mode buffers.")