summaryrefslogtreecommitdiff
path: root/text-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'text-conf.el')
-rw-r--r--text-conf.el28
1 files changed, 24 insertions, 4 deletions
diff --git a/text-conf.el b/text-conf.el
index fdecb38..6cd0d14 100644
--- a/text-conf.el
+++ b/text-conf.el
@@ -2,11 +2,11 @@
(require 'text-mode)
-(declare-function #'center-buffer-on "center-buffer" nil)
-(declare-function #'center-buffer-off "center-buffer" nil)
-(declare-function #'center-buffer-toggle "center-buffer" nil)
+;; (declare-function #'center-buffer-on "center-buffer" nil)
+;; (declare-function #'center-buffer-off "center-buffer" nil)
+;; (declare-function #'center-buffer-toggle "center-buffer" nil)
-(define-key text-mode-map (vector 'f8) #'center-buffer-toggle)
+;; (define-key text-mode-map (vector 'f8) nil)
;;;###autoload
(defvar insert-section-heading-history nil
@@ -91,5 +91,25 @@ DESCRIPTION above the block."
(newline)
(insert fill-line))))
+;;;###autoload
+(defun durand-next-page (&optional arg)
+ "Move forward ARG pages and narrow to page.
+The only differences with `narrow-to-page' are that a nil
+argument means 1, and that after narrowing this moves the cursor
+to the beginning."
+ (interactive "p")
+ (narrow-to-page arg)
+ (goto-char (point-min)))
+
+;;;###autoload
+(defun durand-previous-page (&optional arg)
+ "Move backward ARG pages and narrow to page.
+Pass (- (prefix-numeric-value arg)) to `durand-next-page'."
+ (interactive "p")
+ (durand-next-page (- (prefix-numeric-value arg))))
+
+(define-key text-mode-map (vector ?\s-m) #'durand-previous-page)
+(define-key text-mode-map (vector ?\s-รน) #'durand-next-page)
+
(provide 'text-conf)
;;; text-conf.el ends here.