From: matz@... (Yukihiro Matsumoto) Date: 2002-01-25T08:10:34+09:00 Subject: Re: ruby-mode fontification and indent behavior Hi, In message "ruby-mode fontification and indent behavior" on 02/01/25, Bil Kleb writes: |So I updated ruby-mode via CVS (mine was a year old already!) |and it resolved a number of fontification problems, however |version 1.44 can't handle fontifying the following: | | runJob = %Q{rsh #{machine} "PATH=\\"$PATH\\";} + | %Q{cd #{Dir.getwd.sub(/.*\/home/,"/home")}; #{commandString}"} I'm afraid that it's nearly impossible for emacs to fontify general delimited strings correctly. |In addition, the auto indentation behavior seems slightly broken, |it tries to indent according to statement modifiers, e.g., It's a bug. Replace ruby-expr-beg as following (the difference in the last line): (defun ruby-expr-beg (&optional option) (save-excursion (store-match-data nil) (skip-chars-backward " \t") (cond ((bolp) t) ((looking-at "\\?") (or (bolp) (forward-char -1)) (not (looking-at "\\sw"))) (t (forward-char -1) (or (looking-at ruby-operator-re) (looking-at "[\\[({,;]") (and (not (eq option 'modifier)) (looking-at "[!?]")) (and (looking-at ruby-symbol-re) (skip-chars-backward ruby-symbol-chars) (cond ((or (looking-at ruby-block-beg-re) (looking-at ruby-block-op-re) (looking-at ruby-block-mid-re)) (goto-char (match-end 0)) (looking-at "\\>")) ((eq option 'expr-qstr) (looking-at "[a-zA-Z][a-zA-z0-9_]* +%[^ \t]")) ((eq option 'expr-re) (looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]")) (t nil)))))))) matz.