From unknown Sat Jun 21 12:14:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64056 <64056@debbugs.gnu.org> To: bug#64056 <64056@debbugs.gnu.org> Subject: Status: 28.2; CPerl mode: bad coloring when a comment block is used Reply-To: bug#64056 <64056@debbugs.gnu.org> Date: Sat, 21 Jun 2025 19:14:57 +0000 retitle 64056 28.2; CPerl mode: bad coloring when a comment block is used reassign 64056 emacs submitter 64056 Vincent Lefevre severity 64056 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 13 22:06:05 2023 Received: (at submit) by debbugs.gnu.org; 14 Jun 2023 02:06:06 +0000 Received: from localhost ([127.0.0.1]:43361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Ftd-0005QJ-6v for submit@debbugs.gnu.org; Tue, 13 Jun 2023 22:06:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:37634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Ftb-0005QB-JH for submit@debbugs.gnu.org; Tue, 13 Jun 2023 22:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9Ftb-000178-DP for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 22:06:03 -0400 Received: from joooj.vinc17.net ([2001:4b99:1:3:216:3eff:fe20:ac98]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9FtY-0005VQ-AQ for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2023 22:06:03 -0400 Received: from smtp-zira.vinc17.net (2a02-8428-1b1d-4d01-9274-9d43-0c1c-f0d1.rev.sfr.net [IPv6:2a02:8428:1b1d:4d01:9274:9d43:c1c:f0d1]) by joooj.vinc17.net (Postfix) with ESMTPSA id 36A7113E; Wed, 14 Jun 2023 04:05:48 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id A230228001C0; Wed, 14 Jun 2023 04:05:47 +0200 (CEST) From: Vincent Lefevre To: bug-gnu-emacs@gnu.org Subject: 28.2; CPerl mode: bad coloring when a comment block is used Date: Wed, 14 Jun 2023 04:05:47 +0200 Message-ID: <87jzw6ol1g.fsf@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2001:4b99:1:3:216:3eff:fe20:ac98; envelope-from=vincent@vinc17.net; helo=joooj.vinc17.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) When a comment block is used, i.e. =begin comment [code to comment] =end comment =cut as described in the perlfaq7 man page, after some edition, everything starting at the "=begin comment" line is in the comment color, even the code after the "=cut" line (which is no longer commented code). To reproduce the bug: 1. Create a file with ---------------------------------------- #!/usr/bin/env perl foo; =begin comment bar; =end comment =cut print "OK\n"; ---------------------------------------- 2. Open it with "emacs -Q". 3. M-x cperl-mode 4. Go to the beginning of line "foo;". 5. C-k 6. Go to the beginning of line "bar;". 7. C-y At step 7, the color of the line print "OK\n"; changes to the comment color. This occurs whether the Emacs X11 interface is used or not. And this bug is still reproducible with cperl-mode.el from the Git master branch. My Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037544 In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-05-14, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-mPr7Vr/emacs-28.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: POSIX value of $LC_CTYPE: C.UTF-8 value of $LC_TIME: en_DK.utf8 value of $LANG: POSIX locale-coding-system: utf-8-unix Major mode: CPerl Minor modes in effect: display-time-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-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: /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-11/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-11/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-11/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-12/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-12/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-12/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-13/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-13/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-13/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-14/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-14/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-14/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-15/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-15/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-15/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.5/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.5/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.5/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.6/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.6/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.6/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-3.7/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-3.7/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-3.7/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-7/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-7/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-7/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-8/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-8/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-8/tablegen-mode /usr/share/emacs/site-lisp/llvm-10/llvm-mode hides /usr/share/emacs/site-lisp/llvm-9/llvm-mode /usr/share/emacs/site-lisp/llvm-10/emacs hides /usr/share/emacs/site-lisp/llvm-9/emacs /usr/share/emacs/site-lisp/llvm-10/tablegen-mode hides /usr/share/emacs/site-lisp/llvm-9/tablegen-mode /usr/share/emacs/site-lisp/elpa/po-mode-0.21/po-mode hides /usr/share/emacs/site-lisp/elpa-src/po-mode-0.21/po-mode /usr/share/emacs/site-lisp/elpa/po-mode-0.21/po-mode-pkg hides /usr/share/emacs/site-lisp/elpa-src/po-mode-0.21/po-mode-pkg /usr/share/emacs/site-lisp/elpa/po-mode-0.21/po-mode-autoloads hides /usr/share/emacs/site-lisp/elpa-src/po-mode-0.21/po-mode-autoloads /usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/28.2/lisp/language/thai-word Features: (shadow sort mail-extr warnings emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cperl-mode rx facemenu cus-edit pp cus-start wid-edit time cus-load cc-styles cc-align cc-engine cc-vars cc-defs edmacro kmacro mmm-auto mmm-vars mmm-utils mmm-compat package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 135608 6639) (symbols 48 11538 0) (strings 32 34682 2270) (string-bytes 1 1172324) (vectors 16 16884) (vector-slots 8 353839 7492) (floats 8 46 11) (intervals 56 297 0) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 11:50:18 2023 Received: (at 64056) by debbugs.gnu.org; 15 Jun 2023 15:50:18 +0000 Received: from localhost ([127.0.0.1]:47569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9pEn-0000Fl-Pf for submit@debbugs.gnu.org; Thu, 15 Jun 2023 11:50:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9pEm-0000FY-9O for 64056@debbugs.gnu.org; Thu, 15 Jun 2023 11:50:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 34EF5240027 for <64056@debbugs.gnu.org>; Thu, 15 Jun 2023 17:50:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1686844210; bh=tUI8rP9KQWYMC+fIYB0B6k99kcpupmys29+GqLUf9ho=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=pZZofm0zZwXvFm49UKFv60QHXx1itfi4u4x0k/nf6q6u+/UC31dpFvXIAJRrQsyad EuqQJbRPIW7bE/ealWUM/Fpnapj2OeMc/hKFRTBJjpswa2DnQ1Zpmg2FZsEB3sOjN6 /3xuapk1hy0CBPa3bf/4EgX2CZcMkgNQoApS3sFA3QQU3DT5+JkMUYVWfTTW/a19Zc cFrv6QBxZ6LNfmoGdH+LncXIryQhuOu6HkstCw6I5qDRC3OKs9O4XjdkAtYWUK/lxE 4uCRnGXLxoI6XG37mzs2WDfQiGDSU3pvZOJwk+ydyETV+obGBy3vHuzWyyAn8tAkdR NChn6B1q/kX5w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qhmvj6gRsz6txQ for <64056@debbugs.gnu.org>; Thu, 15 Jun 2023 17:50:09 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: 64056@debbugs.gnu.org Subject: 28.2; CPerl mode: bad coloring when yanking into POD Date: Thu, 15 Jun 2023 15:50:09 +0000 Message-ID: <87sfaslo7i.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64056 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) A good recipe to reproduce, thanks! As far as I can say, comment blocks are innocent, it could break with all sorts of POD ... whenever you yank into the first column of a line. Anyway, it should be fixed in the master branch now. As a workaround, CPerl mode has the command cperl-find-pods-heres (from the Perl menu: Refresh "hard" constructions) to recover from such issues, but of course we'll fix them when concrete examples pop up. -- Cheers, haj From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 16:29:45 2023 Received: (at 64056-done) by debbugs.gnu.org; 1 Jul 2023 20:29:45 +0000 Received: from localhost ([127.0.0.1]:58764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFhE1-0004vS-EN for submit@debbugs.gnu.org; Sat, 01 Jul 2023 16:29:45 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFhDy-0004vB-LT for 64056-done@debbugs.gnu.org; Sat, 01 Jul 2023 16:29:43 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 10513240028 for <64056-done@debbugs.gnu.org>; Sat, 1 Jul 2023 22:29:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1688243377; bh=xWfdRxZClTv5xtQPFXGMl3xMKw+737IqyYr+zUL5BKQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=rqqB+1fTN8ZieKijNNtAuY0HxyPE9vA65Ifwk4TV3IYcNvLKYSByHiuQMzSXwNaqV uLjH4t9U19MA/SYj2Ro4X1NdHZXPvJSbReTOcEQ26kkJofRHjKxttQ8LtsgY9S+bli WVIVLW7+8DBky7L8MCgMs1XQ/zPX97CDTcIFCdyCZJS8oAktuYOmgVwNxzHwpMW454 r50RHrBeMwyA4WiqT9nr+iI2tjGQ6fNma6CMxfDkwjxAxBe21G+PKWzX7N5IdqYfax Y5K8oKcup2oJgiyZGcymHVU1834DbvbooJ/DanVhPluyC/CcAo8PfFOhzBe+JnaiCK S3HDpE3m1z76g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QtkLm4Ynyz9rxG for <64056-done@debbugs.gnu.org>; Sat, 1 Jul 2023 22:29:36 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: 64056-done@debbugs.gnu.org Subject: Yanking into POD sections is fixed in the Emacs repository. Date: Sat, 01 Jul 2023 20:29:36 +0000 Message-ID: <87cz1bnznz.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64056-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Fontification is no longer broken when text is yanked into a POD section. Several changes have been made to make CPerl mode work better with jit-lock mode (which initiates fontification while you type). cperl-mode.el as available in the repository can be used with Emacs 28 and 27 (and could be backported to Emacs 26 if there is interest). Therefore I'm closing the bug now. -- Cheers, haj From unknown Sat Jun 21 12:14:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Jul 2023 11:24:09 +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