Emacsは、それは完全なパーサではありません考慮本当によく構文を理解し、素晴らしい施設を提供しています。
は、あなたの初期化ファイルでこれを試してみてください。もちろん
(defun my-cperl-indent-command()
"indent as cperl normally
indent relatively inside multi-line strings.
"
(interactive)
(let ((state (syntax-ppss)))
(if (and (nth 3 state) ;string
(and (nth 8 state) ;multi-line?
(< (nth 8 state) (point-at-bol))))
(indent-relative)
(cperl-indent-command))))
(eval-after-load "cperl-mode" '(define-key cperl-mode-map [remap cperl-indent-command] 'my-cperl-indent-command))
あなたはまだそれが正確に何をしたい行うために取得するindent-relative
を微調整する必要があります。 tab-to-tab-stop
おかげで多くを参照してください。出来た。 – user4035