branch: elpa/forth-mode
commit 6efdba0686823816f83148ea0cdde8e675745ed6
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Remove dependency from forth-mode to forth-block-mode.
---
forth-block-mode.el | 9 +--------
forth-mode.el | 10 ++++++++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/forth-block-mode.el b/forth-block-mode.el
index bb67c4a29b..84be683e35 100644
--- a/forth-block-mode.el
+++ b/forth-block-mode.el
@@ -5,14 +5,6 @@
(goto-char (point-min))
(forward-line (1- n)))
-(defun forth-block-p ()
- "Guess whether the current buffer is a Forth block file."
- (message (format "%s %s" (point-max) (logand (point-max) 1023)))
- (and (eq (logand (point-max) 1023) 1)
- (save-excursion
- (forth-beginning)
- (not (search-forward "\n" 1024 t)))))
-
(defun forth-unblockify ()
(let ((after-change-functions nil))
(save-excursion
@@ -84,6 +76,7 @@
(while (> (- (point) (line-beginning-position)) 64)
(delete-char -1))))
+;;;###autoload
(define-minor-mode forth-block-mode
"Minor mode for Forth code in blocks."
:lighter " block"
diff --git a/forth-mode.el b/forth-mode.el
index de8adcf1c3..0cc5df33f6 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -10,8 +10,6 @@
;;; Code:
-(require 'forth-block-mode)
-
(defvar forth-mode-map
(let ((map (make-sparse-keymap)))
;; (define-key (kbd "C-x C-e") #'forth-eval-last-sexp)
@@ -66,6 +64,14 @@
(defvar forth-font-lock-keywords
'((forth-match-definition 3 font-lock-function-name-face)))
+(defun forth-block-p ()
+ "Guess whether the current buffer is a Forth block file."
+ (message (format "%s %s" (point-max) (logand (point-max) 1023)))
+ (and (eq (logand (point-max) 1023) 1)
+ (save-excursion
+ (forth-beginning)
+ (not (search-forward "\n" 1024 t)))))
+
(unless (fboundp 'prog-mode)
(defalias 'prog-mode 'fundamental-mode))