키워드를 들여 쓰는 방법


17

아마도 Clojure의 영향을 받아 속성 목록을 데이터 구조로 사용하는 경우가 더 많습니다. 이맥스는 대부분 이런 식으로 들여 쓰기를합니다.

`(:token ,token
         :token-quality ,quality)  , 

이것이 내가 선호하는 것입니다 동안

`(:token ,token
  :token-quality ,quality) . 

누군가가 이미 이것을 해결했는지 궁금합니다.


3
목록 항목의 동작은 하드 코딩되므로 여기에 설명 된대로 함수를 교체해야합니다 .
wasamasa

아주 좋아 고마워. 그러나 변수가있는 경우 왜 재정의해야합니까?
politza

@wasamasa 나는 단순히 그 함수의 이름을 변경 .. 그 전환 있다고 생각 Fuco1/lisp-indent-function하고 할(add-hook 'emacs-lisp-mode-hook (lambda () (setq-local lisp-indent-function #'Fuco1/lisp-indent-function)))
Kaushal 모디

답변:


4

이는 lisp-indent-functionemacs-lisp 모드를 변경하여 달성 할 수 있습니다 .

(add-hook 'emacs-lisp-mode-hook
          (lambda () (setq-local lisp-indent-function #'common-lisp-indent-function)))

에서 lisp-mode.el이맥스 소스,

 (defcustom lisp-indent-function 'lisp-indent-function
  "A function to be called by `calculate-lisp-indent'.
It indents the arguments of a Lisp function call.  This function
should accept two arguments: the indent-point, and the
`parse-partial-sexp' state at that position.  One option for this
function is `common-lisp-indent-function'."
  :type 'function
  :group 'lisp)

대안

으로 @wasamasa이 질문에 코멘트에 언급, @ Fuco1 (에 github.com)했다 기본 수정lisp-indent-function (로 시작하는 키워드의 들여 쓰기 수정을 :).

Emacs는 lisp-indent-function사용자가 lisp 모드에서 들여 쓰기에 사용할 기능을 선택할 수 있는 변수 를 제공했습니다 .

원래 함수 정의를 재정의하는 대신 자체 함수를 만들고 위의 변수를 해당 함수 이름에 할당 할 수 있습니다.

이 예에서는

  • emacs 설정에서 와 같이 Fuco1 수정 기능 을 저장하십시오Fuco1/lisp-indent-function
  • 들여 쓰기에 해당 기능을 사용하십시오 emacs-lisp-mode.
(add-hook 'emacs-lisp-mode-hook
          (lambda () (setq-local lisp-indent-function #'Fuco1/lisp-indent-function)))

참고

github에 참조 된 소스가 손실되는 경우 수정 된 함수는 아래에 붙여 넣어집니다.

;; https://github.com/Fuco1/.emacs.d/blob/af82072196564fa57726bdbabf97f1d35c43b7f7/site-lisp/redef.el#L20-L94
(defun Fuco1/lisp-indent-function (indent-point state)
  "This function is the normal value of the variable `lisp-indent-function'.
The function `calculate-lisp-indent' calls this to determine
if the arguments of a Lisp function call should be indented specially.

INDENT-POINT is the position at which the line being indented begins.
Point is located at the point to indent under (for default indentation);
STATE is the `parse-partial-sexp' state for that position.

If the current line is in a call to a Lisp function that has a non-nil
property `lisp-indent-function' (or the deprecated `lisp-indent-hook'),
it specifies how to indent.  The property value can be:

* `defun', meaning indent `defun'-style
  \(this is also the case if there is no property and the function
  has a name that begins with \"def\", and three or more arguments);

* an integer N, meaning indent the first N arguments specially
  (like ordinary function arguments), and then indent any further
  arguments like a body;

* a function to call that returns the indentation (or nil).
  `lisp-indent-function' calls this function with the same two arguments
  that it itself received.

This function returns either the indentation to use, or nil if the
Lisp function does not specify a special indentation."
  (let ((normal-indent (current-column))
        (orig-point (point)))
    (goto-char (1+ (elt state 1)))
    (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
    (cond
     ;; car of form doesn't seem to be a symbol, or is a keyword
     ((and (elt state 2)
           (or (not (looking-at "\\sw\\|\\s_"))
               (looking-at ":")))
      (if (not (> (save-excursion (forward-line 1) (point))
                  calculate-lisp-indent-last-sexp))
          (progn (goto-char calculate-lisp-indent-last-sexp)
                 (beginning-of-line)
                 (parse-partial-sexp (point)
                                     calculate-lisp-indent-last-sexp 0 t)))
      ;; Indent under the list or under the first sexp on the same
      ;; line as calculate-lisp-indent-last-sexp.  Note that first
      ;; thing on that line has to be complete sexp since we are
      ;; inside the innermost containing sexp.
      (backward-prefix-chars)
      (current-column))
     ((and (save-excursion
             (goto-char indent-point)
             (skip-syntax-forward " ")
             (not (looking-at ":")))
           (save-excursion
             (goto-char orig-point)
             (looking-at ":")))
      (save-excursion
        (goto-char (+ 2 (elt state 1)))
        (current-column)))
     (t
      (let ((function (buffer-substring (point)
                                        (progn (forward-sexp 1) (point))))
            method)
        (setq method (or (function-get (intern-soft function)
                                       'lisp-indent-function)
                         (get (intern-soft function) 'lisp-indent-hook)))
        (cond ((or (eq method 'defun)
                   (and (null method)
                        (> (length function) 3)
                        (string-match "\\`def" function)))
               (lisp-indent-defform state indent-point))
              ((integerp method)
               (lisp-indent-specform method state
                                     indent-point normal-indent))
              (method
               (funcall method indent-point state))))))))

다른 언어에 대해 완전한 들여 쓰기 기능을 변경하는 것이 약간 극단적이지 않습니까? Guile 나는 # : keywords가 예상 한 방식으로 정렬되지 않은 동일한 문제가 있지만 Guile 들여 쓰기 기능을 Common Lisp에 대한 기능으로 대체하지는 않습니다.
rekado

1
@rekado 동의합니다. 그러나 이것은 특별한 경우 인 것 같습니다. 나는 (히드라 정의에서) 정렬되지 않은 키워드에 대해 동일한 자극에 직면하고 있으며 해결책을 찾기 위해 인터넷 검색을하고있었습니다. 나는 emacswiki 에서이 제안을 시도했으며 결국 약 한 달 동안 내 emacs 구성의 일부였습니다 . 에서 키워드를 정렬하는 깔끔한 구현을보고 싶습니다 lisp-indent-function.
Kaushal Modi

흥미 롭습니다. 이것은 (setq lisp-backquote-indentation nil)원래 질문에서와 같이 역 따옴표로 묶인 목록 에도 필요 합니다.
politza

@politza 죄송합니다. 마크 다운에서 텍스트를 코드 블록으로 형식화하는 구문으로 백 따옴표를 잘못 읽었습니다.
Kaushal Modi

2

들여 쓰기 들여 쓰기 계산 소개

더 나은 해결책은 함수를 재정의하는 것 calculate-lisp-indent입니다. 간단히 말해서, calculate-lisp-indent한 줄을 들여 쓸 열을 반환하는 함수입니다. 이 함수는 lisp-indent-function각 줄을 얼마나 들여 쓰기해야 하는지를 알려 줍니다. ( 자세한 내용 은 reddit에 대한 내 게시물 을 참조하십시오).

다른 답변과 비교

이 답변이 Fuco1의 수정 된 기능을 사용하는 것보다 이점은 (1) (2)에 calculate-lisp-indent의해 반환 된 잘못된 들여 쓰기 후에 정리하는 대신 문제의 근본을 수정한다는 calculate-lisp-indent것입니다. 그것들이 명시 적으로 인용되거나 역 인용되거나 또는 '`) 와 함께 인용되는지 여부에 관계없이 작동합니다 . 또한 임의로 중첩 된 따옴표 및 백 따옴표와 함께 작동합니다.

이 답변이 기능으로 대체 lisp-indent-function하는 common-lisp-indent-function것의 장점 은 다른 생략 들여 쓰기를 엉망으로 만드는 부작용이 없다는 것입니다. Elisp와 common-lisp는 다르게 들여 쓰기됩니다.

작동 원리

이 조건부 (in calculate-lisp-indent)는 sexp가 함수처럼 들여 쓰기되는지 여부를 결정하는 것입니다. else 절에 들어가는 것은 함수처럼 들여 쓰기됩니다. if 절에 속하는 것은 정상적으로 (현재 요소 아래) 들여 쓰기됩니다. 따옴표로 묶인 목록을 함수가 아닌 데이터로 들여 쓰기하려면 조건부 술어에서 목록이 인용되는 경우에 대해 더 많은 검사를 추가해야합니다.

(if (= (point) calculate-lisp-indent-last-sexp)
    ;; Containing sexp has nothing before this line
    ;; except the first element.  Indent under that element.
    nil
  ;; Skip the first element, find start of second (the first
  ;; argument of the function call) and indent under.
  (progn (forward-sexp 1)
         (parse-partial-sexp (point)
                             calculate-lisp-indent-last-sexp
                             0 t)))

이 코드는 들여 쓰고있는 sexp의 열린 괄호를 확인합니다. 여러 sexp에서 sexp이면 모두 확인합니다. 인용 또는 역 인용 된 sexps를 찾으면 t를 반환합니다.

(let* ((positions (elt state 9))
       (last (car (last positions)))
       (rest (nreverse (butlast positions)))
       (any-quoted-p nil)
       (point nil))
  (or
   (when-let (char last)
     (or (char-equal char ?')
         (char-equal char ?`)))
   (while (and rest (not any-quoted-p))
     (setq point (pop rest))
     (setq any-quoted-p
           (or
            (when-let (char point)
              (or (char-equal char ?')
                  (char-equal char ?`)))
            (save-excursion
              (goto-char (1+ point))
              (looking-at-p "\\(?:back\\)?quote[\t\n\f\s]+(")))))))

보너스

인용 부호가없는 경우에도 키워드로 시작하는 목록을 데이터로 들여 쓰려면 조건부 조건부에 다른 검사로 추가하십시오. 이것은 defhydra 와 같이 편의상 plists가 인용되지 않은 매크로에 유용 할 수 있습니다 .

(when-let (char-after (char-after (1+ containing-sexp)))
  (char-equal char-after ?:))

아래에 게시 한 전체 코드 스 니펫은 언급 한 사례와 더 잘 작동합니다. 사용해보십시오!


;; Your example
`(:token ,token
  :token-quality ,quality)

;; Other cool examples
(quote (hi im gosu
        the best vayne player))

'(i am the phantom of
  the opera)

'((angel of music
   hide no longer))

(backquote (past the point
            no return
            ... the final chapter))

`(fee fi fo
  fum)

;; should indent it like a function.
(iamafunction arg1
              arg2
              arg3)

이것이 어떻게 작동하는지에 대한 자세한 설명은 reddit에 대한 게시물을 참조하십시오 .

전체 코드 스 니펫

다음은 전체 코드 스 니펫입니다.

(advice-add #'calculate-lisp-indent :override #'void~calculate-lisp-indent)

(defun void~calculate-lisp-indent (&optional parse-start)
  "Add better indentation for quoted and backquoted lists."
  ;; This line because `calculate-lisp-indent-last-sexp` was defined with `defvar` 
  ;; with it's value ommited, marking it special and only defining it locally. So  
  ;; if you don't have this, you'll get a void variable error.
  (defvar calculate-lisp-indent-last-sexp)
  (save-excursion
    (beginning-of-line)
    (let ((indent-point (point))
          state
          ;; setting this to a number inhibits calling hook
          (desired-indent nil)
          (retry t)
          calculate-lisp-indent-last-sexp containing-sexp)
      (cond ((or (markerp parse-start) (integerp parse-start))
             (goto-char parse-start))
            ((null parse-start) (beginning-of-defun))
            (t (setq state parse-start)))
      (unless state
        ;; Find outermost containing sexp
        (while (< (point) indent-point)
          (setq state (parse-partial-sexp (point) indent-point 0))))
      ;; Find innermost containing sexp
      (while (and retry
                  state
                  (> (elt state 0) 0))
        (setq retry nil)
        (setq calculate-lisp-indent-last-sexp (elt state 2))
        (setq containing-sexp (elt state 1))
        ;; Position following last unclosed open.
        (goto-char (1+ containing-sexp))
        ;; Is there a complete sexp since then?
        (if (and calculate-lisp-indent-last-sexp
                 (> calculate-lisp-indent-last-sexp (point)))
            ;; Yes, but is there a containing sexp after that?
            (let ((peek (parse-partial-sexp calculate-lisp-indent-last-sexp
                                            indent-point 0)))
              (if (setq retry (car (cdr peek))) (setq state peek)))))
      (if retry
          nil
        ;; Innermost containing sexp found
        (goto-char (1+ containing-sexp))
        (if (not calculate-lisp-indent-last-sexp)
            ;; indent-point immediately follows open paren.
            ;; Don't call hook.
            (setq desired-indent (current-column))
          ;; Find the start of first element of containing sexp.
          (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
          (cond ((looking-at "\\s(")
                 ;; First element of containing sexp is a list.
                 ;; Indent under that list.
                 )
                ((> (save-excursion (forward-line 1) (point))
                    calculate-lisp-indent-last-sexp)
                 ;; This is the first line to start within the containing sexp.
                 ;; It's almost certainly a function call.
                 (if (or
                      ;; Containing sexp has nothing before this line
                      ;; except the first element. Indent under that element.
                      (= (point) calculate-lisp-indent-last-sexp)

                      ;; First sexp after `containing-sexp' is a keyword. This
                      ;; condition is more debatable. It's so that I can have
                      ;; unquoted plists in macros. It assumes that you won't
                      ;; make a function whose name is a keyword.
                      ;; (when-let (char-after (char-after (1+ containing-sexp)))
                      ;;   (char-equal char-after ?:))

                      ;; Check for quotes or backquotes around.
                      (let* ((positions (elt state 9))
                             (last (car (last positions)))
                             (rest (reverse (butlast positions)))
                             (any-quoted-p nil)
                             (point nil))
                        (or
                         (when-let (char (char-before last))
                           (or (char-equal char ?')
                               (char-equal char ?`)))
                         (progn
                           (while (and rest (not any-quoted-p))
                             (setq point (pop rest))
                             (setq any-quoted-p
                                   (or
                                    (when-let (char (char-before point))
                                      (or (char-equal char ?')
                                          (char-equal char ?`)))
                                    (save-excursion
                                      (goto-char (1+ point))
                                      (looking-at-p
                                       "\\(?:back\\)?quote[\t\n\f\s]+(")))))
                           any-quoted-p))))
                     ;; Containing sexp has nothing before this line
                     ;; except the first element.  Indent under that element.
                     nil
                   ;; Skip the first element, find start of second (the first
                   ;; argument of the function call) and indent under.
                   (progn (forward-sexp 1)
                          (parse-partial-sexp (point)
                                              calculate-lisp-indent-last-sexp
                                              0 t)))
                 (backward-prefix-chars))
                (t
                 ;; Indent beneath first sexp on same line as
                 ;; `calculate-lisp-indent-last-sexp'.  Again, it's
                 ;; almost certainly a function call.
                 (goto-char calculate-lisp-indent-last-sexp)
                 (beginning-of-line)
                 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp
                                     0 t)
                 (backward-prefix-chars)))))
      ;; Point is at the point to indent under unless we are inside a string.
      ;; Call indentation hook except when overridden by lisp-indent-offset
      ;; or if the desired indentation has already been computed.
      (let ((normal-indent (current-column)))
        (cond ((elt state 3)
               ;; Inside a string, don't change indentation.
               nil)
              ((and (integerp lisp-indent-offset) containing-sexp)
               ;; Indent by constant offset
               (goto-char containing-sexp)
               (+ (current-column) lisp-indent-offset))
              ;; in this case calculate-lisp-indent-last-sexp is not nil
              (calculate-lisp-indent-last-sexp
               (or
                ;; try to align the parameters of a known function
                (and lisp-indent-function
                     (not retry)
                     (funcall lisp-indent-function indent-point state))
                ;; If the function has no special alignment
                ;; or it does not apply to this argument,
                ;; try to align a constant-symbol under the last
                ;; preceding constant symbol, if there is such one of
                ;; the last 2 preceding symbols, in the previous
                ;; uncommented line.
                (and (save-excursion
                       (goto-char indent-point)
                       (skip-chars-forward " \t")
                       (looking-at ":"))
                     ;; The last sexp may not be at the indentation
                     ;; where it begins, so find that one, instead.
                     (save-excursion
                       (goto-char calculate-lisp-indent-last-sexp)
                       ;; Handle prefix characters and whitespace
                       ;; following an open paren.  (Bug#1012)
                       (backward-prefix-chars)
                       (while (not (or (looking-back "^[ \t]*\\|([ \t]+"
                                                     (line-beginning-position))
                                       (and containing-sexp
                                            (>= (1+ containing-sexp) (point)))))
                         (forward-sexp -1)
                         (backward-prefix-chars))
                       (setq calculate-lisp-indent-last-sexp (point)))
                     (> calculate-lisp-indent-last-sexp
                        (save-excursion
                          (goto-char (1+ containing-sexp))
                          (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
                          (point)))
                     (let ((parse-sexp-ignore-comments t)
                           indent)
                       (goto-char calculate-lisp-indent-last-sexp)
                       (or (and (looking-at ":")
                                (setq indent (current-column)))
                           (and (< (line-beginning-position)
                                   (prog2 (backward-sexp) (point)))
                                (looking-at ":")
                                (setq indent (current-column))))
                       indent))
                ;; another symbols or constants not preceded by a constant
                ;; as defined above.
                normal-indent))
              ;; in this case calculate-lisp-indent-last-sexp is nil
              (desired-indent)
              (t
               normal-indent))))))

최종 노트

emacs가 인용 및 인용되지 않은 목록을 함수로 들여 쓰는 것을 막는 방법 으로이 질문을 더 일반화 할 수 있다는 점은 주목할 가치가있다 .


감사합니다! 잘 작성되고 명확하며 도움이됩니다.
GaryO

1

kaushalmodi의 답변에 대한 해커를 대체하기 lisp-indent-function위해 scheme-indent-functionGuile Scheme에서 키워드 정렬을 수정하기 위해 Mark H. Weaver가 한 것과 비슷한 것을 덮어 쓸 수 있습니다.

방금 http://netris.org/~mhw/scheme-indent-function.el 에서 코드를 복사했습니다 . 유일한 변경 사항은 새 cond절 을 추가하는 것 입니다. lisp-indent-function이 기능을있는 그대로 사용 하는 대신 현재 코드를 사용할 수 있습니다 .

들여 쓰기 함수가 이와 같이 사소한 변경을 단순화하기 위해 더 많은 후크를 노출시키지 않는 것이 유감입니다.

(defun scheme-indent-function (indent-point state)
  "Scheme mode function for the value of the variable `lisp-indent-function'.
This behaves like the function `lisp-indent-function', except that:

i) it checks for a non-nil value of the property `scheme-indent-function'
\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'.

ii) if that property specifies a function, it is called with three
arguments (not two), the third argument being the default (i.e., current)
indentation."
  (let ((normal-indent (current-column)))
    (goto-char (1+ (elt state 1)))
    (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
    (if (and (elt state 2)
             (not (looking-at "\\sw\\|\\s_")))
        ;; car of form doesn't seem to be a symbol
        (progn
          (if (not (> (save-excursion (forward-line 1) (point))
                      calculate-lisp-indent-last-sexp))
              (progn (goto-char calculate-lisp-indent-last-sexp)
                     (beginning-of-line)
                     (parse-partial-sexp (point)
                     calculate-lisp-indent-last-sexp 0 t)))
          ;; Indent under the list or under the first sexp on the same
          ;; line as calculate-lisp-indent-last-sexp.  Note that first
          ;; thing on that line has to be complete sexp since we are
          ;; inside the innermost containing sexp.
          (backward-prefix-chars)
          (current-column))
      (let ((function (buffer-substring (point)
                    (progn (forward-sexp 1) (point))))
        method)
    (setq method (or (get (intern-soft function) 'scheme-indent-function)
             (get (intern-soft function) 'scheme-indent-hook)))
    (cond ((or (eq method 'defun)
           (and (null method)
            (> (length function) 3)
            (string-match "\\`def" function)))
           (lisp-indent-defform state indent-point))
              ;; This next cond clause is the only change -mhw
          ((and (null method)
                    (> (length function) 1)
                    ; The '#' in '#:' seems to get lost, not sure why
                    (string-match "\\`:" function))
               (let ((lisp-body-indent 1))
                 (lisp-indent-defform state indent-point)))
          ((integerp method)
           (lisp-indent-specform method state
                     indent-point normal-indent))
          (method
        (funcall method state indent-point normal-indent)))))))

덮어 쓰고 변수를 사용하지 않는 이유는 무엇 lisp-indent-function입니까? 또한 기능이없는 것 같습니다 emacs-lisp-indent-function.
politza

음, lisp-indent-function기본적으로 들여 쓰기 기능이 포함되어 있습니다. 이 변수에 할당하는 것은 emacs-lisp 모드의 기본 들여 쓰기 기능을 덮어 쓰는 것과 동일합니다. (당신은 옳습니다, 특별한 것은 없습니다 emacs-lisp-indent-function, 그냥 lisp-indent-function입니다.)
rekado

그러나 훨씬 덜 '해킹'입니다.
politza

1

lisp-indent-function내 패키지 el-patch를 사용하여 미래를 보장하는 방법으로 재정의 할 수 있습니다 .

(el-patch-defun lisp-indent-function (indent-point state)
  "This function is the normal value of the variable `lisp-indent-function'.
The function `calculate-lisp-indent' calls this to determine
if the arguments of a Lisp function call should be indented specially.
INDENT-POINT is the position at which the line being indented begins.
Point is located at the point to indent under (for default indentation);
STATE is the `parse-partial-sexp' state for that position.
If the current line is in a call to a Lisp function that has a non-nil
property `lisp-indent-function' (or the deprecated `lisp-indent-hook'),
it specifies how to indent.  The property value can be:
* `defun', meaning indent `defun'-style
  (this is also the case if there is no property and the function
  has a name that begins with \"def\", and three or more arguments);
* an integer N, meaning indent the first N arguments specially
  (like ordinary function arguments), and then indent any further
  arguments like a body;
* a function to call that returns the indentation (or nil).
  `lisp-indent-function' calls this function with the same two arguments
  that it itself received.
This function returns either the indentation to use, or nil if the
Lisp function does not specify a special indentation."
  (el-patch-let (($cond (and (elt state 2)
                             (el-patch-wrap 1 1
                               (or (not (looking-at "\\sw\\|\\s_"))
                                   (looking-at ":")))))
                 ($then (progn
                          (if (not (> (save-excursion (forward-line 1) (point))
                                      calculate-lisp-indent-last-sexp))
                              (progn (goto-char calculate-lisp-indent-last-sexp)
                                     (beginning-of-line)
                                     (parse-partial-sexp (point)
                                                         calculate-lisp-indent-last-sexp 0 t)))
                          ;; Indent under the list or under the first sexp on the same
                          ;; line as calculate-lisp-indent-last-sexp.  Note that first
                          ;; thing on that line has to be complete sexp since we are
                          ;; inside the innermost containing sexp.
                          (backward-prefix-chars)
                          (current-column)))
                 ($else (let ((function (buffer-substring (point)
                                                          (progn (forward-sexp 1) (point))))
                              method)
                          (setq method (or (function-get (intern-soft function)
                                                         'lisp-indent-function)
                                           (get (intern-soft function) 'lisp-indent-hook)))
                          (cond ((or (eq method 'defun)
                                     (and (null method)
                                          (> (length function) 3)
                                          (string-match "\\`def" function)))
                                 (lisp-indent-defform state indent-point))
                                ((integerp method)
                                 (lisp-indent-specform method state
                                                       indent-point normal-indent))
                                (method
                                 (funcall method indent-point state))))))
    (let ((normal-indent (current-column))
          (el-patch-add
            (orig-point (point))))
      (goto-char (1+ (elt state 1)))
      (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
      (el-patch-swap
        (if $cond
            ;; car of form doesn't seem to be a symbol
            $then
          $else)
        (cond
         ;; car of form doesn't seem to be a symbol, or is a keyword
         ($cond $then)
         ((and (save-excursion
                 (goto-char indent-point)
                 (skip-syntax-forward " ")
                 (not (looking-at ":")))
               (save-excursion
                 (goto-char orig-point)
                 (looking-at ":")))
          (save-excursion
            (goto-char (+ 2 (elt state 1)))
            (current-column)))
         (t $else))))))

이것은 나를 위해 문제를 해결합니다. 문맥에서 참조하십시오 .

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.