From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 22 11:45:40 2013 Received: (at submit) by debbugs.gnu.org; 22 Aug 2013 15:45:40 +0000 Received: from localhost ([127.0.0.1]:47920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCX4t-0002Hh-Lq for submit@debbugs.gnu.org; Thu, 22 Aug 2013 11:45:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52221) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCSoo-00030M-KS for submit@debbugs.gnu.org; Thu, 22 Aug 2013 07:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCSoi-0004Hs-Si for submit@debbugs.gnu.org; Thu, 22 Aug 2013 07:12:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCSoi-0004Ho-QZ for submit@debbugs.gnu.org; Thu, 22 Aug 2013 07:12:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCSoc-00017s-Lg for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 07:12:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCSoX-0004FH-MR for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 07:12:34 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:37649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCSoX-0004F4-Gr for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 07:12:29 -0400 Received: by mail-wg0-f41.google.com with SMTP id c11so526137wgh.4 for ; Thu, 22 Aug 2013 04:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=x2D9rkqnnYDxsUjWJPPx05E+oDKO1p7lLPC12389iTQ=; b=LV48vWl+yhsKvWqoVRu86TWA0lq0NYjp4vwbKh6cELm914bS5AKnhZeciJoo2J16mG c+QXQzFWDLTU4LZWFjvdOLlDKSRKgxJGMhcCCqvwS0+//2U5i8gCS37Fqo7JfgTnF9Q+ xv/Qzz81YnRhFM4MIA3SbXCfJsNFIUQtI4+fPbMf5SP4kpK+8DpUNBlYeM2CWSI+wJXl 4C841ZSUQhOYf4cbAkYZ2bVIRJorJ8xd97AC5z8iioG3VcBSzl7XapejiMSORi+F7E81 Xz2PRfeS15Gb95Ahi3AdahW2tLuMpfeGoU+uPp9NRYRFWD5WrxjiXYvuJpaVT5SZxTmi 4Kvg== X-Received: by 10.194.48.74 with SMTP id j10mr6436217wjn.41.1377169931763; Thu, 22 Aug 2013 04:12:11 -0700 (PDT) Received: from [192.168.1.10] (208.Red-88-1-87.dynamicIP.rima-tde.net. [88.1.87.208]) by mx.google.com with ESMTPSA id li9sm15930314wic.4.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 04:12:11 -0700 (PDT) Message-ID: <5215F209.7060205@gmail.com> Date: Thu, 22 Aug 2013 13:12:09 +0200 From: Alexis Roda User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.3; python mode highlight annoyance Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 22 Aug 2013 11:45:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) The symptom is that in the code: # no s'ha trobat cap oferta, l'alumne queda sense assignar # (alumne.assignacio == None) self._logger.info( u"no assigna '%s'", alumne.id ) alumne.assignacio = None 'alumne.assignacio' isn't properly colorized after visiting the file. In order to reproduce this behaviour: emacs -Q /tmp/bugtest.py type: # a == variable = "value" save, close and open the file again, the variable identifier isn't properly highlighted. Deleting the 'a' or a '=' in the comment produces the right colorization, but adding them back makes it wrong again. In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of 2013-08-17 on superjul Windowing system distributor `The X.Org Foundation', version 11.0.11300000 System Description: Ubuntu 12.04.2 LTS Configured using: `configure '--prefix=/opt/emacs/24.3'' Important settings: value of $LANG: ca_ES.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Python Minor modes in effect: tooltip-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 input: # SPC a = = s o v e _ m e _ v a r SPC = SPC 4 SPC o t h e r SPC v a r _ v a r SPC = SPC 4 SPC = # SPC f o o SPC C-a C-k C-k M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode python rx easymenu comint ring ansi-color time-date tooltip 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 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 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 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 22:42:43 2013 Received: (at 15161-done) by debbugs.gnu.org; 27 Aug 2013 02:42:44 +0000 Received: from localhost ([127.0.0.1]:57885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VE9Ex-00034h-HM for submit@debbugs.gnu.org; Mon, 26 Aug 2013 22:42:43 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40743) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VE9Ev-00034Z-8m for 15161-done@debbugs.gnu.org; Mon, 26 Aug 2013 22:42:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KK6/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLY0agRSCXAOkeoFegmopgUs X-IPAS-Result: Av8EABK/CFHO+KK6/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLY0agRSCXAOkeoFegmopgUs X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="24594983" Received: from 206-248-162-186.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Aug 2013 22:42:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 068EB66091; Mon, 26 Aug 2013 22:42:40 -0400 (EDT) From: Stefan Monnier To: Alexis Roda Subject: Re: bug#15161: 24.3; python mode highlight annoyance Message-ID: References: <5215F209.7060205@gmail.com> Date: Mon, 26 Aug 2013 22:42:39 -0400 In-Reply-To: <5215F209.7060205@gmail.com> (Alexis Roda's message of "Thu, 22 Aug 2013 13:12:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15161-done Cc: "=?windows-1252?Q?Fabi=E1n?= E. Gallina" , 15161-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > # a == > variable = "value" > save, close and open the file again, the variable identifier isn't > properly highlighted. Thanks. I installed the patch below which should fix it, Stefan === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-08-16 05:15:51 +0000 +++ lisp/progmodes/python.el 2013-08-27 02:37:53 +0000 @@ -501,29 +501,24 @@ (,(lambda (limit) (let ((re (python-rx (group (+ (any word ?. ?_))) (? ?\[ (+ (not (any ?\]))) ?\]) (* space) - assignment-operator))) - (when (re-search-forward re limit t) - (while (and (python-syntax-context 'paren) - (re-search-forward re limit t))) - (if (not (or (python-syntax-context 'paren) - (equal (char-after (point-marker)) ?=))) - t - (set-match-data nil))))) + assignment-operator)) + (res nil)) + (while (and (setq res (re-search-forward re limit t)) + (or (python-syntax-context 'paren) + (equal (char-after (point-marker)) ?=)))) + res)) (1 font-lock-variable-name-face nil nil)) ;; support for a, b, c = (1, 2, 3) (,(lambda (limit) (let ((re (python-rx (group (+ (any word ?. ?_))) (* space) (* ?, (* space) (+ (any word ?. ?_)) (* space)) ?, (* space) (+ (any word ?. ?_)) (* space) - assignment-operator))) - (when (and (re-search-forward re limit t) - (goto-char (nth 3 (match-data)))) - (while (and (python-syntax-context 'paren) - (re-search-forward re limit t)) - (goto-char (nth 3 (match-data)))) - (if (not (python-syntax-context 'paren)) - t - (set-match-data nil))))) + assignment-operator)) + (res nil)) + (while (and (setq res (re-search-forward re limit t)) + (goto-char (match-end 1)) + (python-syntax-context 'paren))) + res)) (1 font-lock-variable-name-face nil nil)))) (defconst python-syntax-propertize-function From unknown Sat Sep 20 02:11:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 24 Sep 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator