Browse Source

Merge branch 'maint'

Conflicts:
	lisp/ob-core.el
	lisp/org.el
	lisp/ox.el
Achim Gratz 10 năm trước cách đây
mục cha
commit
5bf928bae7
8 tập tin đã thay đổi với 37 bổ sung26 xóa
  1. 2 0
      lisp/ob-C.el
  2. 2 1
      lisp/ob-core.el
  3. 1 0
      lisp/ob-exp.el
  4. 0 1
      lisp/ob-haskell.el
  5. 0 2
      lisp/ob-python.el
  6. 3 3
      lisp/org-entities.el
  7. 20 13
      lisp/org.el
  8. 9 6
      lisp/ox.el

+ 2 - 0
lisp/ob-C.el

@@ -30,6 +30,8 @@
 ;; - not much in the way of error feedback
 ;; - not much in the way of error feedback
 
 
 ;;; Code:
 ;;; Code:
+(eval-when-compile
+  (require 'cl))
 (require 'ob)
 (require 'ob)
 (require 'cc-mode)
 (require 'cc-mode)
 (eval-when-compile
 (eval-when-compile

+ 2 - 1
lisp/ob-core.el

@@ -38,6 +38,7 @@
 (defvar org-src-lang-modes)
 (defvar org-src-lang-modes)
 (defvar org-babel-library-of-babel)
 (defvar org-babel-library-of-babel)
 (declare-function show-all "outline" ())
 (declare-function show-all "outline" ())
+(declare-function org-every "org" (pred seq))
 (declare-function org-remove-indentation "org" (code &optional n))
 (declare-function org-remove-indentation "org" (code &optional n))
 (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS))
 (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS))
 (declare-function org-mark-ring-push "org" (&optional pos buffer))
 (declare-function org-mark-ring-push "org" (&optional pos buffer))
@@ -1429,7 +1430,7 @@ specified in the properties of the current outline entry."
 	  (org-entry-get org-babel-current-src-block-location
 	  (org-entry-get org-babel-current-src-block-location
 			 (concat "header-args:" lang) 'inherit))))))
 			 (concat "header-args:" lang) 'inherit))))))
 
 
-(defvar org-src-preserve-indentation)
+(defvar org-src-preserve-indentation) ;; declare defcustom from org-src
 (defun org-babel-parse-src-block-match ()
 (defun org-babel-parse-src-block-match ()
   "Parse the results from a match of the `org-babel-src-block-regexp'."
   "Parse the results from a match of the `org-babel-src-block-regexp'."
   (let* ((block-indentation (length (match-string 1)))
   (let* ((block-indentation (length (match-string 1)))

+ 1 - 0
lisp/ob-exp.el

@@ -24,6 +24,7 @@
 
 
 ;;; Code:
 ;;; Code:
 (require 'ob-core)
 (require 'ob-core)
+(require 'org-src)
 (eval-when-compile
 (eval-when-compile
   (require 'cl))
   (require 'cl))
 
 

+ 0 - 1
lisp/ob-haskell.el

@@ -147,7 +147,6 @@ specifying a variable of the same value."
       (concat "[" (mapconcat #'org-babel-haskell-var-to-haskell var ", ") "]")
       (concat "[" (mapconcat #'org-babel-haskell-var-to-haskell var ", ") "]")
     (format "%S" var)))
     (format "%S" var)))
 
 
-(defvar org-src-preserve-indentation)
 (defvar org-export-copy-to-kill-ring)
 (defvar org-export-copy-to-kill-ring)
 (declare-function org-export-to-file "ox"
 (declare-function org-export-to-file "ox"
 		  (backend file
 		  (backend file

+ 0 - 2
lisp/ob-python.el

@@ -56,8 +56,6 @@ This will typically be either 'python or 'python-mode."
   :package-version '(Org . "8.0")
   :package-version '(Org . "8.0")
   :type 'symbol)
   :type 'symbol)
 
 
-(defvar org-src-preserve-indentation)
-
 (defcustom org-babel-python-hline-to "None"
 (defcustom org-babel-python-hline-to "None"
   "Replace hlines in incoming tables with this when translating to python."
   "Replace hlines in incoming tables with this when translating to python."
   :group 'org-babel
   :group 'org-babel

+ 3 - 3
lisp/org-entities.el

@@ -27,9 +27,8 @@
 
 
 ;;; Code:
 ;;; Code:
 
 
-(require 'org-macs)
-
-(declare-function org-table-align "org-table" ())
+(declare-function org-toggle-pretty-entities "org"       ())
+(declare-function org-table-align            "org-table" ())
 
 
 (eval-when-compile
 (eval-when-compile
   (require 'cl))
   (require 'cl))
@@ -570,6 +569,7 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'."
     (goto-char pos)
     (goto-char pos)
     (org-table-align)))
     (org-table-align)))
 
 
+(defvar org-pretty-entities) ;; declare defcustom from org
 (defun org-entities-help ()
 (defun org-entities-help ()
   "Create a Help buffer with all available entities."
   "Create a Help buffer with all available entities."
   (interactive)
   (interactive)

+ 20 - 13
lisp/org.el

@@ -111,17 +111,19 @@ Stars are put in group 1 and the trimmed body in group 2.")
 (unless (boundp 'diary-fancy-buffer)
 (unless (boundp 'diary-fancy-buffer)
   (org-defvaralias 'diary-fancy-buffer 'fancy-diary-buffer))
   (org-defvaralias 'diary-fancy-buffer 'fancy-diary-buffer))
 
 
+(declare-function org-add-archive-files "org-archive" (files))
+
 (declare-function org-inlinetask-at-task-p "org-inlinetask" ())
 (declare-function org-inlinetask-at-task-p "org-inlinetask" ())
 (declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
 (declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
 (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ())
 (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ())
 (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
 (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
-(declare-function org-clocktable-shift "org-clock" (dir n))
 (declare-function org-clock-get-last-clock-out-time "org-clock" ())
 (declare-function org-clock-get-last-clock-out-time "org-clock" ())
-(declare-function org-clock-update-time-maybe "org-clock" ())
-(declare-function org-clock-remove-overlays "org-clock" (&optional beg end noremove))
 (declare-function org-clock-timestamps-up "org-clock" (&optional n))
 (declare-function org-clock-timestamps-up "org-clock" (&optional n))
 (declare-function org-clock-timestamps-down "org-clock" (&optional n))
 (declare-function org-clock-timestamps-down "org-clock" (&optional n))
+(declare-function org-clock-remove-overlays "org-clock" (&optional beg end noremove))
 (declare-function org-clock-sum-current-item "org-clock" (&optional tstart))
 (declare-function org-clock-sum-current-item "org-clock" (&optional tstart))
+(declare-function org-clock-update-time-maybe "org-clock" ())
+(declare-function org-clocktable-shift "org-clock" (dir n))
 
 
 (declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
 (declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
 (declare-function org-babel-do-in-edit-buffer "ob-core" (&rest body))
 (declare-function org-babel-do-in-edit-buffer "ob-core" (&rest body))
@@ -142,7 +144,9 @@ Stars are put in group 1 and the trimmed body in group 2.")
 (declare-function org-agenda-redo "org-agenda" (&optional all))
 (declare-function org-agenda-redo "org-agenda" (&optional all))
 (declare-function org-table-align "org-table" ())
 (declare-function org-table-align "org-table" ())
 (declare-function org-table-begin "org-table" (&optional table-type))
 (declare-function org-table-begin "org-table" (&optional table-type))
+(declare-function org-table-blank-field "org-table" ())
 (declare-function org-table-end "org-table" (&optional table-type))
 (declare-function org-table-end "org-table" (&optional table-type))
+(declare-function org-table-insert-row "org-table" (&optional arg))
 (declare-function org-table-paste-rectangle "org-table" ())
 (declare-function org-table-paste-rectangle "org-table" ())
 (declare-function org-table-maybe-eval-formula "org-table" ())
 (declare-function org-table-maybe-eval-formula "org-table" ())
 (declare-function org-table-maybe-recalculate-line "org-table" ())
 (declare-function org-table-maybe-recalculate-line "org-table" ())
@@ -175,6 +179,16 @@ Stars are put in group 1 and the trimmed body in group 2.")
   "Non-destructively remove duplicate elements from LIST."
   "Non-destructively remove duplicate elements from LIST."
   (let ((res (copy-sequence list))) (delete-dups res)))
   (let ((res (copy-sequence list))) (delete-dups res)))
 
 
+(defsubst org-get-at-bol (property)
+  "Get text property PROPERTY at the beginning of line."
+  (get-text-property (point-at-bol) property))
+
+(defsubst org-trim (s)
+ "Remove whitespace at the beginning and the end of string S."
+ (replace-regexp-in-string
+  "\\`[ \t\n\r]+" ""
+  (replace-regexp-in-string "[ \t\n\r]+\\'" "" s)))
+
 ;; load languages based on value of `org-babel-load-languages'
 ;; load languages based on value of `org-babel-load-languages'
 (defvar org-babel-load-languages)
 (defvar org-babel-load-languages)
 
 
@@ -194,6 +208,7 @@ Stars are put in group 1 and the trimmed body in group 2.")
 			 (intern (concat "org-babel-expand-body:" lang)))))))
 			 (intern (concat "org-babel-expand-body:" lang)))))))
 	org-babel-load-languages))
 	org-babel-load-languages))
 
 
+(declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
 ;;;###autoload
 ;;;###autoload
 (defun org-babel-load-file (file &optional compile)
 (defun org-babel-load-file (file &optional compile)
   "Load Emacs Lisp source code blocks in the Org-mode FILE.
   "Load Emacs Lisp source code blocks in the Org-mode FILE.
@@ -21512,10 +21527,6 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
 
 
 ;;; Generally useful functions
 ;;; Generally useful functions
 
 
-(defsubst org-get-at-bol (property)
-  "Get text property PROPERTY at the beginning of line."
-  (get-text-property (point-at-bol) property))
-
 (defsubst org-get-at-eol (property n)
 (defsubst org-get-at-eol (property n)
   "Get text property PROPERTY at the end of line less N characters."
   "Get text property PROPERTY at the end of line less N characters."
   (get-text-property (- (point-at-eol) n) property))
   (get-text-property (- (point-at-eol) n) property))
@@ -21720,12 +21731,6 @@ N may optionally be the number of spaces to remove."
     (or (buffer-base-buffer buffer)
     (or (buffer-base-buffer buffer)
 	buffer)))
 	buffer)))
 
 
-(defsubst org-trim (s)
- "Remove whitespace at the beginning and the end of string S."
- (replace-regexp-in-string
-  "\\`[ \t\n\r]+" ""
-  (replace-regexp-in-string "[ \t\n\r]+\\'" "" s)))
-
 (defun org-wrap (string &optional width lines)
 (defun org-wrap (string &optional width lines)
   "Wrap string to either a number of lines, or a width in characters.
   "Wrap string to either a number of lines, or a width in characters.
 If WIDTH is non-nil, the string is wrapped to that width, however many lines
 If WIDTH is non-nil, the string is wrapped to that width, however many lines
@@ -22085,6 +22090,8 @@ for the search purpose."
   "Return the reverse of STRING."
   "Return the reverse of STRING."
   (apply 'string (reverse (string-to-list string))))
   (apply 'string (reverse (string-to-list string))))
 
 
+;; defsubst org-uniquify must be defined before first use
+
 (defun org-uniquify-alist (alist)
 (defun org-uniquify-alist (alist)
   "Merge elements of ALIST with the same key.
   "Merge elements of ALIST with the same key.
 
 

+ 9 - 6
lisp/ox.el

@@ -89,12 +89,6 @@
 (defvar org-table-number-fraction)
 (defvar org-table-number-fraction)
 (defvar org-table-number-regexp)
 (defvar org-table-number-regexp)
 
 
-
-(defsubst org-export-get-parent (blob)
-  "Return BLOB parent or nil.
-BLOB is the element or object considered."
-  (org-element-property :parent blob))
-
 
 
 ;;; Internal Variables
 ;;; Internal Variables
 ;;
 ;;
@@ -1879,6 +1873,13 @@ an alist where associations are (VARIABLE-NAME VALUE)."
       ;; Return value in appropriate order of appearance.
       ;; Return value in appropriate order of appearance.
       (nreverse (funcall collect-bind nil nil)))))
       (nreverse (funcall collect-bind nil nil)))))
 
 
+;; defsubst org-export-get-parent must be defined before first use,
+;; was originally defined in the topology section
+
+(defsubst org-export-get-parent (blob)
+  "Return BLOB parent or nil.
+BLOB is the element or object considered."
+  (org-element-property :parent blob))
 
 
 ;;;; Tree Properties
 ;;;; Tree Properties
 ;;
 ;;
@@ -5221,6 +5222,8 @@ Return the new string."
 ;; `org-export-get-genealogy' returns the full genealogy of a given
 ;; `org-export-get-genealogy' returns the full genealogy of a given
 ;; element or object, from closest parent to full parse tree.
 ;; element or object, from closest parent to full parse tree.
 
 
+;; defsubst org-export-get-parent must be defined before first use
+
 (defun org-export-get-genealogy (blob)
 (defun org-export-get-genealogy (blob)
   "Return full genealogy relative to a given element or object.
   "Return full genealogy relative to a given element or object.