[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/doc-toc c521029525 36/84: Change (beginning-og-buffer)
From: |
ELPA Syncer |
Subject: |
[elpa] externals/doc-toc c521029525 36/84: Change (beginning-og-buffer) to (goto-char (point-min)) for MELPA |
Date: |
Mon, 26 Sep 2022 13:58:36 -0400 (EDT) |
branch: externals/doc-toc
commit c5210295254d9117cfd7ed4b4b6d2c53b03d4d55
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
Change (beginning-og-buffer) to (goto-char (point-min)) for MELPA
---
toc-mode.el | 35 ++++++++++-------------------------
1 file changed, 10 insertions(+), 25 deletions(-)
diff --git a/toc-mode.el b/toc-mode.el
index 2c629c8711..ea358d6a98 100644
--- a/toc-mode.el
+++ b/toc-mode.el
@@ -156,7 +156,7 @@ For DJVU the old DJVU file is replaced by default"
(defun toc--cleanup-dots ()
"Remove dots between heading its title and page number."
(interactive)
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (not (eobp))
(re-search-forward "\\([\\. ]*\\)\\([0-9ivx]*\\) *$")
(replace-match " \\2")
@@ -165,7 +165,7 @@ For DJVU the old DJVU file is replaced by default"
(defun toc--cleanup-dots-ocr ()
"Remove dots between heading its title and page number.
Like `toc--cleanup-dots' but more suited for use after OCR"
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (re-search-forward "\\([0-9\\. \\-]*\\)\\( [0-9]* *\\)$" nil t)
(replace-match " \\2")))
@@ -177,9 +177,7 @@ Like `toc--cleanup-dots' but more suited for use after OCR"
(defun toc--cleanup-lines-roman-string ()
"Delete all lines that contain only linefeeds and/or blanks and/or roman
numerals."
(interactive)
- (beginning-of-buffer)
- ;; (re-search-forward "^ *[ivx0-9\\.]+ *$" nil t)
- ;; (replace-match "")
+ (goto-char (point-min))
(while (not (eobp))
(re-search-forward "^[\f ]*[ivx0-9\\.]* *$")
(replace-match "")
@@ -188,7 +186,7 @@ Like `toc--cleanup-dots' but more suited for use after OCR"
(defun toc-cleanup-blank-lines ()
"Delete all empty lines."
(interactive)
- (beginning-of-buffer)
+ (goto-char (point-min))
(flush-lines "^ *$"))
(defun toc--join-next-unnumbered-lines ()
@@ -205,7 +203,7 @@ Like `toc--cleanup-dots' but more suited for use after OCR"
(defun toc--cleanup (startpage &optional arg)
"Cleanup extracted Table Of Contents by running a series of cleanup
functions."
(interactive)
- (beginning-of-buffer)
+ (goto-char (point-min))
(when (search-forward "contents" nil t)
(replace-match (format "Contents %s" startpage)))
(toc--cleanup-lines-contents-string)
@@ -240,10 +238,10 @@ ARG (\\[universal-argument]) to enter different
separators."
(read-string
"Enter index separators as regexp (escape with \\ if
required): ")
nil)))
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (re-search-forward "^\\s-+" nil t)
(replace-match ""))
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (not (eobp))
(let* ((level (toc--count-level-by-index separators)))
(dotimes (x level) (insert " "))
@@ -364,22 +362,10 @@ unprocessed text."
(end (match-end 0)))
(- end start)))
-;; (defun toc-level ()
-;; "Determine level of current line in TOC tree by comparing number of
spaces with other lines in buffer."
-;; (interactive)
-;; (let (levels)
-;; (beginning-of-buffer)
-;; (while (not (eobp))
-;; (let ((spaces (toc-count-leading-spaces)))
-;; (unless (member spaces levels)
-;; (setq levels (append levels (list spaces))))
-;; (forward-line 1)))
-;; (progn levels)))
-
(defun toc--convert-to-tabulated-list ()
"Parse and prepare content of current buffer for `toc-tabular-mode'."
(interactive)
- (beginning-of-buffer)
+ (goto-char (point-min))
(let (lines
levels)
(while (not (eobp))
@@ -552,7 +538,7 @@ unprocessed text."
Displays results in a newlycreated buffer for use as source input
to `pdfoutline' shell command."
(interactive)
- (beginning-of-buffer)
+ (goto-char (point-min))
(let ((source-buffer doc-buffer)
text)
(while (not (eobp))
@@ -575,7 +561,7 @@ to `pdfoutline' shell command."
".txt"))))
(with-current-buffer buff
(insert "(bookmarks "))
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (not (eobp))
(let* ((v (tabulated-list-get-entry))
(level-current (string-to-number (aref v 0)))
@@ -584,7 +570,6 @@ to `pdfoutline' shell command."
(level-next (when v-next (string-to-number (aref v-next 0)))))
(if level-next
(with-current-buffer buff
- ;; (end-of-buffer)
(cond ((= level-next level-current)
(insert (format "(\"%s\" \"%s\") " (car sexp) (nth 1
sexp))))
((> level-next level-current)
- [elpa] externals/doc-toc a14dbb4c25 67/84: Fix beginning-of-buffer compilation warning, (continued)
- [elpa] externals/doc-toc a14dbb4c25 67/84: Fix beginning-of-buffer compilation warning, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 102e14199c 65/84: pdf.tocgen replace original pdf, and show message on fail, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 4c9ce0f54d 76/84: Fix: eval-when-compile pdf-tools, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 2ec9515f0d 81/84: Apply patch S. Monnier, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc ca80abf2f8 83/84: Update name to doc-toc (i.e. make doc-tools extension), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 3d286633a9 11/84: Update README, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 3acf45b0f7 18/84: Implement C-c C-c functionality also for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 74c68f0cda 24/84: Update README.org, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f8fbca0c41 23/84: README add features and keybindings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f643745b06 32/84: Set windows encoding for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc c521029525 36/84: Change (beginning-og-buffer) to (goto-char (point-min)) for MELPA,
ELPA Syncer <=
- [elpa] externals/doc-toc a1d26eceb5 37/84: Add defvar and declare-function to avoid warning MELPA, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 05cd1287f1 42/84: Fix toc--add-to-djvu. Don't ask save location., ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f430243a88 43/84: Add version: 0 header, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 59f4471e6a 50/84: Update README.org, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 2d95c466a3 48/84: Add MELPA and GPL3 badges, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 734043bdc7 47/84: Improve documentation in toc-mode.el, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc ae455b4863 52/84: Implement language customization for OCR, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 23e1fb2fde 54/84: Implement HandyOutliner option, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc b45b78102c 55/84: Update README, add extract-only documentation, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc b1a843fd6f 57/84: Implement roman-to-arabic and add pdf djvu keybindings, ELPA Syncer, 2022/09/26