Closed tumashu closed 9 years ago
(defun lentic-mode-insert-file-local (init-function) (interactive (list (completing-read "Lentic init function: " (mapcar 'symbol-name lentic-init-functions) 'identity 'confirm))) (save-excursion (goto-char (point-max)) (let ((start (point))) (insert (format ;; split this string or we get local variable not terminated properly ;; errors. (concat "\nLocal" " Variables:\nlentic-init: %s\nEnd:\n") init-function)) (comment-region start (point)))))
I think it is too hack, is it possible to use `add-file-local-variable' ?
Yes. I didn't know about `add-file-local-variable' when I wrote it.
I think it is too hack, is it possible to use `add-file-local-variable' ?