all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help understanding ruby.el percent literal syntax
@ 2019-06-19  9:33 Philippe Vaucher
  2019-06-19 13:20 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Vaucher @ 2019-06-19  9:33 UTC (permalink / raw)
  To: Emacs developers

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

Hello,

We are trying to solve a bug in evil-surround at
https://github.com/emacs-evil/evil-surround/issues/154. The bug is that
percent literals refuse to be replaced when you try to replace a pair of
"{}" with "()" using evil-surround, because ruby.el modifies the percent
literal syntax table in a special way (when we use `fundamental-mode' then
things works as expected).

Thus we are trying to understand the purpose of
`ruby-syntax-propertize-percent-literal' function (
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/ruby-mode.el#L1971-L1999)
which is called from `ruby-syntax-propertize' (
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/ruby-mode.el#L1929
).

If I comment out the call to `ruby-syntax-propertize-percent-literal', then
the bug in evil-surround is gone, and everything just looks the same
visually (the percent literals are correctly highlighted). I don't
understand what purpose this function has. Maybe some other parts of
ruby.el rely on this syntax-table modification?

If someone can point to other parts in ruby.el that require this function
to be called, maybe we can then figure out what the "bug" is in that
function, and possibly offer a patch.

Kind regards,
Philippe

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

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

end of thread, other threads:[~2019-06-19 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19  9:33 Help understanding ruby.el percent literal syntax Philippe Vaucher
2019-06-19 13:20 ` Stefan Monnier
2019-06-19 15:51   ` Philippe Vaucher

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.