Remove uses of deprecated top-point and bottom-point functions
* lisp/org.el (org-skip-over-state-notes,org-store-log-note): use new accessors. * list/ob.el (org-babel-result-end): use new accessors. * list/org-exp.el (org-export-mark-list-ending): use new accessors.
This commit is contained in:
parent
148deffd4e
commit
2adbcfffe1
|
@ -76,7 +76,8 @@
|
|||
(declare-function org-in-item-p "org-list" ())
|
||||
(declare-function org-list-parse-list "org-list" (&optional delete))
|
||||
(declare-function org-list-to-generic "org-list" (LIST PARAMS))
|
||||
(declare-function org-list-bottom-point "org-list" ())
|
||||
(declare-function org-list-struct "org-list" ())
|
||||
(declare-function org-list-get-bottom-point "org-list" (struct))
|
||||
|
||||
(defgroup org-babel nil
|
||||
"Code block evaluation and management in `org-mode' documents."
|
||||
|
@ -1582,7 +1583,9 @@ code ---- the results are extracted in the syntax of the source
|
|||
(save-excursion
|
||||
(cond
|
||||
((org-at-table-p) (progn (goto-char (org-table-end)) (point)))
|
||||
((org-at-item-p) (- (org-list-bottom-point) 1))
|
||||
((org-at-item-p) (save-excursion
|
||||
(org-beginning-of-item)
|
||||
(1- (org-list-get-bottom-point (org-list-struct)))))
|
||||
(t
|
||||
(let ((case-fold-search t)
|
||||
(blocks-re (regexp-opt
|
||||
|
|
|
@ -1678,7 +1678,8 @@ These special cookies will later be interpreted by the backend.
|
|||
(lambda (end-list-marker)
|
||||
(goto-char (point-min))
|
||||
(while (org-search-forward-unenclosed org-item-beginning-re nil t)
|
||||
(goto-char (org-list-bottom-point))
|
||||
(beginning-of-line)
|
||||
(goto-char (org-list-get-bottom-point (org-list-struct)))
|
||||
(when (and (not (eq org-list-ending-method 'indent))
|
||||
(looking-at (org-list-end-re)))
|
||||
(replace-match "\n"))
|
||||
|
|
36
lisp/org.el
36
lisp/org.el
|
@ -11819,11 +11819,13 @@ EXTRA is additional text that will be inserted into the notes buffer."
|
|||
(defun org-skip-over-state-notes ()
|
||||
"Skip past the list of State notes in an entry."
|
||||
(if (looking-at "\n[ \t]*- State") (forward-char 1))
|
||||
(when (org-in-item-p)
|
||||
(let ((limit (org-list-bottom-point)))
|
||||
(while (looking-at "[ \t]*- State")
|
||||
(goto-char (or (org-get-next-item (point) limit)
|
||||
(org-get-end-of-item limit)))))))
|
||||
(let ((itemp (org-in-item-p)))
|
||||
(when itemp
|
||||
(let* ((struct (progn (goto-char itemp) (org-list-struct)))
|
||||
(prevs (org-list-struct-prev-alist struct)))
|
||||
(while (looking-at "[ \t]*- State")
|
||||
(goto-char (or (org-list-get-next-item (point) struct prevs)
|
||||
(org-list-get-item-end (point) struct))))))))
|
||||
|
||||
(defun org-add-log-note (&optional purpose)
|
||||
"Pop up a window for taking a note, and add this note later at point."
|
||||
|
@ -11909,17 +11911,19 @@ EXTRA is additional text that will be inserted into the notes buffer."
|
|||
(end-of-line 1)
|
||||
(if (not (bolp)) (let ((inhibit-read-only t)) (insert "\n")))
|
||||
(setq ind (save-excursion
|
||||
(if (org-in-item-p)
|
||||
(progn
|
||||
(goto-char (org-list-top-point))
|
||||
(org-get-indentation))
|
||||
(skip-chars-backward " \r\t\n")
|
||||
(cond
|
||||
((and (org-at-heading-p)
|
||||
org-adapt-indentation)
|
||||
(1+ (org-current-level)))
|
||||
((org-at-heading-p) 0)
|
||||
(t (org-get-indentation))))))
|
||||
(let ((itemp (org-in-item-p)))
|
||||
(if itemp
|
||||
(progn
|
||||
(goto-char itemp)
|
||||
(org-list-get-ind
|
||||
(org-list-get-top-point (org-list-struct))))
|
||||
(skip-chars-backward " \r\t\n")
|
||||
(cond
|
||||
((and (org-at-heading-p)
|
||||
org-adapt-indentation)
|
||||
(1+ (org-current-level)))
|
||||
((org-at-heading-p) 0)
|
||||
(t (org-get-indentation)))))))
|
||||
(setq bul (org-list-bullet-string "-"))
|
||||
(org-indent-line-to ind)
|
||||
(insert bul (pop lines))
|
||||
|
|
Loading…
Reference in New Issue