浏览代码

org-macs: Move org-current-text-indentation to silence byte-compiler

Move org-current-text-indentation upstream of first use to avoid 'make
single' (and the Emacs repo) reporting

  org-macs.el:1106:11: Warning: macro ‘org-current-text-indentation’ defined too
      late
Kyle Meyer 2 年之前
父节点
当前提交
631d4eb6af
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      lisp/org-macs.el

+ 5 - 5
lisp/org-macs.el

@@ -386,6 +386,11 @@ it for output."
 
 ;;; Indentation
 
+(defmacro org-current-text-indentation ()
+  "Like `current-indentation', but ignore display/invisible properties."
+  `(let ((buffer-invisibility-spec nil))
+     (current-indentation)))
+
 (defun org-do-remove-indentation (&optional n skip-fl)
   "Remove the maximum common indentation from the buffer.
 When optional argument N is a positive integer, remove exactly
@@ -1101,11 +1106,6 @@ Return width in pixels when PIXELS is non-nil."
   `(string-width (buffer-substring-no-properties
                   (line-beginning-position) (point))))
 
-(defmacro org-current-text-indentation ()
-  "Like `current-indentation', but ignore display/invisible properties."
-  `(let ((buffer-invisibility-spec nil))
-     (current-indentation)))
-
 (defun org-not-nil (v)
   "If V not nil, and also not the string \"nil\", then return V.
 Otherwise return nil."