Bläddra i källkod

Fix bug in `org-indent-line-function'.

* org.el (org-indent-line-function): Use `org-let' instead of
`orgstruct++-ignore-org-filling'.
(org-fill-paragraph, org-auto-fill-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): Delete.
Bastien Guerry 13 år sedan
förälder
incheckning
99c97fbffc
2 ändrade filer med 6 tillägg och 13 borttagningar
  1. 0 6
      lisp/org-macs.el
  2. 6 7
      lisp/org.el

+ 0 - 6
lisp/org-macs.el

@@ -410,12 +410,6 @@ the value in cdr."
     (cons (list (car flat) (cadr flat))
          (org-make-parameter-alist (cddr flat)))))
 
-(defmacro orgstruct++-ignore-org-filling (&rest body)
-  "Ignore org filling in `orgstruct++-mode'."
-  `(let ,org-fb-vars
-     ,@body))
-(def-edebug-spec orgstruct++-ignore-org-filling (body))
-
 (provide 'org-macs)
 
 ;;; org-macs.el ends here

+ 6 - 7
lisp/org.el

@@ -20422,7 +20422,6 @@ If point is in an inline task, mark that task instead."
 ;;; Paragraph filling stuff.
 ;; We want this to be just right, so use the full arsenal.
 
-(declare-function orgstruct++-ignore-org-filling "org-macs.el" (&rest body))
 (defun org-indent-line-function ()
   "Indent line depending on context."
   (interactive)
@@ -20534,8 +20533,8 @@ If point is in an inline task, mark that task instead."
 		       t t))
     (org-move-to-column column)
     (when (and orgstruct-is-++ (eq pos (point)))
-      (orgstruct++-ignore-org-filling
-       (indent-according-to-mode)))))
+      (org-let org-fb-vars
+	'(indent-according-to-mode)))))
 
 (defun org-indent-drawer ()
   "Indent the drawer at point."
@@ -20732,8 +20731,8 @@ the functionality can be provided as a fall-back.")
 	     (fill-paragraph justify) t))
 	  ;; Else falls back on `org-fill-paragraph-fallback-function'
 	  (orgstruct-is-++
-	   (orgstruct++-ignore-org-filling
-	    (fill-paragraph)))
+	   (org-let org-fb-vars
+	     '(fill-paragraph)))
 	  ;; (org-fill-paragraph-fallback-function
 	  ;;  (funcall org-fill-paragraph-fallback-function justify))
 	  ;; Else simply call `fill-paragraph'.
@@ -20781,8 +20780,8 @@ the functionality can be provided as a fall-back.")
 	       (flet ((fill-context-prefix (from to &optional flr) prefix))
 		 (do-auto-fill))))
 	    (orgstruct-is-++
-	     (orgstruct++-ignore-org-filling
-	      (do-auto-fill)))
+	     (org-let org-fb-vars
+	       '(do-auto-fill)))
 	    (t (do-auto-fill))))))
 
 ;;; Other stuff.