Fix: Warning: `end-of-buffer' is for interactive use only; use `(goto-char (point-max))' instead.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 01 Mar 2015 13:21:30 +0200
changeset 1242 3ac891ab0ad6
parent 1241 4f22d9fe2e5b
child 1243 10a201706f1c
Fix: Warning: `end-of-buffer' is for interactive use only; use `(goto-char (point-max))' instead. Warning: `beginning-of-buffer' is for interactive use only; use `(goto-char (point-min))' instead.
debian-doc.el
--- a/debian-doc.el	Sun Mar 01 13:10:30 2015 +0200
+++ b/debian-doc.el	Sun Mar 01 13:21:30 2015 +0200
@@ -47,11 +47,11 @@
                 ;;   (insert-file-contents file))
                 (insert "\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n\n")
                 (insert-file-contents file)
-                (end-of-buffer)))
+                (goto-char (point-max))))
             (directory-files debian-doc-dir t)))
     (read-only-mode 1)
     (debian-doc-mode)
-    (beginning-of-buffer)))
+    (goto-char (point-min))))
 
 ;;;###autoload
 (defun debian-doc-visit ()
@@ -61,12 +61,12 @@
     (debian-doc)
     (unless debian-doc-completion-list
       (save-excursion
-        (beginning-of-buffer)
+        (goto-char (point-min))
         (while (setq start (search-forward "Document: " nil t))
           (end-of-line)
           (push (buffer-substring-no-properties start (point)) debian-doc-completion-list))))
     (when (setq word (completing-read "Package: " debian-doc-completion-list nil t))
-      (beginning-of-buffer)
+      (goto-char (point-min))
       (search-forward (concat "Document: " word) nil t)
       (recenter-top-bottom))))
 (define-key debian-doc-mode-map (kbd "RET") 'debian-doc-visit-at-point)