I have an issue outlined here that I was able to find a partial solution for. The problem involved changing perl-modes
syntax table. One of the commenters pointed me to the function syntax-propertize-function
. Within it, there is macro called syntax-propertize-rules
and I was able to add the following code snippet to it.
("\\('\\)[bh]" (1 "."))
this fixed the syntax problem I was having. However this is a change I made to the source perl-mode.el
. What I need is some way to add this rule to syntax-propertize-rules
from within my .emacs file. I have already tried
(defun my/perl-syntax-propertize-function ()
("\\('\\)[bh]" (1 ".")))
(add-hook 'perl-mode-hook
(lambda () (add-function :after (symbol-function 'syntax-propertize-rules) #'my/perl-syntax-propertize-function)))
But this does not work. What is the correct way to make this change?