[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/forth-mode 50adf0d552 024/153: Remove byte-compile warning
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/forth-mode 50adf0d552 024/153: Remove byte-compile warnings. |
Date: |
Sat, 29 Jan 2022 08:02:14 -0500 (EST) |
branch: elpa/forth-mode
commit 50adf0d552845fca18e7dbaba35c4a2696fee1a7
Author: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Commit: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Remove byte-compile warnings.
---
forth-block-mode.el | 19 +++++++++++++------
forth-interaction-mode.el | 1 +
forth-mode.el | 3 +++
parse.el | 4 +++-
4 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/forth-block-mode.el b/forth-block-mode.el
index 856fe013ef..b81918fb0d 100644
--- a/forth-block-mode.el
+++ b/forth-block-mode.el
@@ -1,15 +1,22 @@
+(require 'cl)
+(require 'forth-mode)
+
+(defun forth-line (n)
+ (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
- (beginning-of-buffer)
+ (forth-beginning)
(not (search-forward "\n" 1024 t)))))
(defun forth-unblockify ()
(let ((after-change-functions nil))
(save-excursion
- (beginning-of-buffer)
+ (forth-beginning)
(while (ignore-errors (forward-char 64) t)
(insert ?\n))
(let ((delete-trailing-lines t))
@@ -28,7 +35,7 @@
(defun forth-blockify ()
(let ((after-change-functions nil))
(save-excursion
- (beginning-of-buffer)
+ (forth-beginning)
(while (forth-pad-line))
(while (plusp (logand (point) 1023))
(insert " "))
@@ -64,18 +71,18 @@
(cond ((plusp forth-change-newlines)
(let ((n (logand (+ (line-number-at-pos) 15) -16)))
(save-excursion
- (goto-line (1+ n))
+ (forth-line (1+ n))
(delete-region (line-beginning-position) (line-end-position))
(delete-char 1))))
((minusp forth-change-newlines)
(let ((n (logand (+ (line-number-at-pos) 15) -16)))
(save-excursion
- (goto-line n)
+ (forth-line n)
(insert "\n")))))
(save-excursion
(end-of-line)
(while (> (- (point) (line-beginning-position)) 64)
- (delete-backward-char 1))))
+ (delete-char -1))))
(define-minor-mode forth-block-mode
"Minor mode for Forth code in blocks."
diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 0246cfd68b..8f80f60baa 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -1,4 +1,5 @@
(require 'comint)
+(require 'forth-mode)
(defvar forth-interaction-buffer nil)
(defvar forth-interaction-callback nil)
diff --git a/forth-mode.el b/forth-mode.el
index 607274e149..03d4ebaa15 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -110,5 +110,8 @@
(interactive (list (buffer-file-name (current-buffer))))
(forth-interaction-send (concat "include " file)))
+(defun forth-beginning ()
+ (goto-char (point-min)))
+
(provide 'forth-mode)
;;; forth-mode.el ends here
diff --git a/parse.el b/parse.el
index 2082df6fd6..93505b8a4a 100644
--- a/parse.el
+++ b/parse.el
@@ -1,3 +1,5 @@
+(require 'forth-mode)
+
(defvar forth-stack-comments (make-hash-table :test 'equal))
(defun forth-parse-colon-definition ()
@@ -25,7 +27,7 @@
(defun forth-parse-buffer (&optional buffer)
(setq buffer (or buffer (current-buffer)))
(save-excursion
- (beginning-of-buffer)
+ (forth-beginning)
(end-of-defun)
(beginning-of-defun)
(while t
- [nongnu] elpa/forth-mode 24d3d052fe 003/153: More work. Font lock and navigation somewhat usable., (continued)
- [nongnu] elpa/forth-mode 24d3d052fe 003/153: More work. Font lock and navigation somewhat usable., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 93756ec224 005/153: Some basic and flawed support for block files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode bca8f01218 004/153: Make it work in older Emacsen without prog-mode., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode effb52b8e0 009/153: Load files from load-path., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 3047dfa37a 008/153: Run a subprocess Forth for interaction., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 6ab334684b 010/153: Send a string to an interactive Forth session., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b6b1f049b0 017/153: Restart an interactive Forth session., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 7c75c452e9 022/153: Correct autoload cookie format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode e4ed4a8acf 050/153: Test with both Emacs 23 and 24., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode cc267b4b85 043/153: Symbol completion. Candidates come from a running Forth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 50adf0d552 024/153: Remove byte-compile warnings.,
ELPA Syncer <=
- [nongnu] elpa/forth-mode 85ce58e93e 020/153: Correct package header format, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d972e9fc7a 019/153: Escape some character constants., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d09313f19c 035/153: Add forth-eval-region., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 89b9904ceb 119/153: Add some tests for font-lock faces, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d47662b187 037/153: Add some installation and usage instrutions., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 1cb3071930 117/153: Move the font-locking for defining words to forth-syntax.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 21033fc700 031/153: Improve sending commands to an interactive Forth session., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 1c05a009a3 080/153: Fix warning about speedbar-add-supported-extension., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode ef60dcd180 036/153: If forth-executable is nil, query user for file name., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b29a929b78 028/153: Add provide forms., ELPA Syncer, 2022/01/29