unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing
@ 2015-01-21 21:31 Erik Knowles
  2020-08-12 16:44 ` Stefan Kangas
  2021-05-28  1:19 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Erik Knowles @ 2015-01-21 21:31 UTC (permalink / raw)
  To: 19649


OPascal mode incorrectly parses strings where the last string character ends in a
backslash; e.g.

a:='This is a string\' ;

(Parsing fails to note the end of the string and the following chunk of buffer is all
assigned string constant face.)

The backslash is treated as an escape character, which it is not in Object Pascal. My
work around is to add the following to an opascal-mode-hook function:

  (modify-syntax-entry ?\\ ".")

The preferred fix would of course to be to make a similar change to the
opascal-mode-syntax-table initialization in opascal.el.

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-

In GNU Emacs 24.4.1 (i686-pc-cygwin)
 of 2014-11-14 on desktop-new
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --srcdir=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/src/emacs-24.4
 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
 --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc
 --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/emacs
 --htmldir=/usr/share/doc/emacs/html -C --with-w32 'CFLAGS=-ggdb -O2 -pipe
 -Wimplicit-function-declaration
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/build=/usr/src/debug/emacs-24.4-2
 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/src/emacs-24.4=/usr/src/debug/emacs-24.4-2'
 CPPFLAGS= LDFLAGS='

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

Major mode: Apropos

Minor modes in effect:
  helm-match-plugin-mode: t
  helm-occur-match-plugin-mode: t
  semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
  tempbuf-mode: t
  show-paren-mode: t
  global-highlight-changes-mode: t
  highlight-changes-visible-mode: t
  recentf-mode: t
  multi-web-global-mode: t
  xterm-mouse-mode: t
  global-auto-complete-mode: t
  shell-dirtrack-mode: t
  auto-image-file-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  ido-everywhere: t
  which-function-mode: t
  global-subword-mode: t
  subword-mode: t
  delete-selection-mode: t
  cua-mode: t
  desktop-save-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Load-path shadows:
/d/cygwin/home/Erik/.emacs.d/indent hides /usr/share/emacs/24.4/lisp/indent
/d/cygwin/home/Erik/.emacs.d/elpa/python-20120402/python hides /usr/share/emacs/24.4/lisp/progmodes/python

Features:
(shadow mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils apropos reporter helm-misc helm-command helm-elisp helm-eval helm-mode
helm-files ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info
helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse url-vars mailcap bookmark helm-locate helm-help
helm-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs helm-match-plugin helm-grep helm-regexp helm-plugin helm-external helm-utils
helm helm-source whitespace add-log find-func pp misearch multi-isearch help-mode debug
semantic/tag-write less-css-mode css-mode smie derived semantic/html sgml-mode
semantic/wisent/javascript-jv semantic/wisent/js-wy semantic/java semantic/doc js json
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs coffee-mode semantic/imenu semantic/sb semantic/sort semantic/tag-file
semantic/db-file data-debug cedet-files semantic/wisent/python semantic/decorate/include
semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse
semantic/dep semantic/wisent/python-wy semantic/wisent semantic/wisent/wisent nxml-uchnm
rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-glyph nxml-enc xmltok server cl-macs ibuf-ext ibuffer warnings flymake flyspell
ispell rainbow-delimiters thesaurus fill-column-indicator dos windmove paren hl-line+
hilit-chg auto-complete-config image-dired xterm-title xterm-frobs key-chord xterm-color
generic-x recentf-buffer recentf tree-widget wid-edit multi-web-mode tempbuf grep-a-lot
dirtrack init-terminal-fix cl tabbar xt-mouse auto-complete popup tramp tramp-compat
auth-source gnus-util time-date mm-util mail-prsvr password-cache tramp-loaddefs trampver
shell format-spec saveplace backup-dir backup-each-save bash-completion thumbs image-file
log4j-mode autorevert filenotify skeleton grep compile pascal-mode+ opascal pascal
speedbar sb-image dframe python rx semantic/db-mode semantic/db gv eieio-base
semantic/idle semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt
semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio
eieio-core mode-local cedet ido which-func superword subword org-install goto-last-change
imenu edmacro kmacro delsel cua-base sunrise-commander easy-mmode term ehelp sort hl-line
find-dired pcomplete comint ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg eldoc esh-groups eshell esh-module esh-util esh-mode enriched dired-x
dired-aux dired desktop frameset jka-compr auto-compile byte-opt packed cl-loaddefs cl-lib
bytecomp byte-compile cconv ac-octave-autoloads epc-autoloads ctable-autoloads
concurrent-autoloads fill-column-indicator-autoloads flymake-cursor-autoloads advice
help-fns flymake-python-pyflakes-autoloads grep-a-lot-autoloads helm-google-autoloads
google-autoloads log4j-mode-autoloads info easymenu multi-web-mode-autoloads
pager-autoloads python-autoloads python-environment-autoloads thesaurus-autoloads
tidy-autoloads package epg-config tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 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 make-network-process
dbusbind gfilenotify w32 multi-tty emacs)

Memory information:
((conses 8 931524 114890)
 (symbols 24 50772 0)
 (miscs 20 5332 2184)
 (strings 16 135878 19291)
 (string-bytes 1 3818602)
 (vectors 8 69944)
 (vector-slots 4 1287297 29642)
 (floats 8 1526 833)
 (intervals 28 62996 32)
 (buffers 512 96))






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

* bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing
  2015-01-21 21:31 bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing Erik Knowles
@ 2020-08-12 16:44 ` Stefan Kangas
  2021-05-28  1:19 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-08-12 16:44 UTC (permalink / raw)
  To: Erik Knowles; +Cc: 19649, Simon South

Hi Simon,

Could you please help take a look at the below bug report in opascal.el?

Thanks in advance,
Stefan Kangas

Erik Knowles <eknowles@geosystemsoftware.com> writes:

> OPascal mode incorrectly parses strings where the last string character ends in a
> backslash; e.g.
>
> a:='This is a string\' ;
>
> (Parsing fails to note the end of the string and the following chunk of buffer is all
> assigned string constant face.)
>
> The backslash is treated as an escape character, which it is not in Object Pascal. My
> work around is to add the following to an opascal-mode-hook function:
>
>   (modify-syntax-entry ?\\ ".")
>
> The preferred fix would of course to be to make a similar change to the
> opascal-mode-syntax-table initialization in opascal.el.
>
> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
>
> In GNU Emacs 24.4.1 (i686-pc-cygwin)
>  of 2014-11-14 on desktop-new
> Windowing system distributor `Microsoft Corp.', version 6.1.7601
> Configured using:
>  `configure --srcdir=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/src/emacs-24.4
>  --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
>  --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc
>  --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/emacs
>  --htmldir=/usr/share/doc/emacs/html -C --with-w32 'CFLAGS=-ggdb -O2 -pipe
>  -Wimplicit-function-declaration
>  -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/build=/usr/src/debug/emacs-24.4-2
>  -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.4-2.i686/src/emacs-24.4=/usr/src/debug/emacs-24.4-2'
>  CPPFLAGS= LDFLAGS='
>
> Important settings:
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Apropos
>
> Minor modes in effect:
>   helm-match-plugin-mode: t
>   helm-occur-match-plugin-mode: t
>   semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
>   tempbuf-mode: t
>   show-paren-mode: t
>   global-highlight-changes-mode: t
>   highlight-changes-visible-mode: t
>   recentf-mode: t
>   multi-web-global-mode: t
>   xterm-mouse-mode: t
>   global-auto-complete-mode: t
>   shell-dirtrack-mode: t
>   auto-image-file-mode: t
>   global-semanticdb-minor-mode: t
>   global-semantic-idle-scheduler-mode: t
>   semantic-mode: t
>   ido-everywhere: t
>   which-function-mode: t
>   global-subword-mode: t
>   subword-mode: t
>   delete-selection-mode: t
>   cua-mode: t
>   desktop-save-mode: t
>   auto-compile-on-load-mode: t
>   auto-compile-on-save-mode: t
>   tooltip-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   buffer-read-only: t
>   line-number-mode: t
>   transient-mark-mode: (only . t)
>
> Load-path shadows:
> /d/cygwin/home/Erik/.emacs.d/indent hides /usr/share/emacs/24.4/lisp/indent
> /d/cygwin/home/Erik/.emacs.d/elpa/python-20120402/python hides /usr/share/emacs/24.4/lisp/progmodes/python
>
> Features:
> (shadow mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
> mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
> mail-utils apropos reporter helm-misc helm-command helm-elisp helm-eval helm-mode
> helm-files ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info
> helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history
> url-cookie url-domsuf url-util url-parse url-vars mailcap bookmark helm-locate helm-help
> helm-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline
> outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
> ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar
> cal-loaddefs helm-match-plugin helm-grep helm-regexp helm-plugin helm-external helm-utils
> helm helm-source whitespace add-log find-func pp misearch multi-isearch help-mode debug
> semantic/tag-write less-css-mode css-mode smie derived semantic/html sgml-mode
> semantic/wisent/javascript-jv semantic/wisent/js-wy semantic/java semantic/doc js json
> thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
> cc-defs coffee-mode semantic/imenu semantic/sb semantic/sort semantic/tag-file
> semantic/db-file data-debug cedet-files semantic/wisent/python semantic/decorate/include
> semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse
> semantic/dep semantic/wisent/python-wy semantic/wisent semantic/wisent/wisent nxml-uchnm
> rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
> rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
> nxml-glyph nxml-enc xmltok server cl-macs ibuf-ext ibuffer warnings flymake flyspell
> ispell rainbow-delimiters thesaurus fill-column-indicator dos windmove paren hl-line+
> hilit-chg auto-complete-config image-dired xterm-title xterm-frobs key-chord xterm-color
> generic-x recentf-buffer recentf tree-widget wid-edit multi-web-mode tempbuf grep-a-lot
> dirtrack init-terminal-fix cl tabbar xt-mouse auto-complete popup tramp tramp-compat
> auth-source gnus-util time-date mm-util mail-prsvr password-cache tramp-loaddefs trampver
> shell format-spec saveplace backup-dir backup-each-save bash-completion thumbs image-file
> log4j-mode autorevert filenotify skeleton grep compile pascal-mode+ opascal pascal
> speedbar sb-image dframe python rx semantic/db-mode semantic/db gv eieio-base
> semantic/idle semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt
> semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio
> eieio-core mode-local cedet ido which-func superword subword org-install goto-last-change
> imenu edmacro kmacro delsel cua-base sunrise-commander easy-mmode term ehelp sort hl-line
> find-dired pcomplete comint ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext
> esh-proc esh-arg eldoc esh-groups eshell esh-module esh-util esh-mode enriched dired-x
> dired-aux dired desktop frameset jka-compr auto-compile byte-opt packed cl-loaddefs cl-lib
> bytecomp byte-compile cconv ac-octave-autoloads epc-autoloads ctable-autoloads
> concurrent-autoloads fill-column-indicator-autoloads flymake-cursor-autoloads advice
> help-fns flymake-python-pyflakes-autoloads grep-a-lot-autoloads helm-google-autoloads
> google-autoloads log4j-mode-autoloads info easymenu multi-web-mode-autoloads
> pager-autoloads python-autoloads python-environment-autoloads thesaurus-autoloads
> tidy-autoloads package epg-config tooltip electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset
> image regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 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 make-network-process
> dbusbind gfilenotify w32 multi-tty emacs)
>
> Memory information:
> ((conses 8 931524 114890)
>  (symbols 24 50772 0)
>  (miscs 20 5332 2184)
>  (strings 16 135878 19291)
>  (string-bytes 1 3818602)
>  (vectors 8 69944)
>  (vector-slots 4 1287297 29642)
>  (floats 8 1526 833)
>  (intervals 28 62996 32)
>  (buffers 512 96))





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

* bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing
  2015-01-21 21:31 bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing Erik Knowles
  2020-08-12 16:44 ` Stefan Kangas
@ 2021-05-28  1:19 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-28  1:19 UTC (permalink / raw)
  To: Erik Knowles; +Cc: 19649

Erik Knowles <eknowles@geosystemsoftware.com> writes:

> OPascal mode incorrectly parses strings where the last string character ends in a 
> backslash; e.g.
>
> a:='This is a string\' ;
>
> (Parsing fails to note the end of the string and the following chunk of buffer is all
> assigned string constant face.)

(I'm going through old bug reports that unfortunately got no response at
the time.)

This was apparently fixed in:

commit d2937aa050b6d860b63d880ab3880547e6255486
Author:     Maksim Golubev <maksim.golubev72@gmail.com>
AuthorDate: Tue Jan 5 19:17:55 2016 -0500


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-05-28  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 21:31 bug#19649: 24.4; OPascal Mode Incorrect Backslash String Parsing Erik Knowles
2020-08-12 16:44 ` Stefan Kangas
2021-05-28  1:19 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).