all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#28962: inserting newline at start of line in HERE doc breaks syntax highlighting
@ 2017-10-23 23:13 Troy Hinckley
  2020-08-26 16:26 ` bug#28962: A workaround to this issue is available in cperl-mode Harald Jörg
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Troy Hinckley @ 2017-10-23 23:13 UTC (permalink / raw)
  To: 28962

[-- Attachment #1: Type: text/plain, Size: 5467 bytes --]

From: tjhinckl@sccj002243.i-did-not-set--mail-host-address--so-tickle-me
(troy.j.hinckley)
To: bug-gnu-emacs@gnu.org
Subject: 25.1; cperl syntax highlighting broken
--text follows this line--

When inside a cperl HERE doc, using any function that inserts a newline at
the start of a line will causes the rest of the file to highlighted with
font-lock-comment-face. The only way to fix this is to make changes to the
correctly highlighted part of the HERE doc which causes it to re-parse. My
guess is that cperl is getting mixed up with POD highlighting and trying to
apply cperl-pod-face since POD's and HERE documents are very closely
related in cperl-mode code.

To reproduce:
use the minimal cperl-mode file below
---------------------------------------------
my $here_doc = <<'_HERE_';
this is here doc line

_HERE_
---------------------------------------------
call `M-: (insert "\n")` when cursor is at the start of any line
inside the HERE doc.

You will see that the rest of the file is highlighted with the comment
face. Calling any function that finds the HERE doc region will be incorrect
(e.g. cperl-narrow-to-here-doc)



In GNU Emacs 25.1.1 (x86_64-suse-linux-gnu, GTK+ Version 2.18.6)
 of 2016-10-09 built on plxv1010
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: SUSE Linux Enterprise Server 11 (x86_64)

Configured using:
 'configure --prefix=/usr/intel/pkgs/emacs/25.1
 --prefix=/usr/intel/pkgs/emacs/25.1
 --libdir=/usr/intel/pkgs/emacs/25.1/lib64
 --x-includes=/usr/intel/pkgs/X11/R7.7/include
 --x-libraries=/usr/intel/pkgs/X11/R7.7/lib64 --with-x-toolkit=gtk2
 --without-sound --without-gif --build=x86_64-suse-linux
 --host=x86_64-suse-linux --target=x86_64-suse-linux CFLAGS= CPPFLAGS=
 'LDFLAGS=-O2 -fPIC -L/usr/intel/pkgs/emacs/25.1/lib64
 -L/usr/intel/pkgs/emacs/25.1/lib -Wl,--rpath
 -Wl,/usr/intel/pkgs/emacs/25.1/lib64:/usr/intel/pkgs/emacs/25.1/lib:/usr/intel/pkgs/emacs/25.1/lib64:/usr/intel/pkgs/emacs/25.1/lib:/usr/intel/pkgs/emacs/25.1/lib:/usr/intel/pkgs/emacs/25.1/lib64:/usr/intel/pkgs/gtk+/2.18.6-64/lib64:/usr/intel/pkgs/atk/1.28.0-64/lib64:/usr/intel/pkgs/pango/1.26.2-64/lib64:/usr/intel/pkgs/cairo/1.8.8-64/lib:/usr/intel/pkgs/poppler/0.12.1-64/lib:/usr/intel/pkgs/pixman/0.16.2-64/lib:/usr/intel/pkgs/X11/R7.5-64/lib:/usr/intel/pkgs/groff/1.20.1-64/:/usr/intel/pkgs/fontconfig/2.7.3-64/lib64:/usr/intel/pkgs/libexpat/2.0.1-64/lib:/usr/intel/pkgs/freetype/2.3.7-64/lib:/usr/intel/pkgs/zlib/1.2.x-64/lib64:/usr/intel/pkgs/libpng/1.2.40-64/lib:/usr/intel/pkgs/libxml2/2.7.6-64/lib64:/usr/intel/pkgs/lcms/1.19-64/lib64:/usr/intel/pkgs/tiff/3.9.1-64/lib64:/usr/intel/pkgs/zlib/1.2.x-64/lib64:/usr/intel/pkgs/jpeg/6b-64/lib:/usr/intel/pkgs/glib/2.22.3-64/lib64:/usr/intel/pkgs/libgettext/0.17-2-64/lib64:/usr/intel/pkgs/ncurses/5.6-64/lib64:/usr/intel/pkgs/libpng/1.2.40-64/lib:/usr/intel/pkgs/zlib/1.2.x-64/lib64:/usr/intel/pkgs/libiconv/1.13.1-64/lib:''

Configured features:
XPM JPEG TIFF PNG GPM NOTIFY ACL FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS
GTK2 X11

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: CPerl

Minor modes in effect:
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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 messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils cperl-mode
use-package diminish bind-key easy-mmode finder-inf advice edmacro
kmacro rx info package epg-config seq byte-opt gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 129555 5523)
 (symbols 48 24348 0)
 (miscs 40 142 120)
 (strings 32 30653 5834)
 (string-bytes 1 1166381)
 (vectors 16 17248)
 (vector-slots 8 524591 2239)
 (floats 8 198 61)
 (intervals 56 260 0)
 (buffers 976 17)
 (heap 1024 17165 1148))

[-- Attachment #2: Type: text/html, Size: 6692 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-31 12:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-23 23:13 bug#28962: inserting newline at start of line in HERE doc breaks syntax highlighting Troy Hinckley
2020-08-26 16:26 ` bug#28962: A workaround to this issue is available in cperl-mode Harald Jörg
2020-08-26 20:21   ` Stefan Kangas
2020-08-27  8:58     ` Harald Jörg
2020-08-27  9:36       ` Stefan Kangas
2021-08-23 10:50 ` bug#28962: (no subject) Harald Jörg
2021-08-31  7:04 ` bug#28962: cperl-mode: Inserting text into here-documents now works Harald Jörg
2021-08-31  9:12   ` Vincent Lefevre
2021-08-31 11:56     ` bug#14343: " Harald Jörg
2021-08-31 12:08       ` Vincent Lefevre

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.