From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Doug Davis Newsgroups: gmane.emacs.bugs Subject: bug#45679: 28.0.50; python-mode variable font locking is inconsistent Date: Tue, 05 Jan 2021 15:07:15 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6214"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.10; emacs 28.0.50 To: 45679@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 05 22:08:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kwtYo-0001U3-OS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 22:08:11 +0100 Original-Received: from localhost ([::1]:39202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwtYn-0002bj-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jan 2021 16:08:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwtYg-0002bY-Jx for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 16:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwtYg-0004EJ-D4 for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 16:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwtYg-0006rS-6v for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 16:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Doug Davis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jan 2021 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45679 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160988084626306 (code B ref -1); Tue, 05 Jan 2021 21:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jan 2021 21:07:26 +0000 Original-Received: from localhost ([127.0.0.1]:42814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwtY5-0006qD-Jb for submit@debbugs.gnu.org; Tue, 05 Jan 2021 16:07:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwtY4-0006q4-63 for submit@debbugs.gnu.org; Tue, 05 Jan 2021 16:07:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwtY4-00026f-0l for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 16:07:24 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwtY1-0003zB-9J for bug-gnu-emacs@gnu.org; Tue, 05 Jan 2021 16:07:23 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 271AC5C00E6; Tue, 5 Jan 2021 16:07:19 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 05 Jan 2021 16:07:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h= from:to:subject:date:message-id:mime-version:content-type; s= fm3; bh=XUoxCuSFqUirNJ7kT5DKUrhncQYWBf7h5VVbx3xQO7Q=; b=nzaKgUfQ B0jvqbIKZunpk/ktU+LbxW/BUofo+qynHlcqAT50EJLGGK6DTFGA7FkYU0Pp0Qzm Vd/swSSKZ5UgDGH35lV1kRroXnP5QlCz1NBVgYq4Wb5fWYvs5FGrq4Sf5SVrp0xf UAU87fujFNI8WMPCLfuk9ArphsIstliP1YhtSAdqjYeU+KkjQxfKWu6hKO29o6+Y p8Ft057607U70cj88osfwk+dSljtIG7H6NknGvoPcNs4r6GLV/L20Gbjd9KvgQJt bAnNbza5Ipd94paxOHY8EDjWuxR0SA5uBsBrrRAgxZft360AObv4zhDQCu0IVlDM yEH9spSW5P3hUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=XUoxCuSFqUirNJ7kT5DKUrhncQYWB f7h5VVbx3xQO7Q=; b=devIk3UmQwDm4yCRd931rrOO/tj1d2h/82yEn5kk9Wcn8 XIo8c4IRaY3/dB4preIiYMFGru5eUw8+IosZFYmoB5dSOjtNOxVffMPhULZuGwSE YXc37AEImYa/wXzIei4iWvqBZR+ykohdDtCHMkWcjqCsnFlWxmZ4owc9SQEytgpS b1qnstwRL3WBwMAnpS3k6a7/iGkn+QB1C0ppwzwbBllFuLV4UXv0f+fELy2iAk5q TAagKP53wfMTUKz2GRJa5DXWEGrrD7K9JIwvNvQZU9/8DnV8Dbuh//9rOSptShAF 3QoVJHStX6FdF1es8Q14EEqKIDHLczeezsyyF5AOw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefjedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehttdertd dtredtnecuhfhrohhmpeffohhughcuffgrvhhishcuoeguuggrvhhishesuggurghvihhs rdhioheqnecuggftrfgrthhtvghrnhepgfefgfffffdvieffvefhgeekudegffeuuedvje evuefgveekfedvtedvleekieejnecuffhomhgrihhnpegvmhgrtghsrdgrphhpnecukfhp peejtddrudegtddrudeghedruddvieenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpeguuggrvhhishesuggurghvihhsrdhioh X-ME-Proxy: Original-Received: from localhost (70-140-145-126.lightspeed.hstntx.sbcglobal.net [70.140.145.126]) by mail.messagingengine.com (Postfix) with ESMTPA id 35F19108005B; Tue, 5 Jan 2021 16:07:18 -0500 (EST) Received-SPF: pass client-ip=66.111.4.27; envelope-from=ddavis@ddavis.io; helo=out3-smtp.messagingengine.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FILL_THIS_FORM_FRAUD_PHISH=0.334, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197399 Archived-At: In python-mode I'm seeing inconsistent variable font locking in class and function definitions. The first variable in a class keeps the default face while the remaining variables get the variable face. In functions it's a bit more inconsistent. If I modify the text around a bugged variable the face is corrected. Below is a small example which recreated the behavior. I see it with both my full configuration loaded and with emacs -Q. I can reproduce on both GNU/Linux and macOS. #+begin_src python @dataclass class Student: """Described a student. Attributes ---------- name : str Full name idnum : int Identification number """ name: str = "" ## <--- 'name' is not given the variable face (keeps default) idnum: int = 0 #+end_src In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 11.1 (Build 20C69)) of 2021-01-02 built on top.local Repository revision: f14869cd70e61b1908ec88a5e3d4bf21c7d538a0 Repository branch: master Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.1 Configured using: 'configure --with-ns --with-json --with-xml2 --with-gnutls --with-modules --with-rsvg 'CFLAGS=-mtune=native -march=native -O3'' Configured features: JPEG TIFF GIF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: flyspell-mode: t global-git-commit-mode: t eros-mode: t pdf-occur-global-minor-mode: t yas-global-mode: t yas-minor-mode: t which-key-mode: t async-bytecomp-package-mode: t projectile-mode: t marginalia-mode: t selectrum-prescient-mode: t selectrum-mode: t recentf-mode: t show-paren-mode: t shell-dirtrack-mode: t global-auto-revert-mode: t whitespace-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t override-global-mode: t straight-use-package-mode: t straight-package-neutering-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /Users/ddavis/.emacs.d/straight/build/jsonrpc/jsonrpc hides /Applications/Emacs.app/Contents/Resources/lisp/jsonrpc /Users/ddavis/.emacs.d/straight/build/xref/xref hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/xref /Users/ddavis/.emacs.d/straight/build/project/project hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/project /Users/ddavis/.emacs.d/straight/build/flymake/flymake hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/flymake /Users/ddavis/.emacs.d/straight/build/let-alist/let-alist hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist /Users/ddavis/.emacs.d/straight/build/eldoc/eldoc hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eldoc Features: (shadow sort mail-extr emacsbug blacken python tramp-sh flyspell ispell org-element avl-tree ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview ol-bibtex bibtex ol-bbdb ol-w3m gnus-topic nndraft nnmh utf-7 gnutls nnfolder nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader mu4e desktop frameset mu4e-org mu4e-main mu4e-view mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido rfc2368 smtpmail mu4e-mark mu4e-message flow-fill mu4e-proc mu4e-utils mu4e-lists hl-line mu4e-vars mu4e-meta magit-extras magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff magit-core magit-autorevert magit-margin magit-transient magit-process magit-mode git-commit magit-git magit-section magit-utils log-edit pcvs-util add-log with-editor vc-git diff-mode char-fold eros company-oddmuse company-keywords company-etags etags fileloop generator company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-cmake company-semantic company-template company-bbdb company-capf rainbow-delimiters init sendmail message rfc822 mml mml-sec gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader w3m doc-view timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon w3m-image tab-line w3m-proc w3m-util w3m-autoloads ox-hugo-autoloads pdf-occur tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc pdf-tools package url-handlers pdf-view jka-compr pdf-cache pdf-info tq pdf-util image-mode exif pdf-tools-autoloads tablist-autoloads lsp-latex lsp-latex-autoloads auctex-autoloads tex-site erc-hl-nicks-autoloads auth-source-pass circe-autoloads elfeed-autoloads gruvbox-theme gruvbox autothemer gruvbox-autoloads autothemer-autoloads helpful-autoloads elisp-refs-autoloads ace-window-autoloads avy-autoloads yaml-mode-autoloads iedit-autoloads yasnippet-snippets-autoloads yasnippet-snippets yasnippet yasnippet-autoloads which-key which-key-autoloads rainbow-delimiters-autoloads cider-autoloads sesman-autoloads queue-autoloads parseedn-autoloads parseclj-autoloads a-autoloads clojure-mode-autoloads blacken-autoloads pyvenv eshell pyvenv-autoloads modern-cpp-font-lock-autoloads clang-format-autoloads eldoc-box-autoloads eglot-autoloads project-autoloads xref-autoloads flymake-autoloads eldoc-autoloads jsonrpc-autoloads lsp-ui lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline face-remap lsp-ui-autoloads lsp-pyls lsp-mode lsp-protocol xref spinner network-stream puny nsm rmc markdown-mode color lv inline ht f s ewoc dash-functional bindat lsp-mode-autoloads lv-autoloads markdown-mode-autoloads spinner-autoloads ht-autoloads f-autoloads s-autoloads dash-functional-autoloads flycheck rx dash flycheck-autoloads let-alist-autoloads rg rg-info-hack rg-menu transient async-bytecomp async rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header cus-edit cus-start cus-load rg-autoloads wgrep-autoloads magit-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads dash-autoloads async-autoloads company pcase company-autoloads projectile grep ibuf-ext ibuffer ibuffer-loaddefs projectile-autoloads pkg-info-autoloads epl-autoloads consult-selectrum consult-selectrum-autoloads consult imenu compile bookmark text-property-search pp consult-autoloads marginalia marginalia-autoloads selectrum-prescient prescient selectrum-prescient-autoloads prescient-autoloads selectrum minibuf-eldef crm selectrum-autoloads visual-fill-column visual-fill-column-autoloads crux tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp thingatpt crux-autoloads all-the-icons-dired-autoloads all-the-icons-autoloads memoize-autoloads exec-path-from-shell exec-path-from-shell-autoloads finder-inf eros-autoloads recentf tree-widget wid-edit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sh-script smie executable browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mailcap paren dired dired-loaddefs vc vc-dispatcher epa-file epa derived epg epg-config auth-source eieio eieio-core eieio-loaddefs password-cache json map term disp-table shell ehelp esh-mode esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util autorevert filenotify whitespace project org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs display-line-numbers edmacro kmacro server straight-x cl-seq use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core use-package-autoloads bind-key-autoloads straight-autoloads info cl-extra help-mode easymenu seq byte-opt straight subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv early-init iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 623239 653268) (symbols 48 54792 837) (strings 32 192401 97666) (string-bytes 1 6740188) (vectors 16 90452) (vector-slots 8 1093967 823574) (floats 8 579 2234) (intervals 56 690 334) (buffers 984 18))