对我来说,当前cl-flet的缩进看起来真的很丑。
例如参见:

(defun foo (lst)
  (cl-flet ((unusually-long-bar (x)
                                (1+ x)
                                (1+ x)
                                (1+ x)))
    (mapcar #'unusually-long-bar lst)))


我想将其设置为更明智的设置,例如:

(defun foo (lst)
  (cl-flet ((unusually-long-bar (x)
              (1+ x)
              (1+ x)
              (1+ x)))
    (mapcar #'unusually-long-bar lst)))


我怎样才能做到这一点?

最佳答案

以下应该工作:

(setq lisp-indent-function 'common-lisp-indent-function)
(eval-after-load "cl-indent"
  '(progn

    (put 'cl-flet 'common-lisp-indent-function
     (get 'flet 'common-lisp-indent-function))

    ))

关于emacs - Emacs正确的cl-flet缩进?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17764326/

10-13 02:57