[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/smalltalk-mode a5a661a 30/34: Silence byte-compiler war
From: |
Stefan Monnier |
Subject: |
[elpa] externals/smalltalk-mode a5a661a 30/34: Silence byte-compiler warnings |
Date: |
Tue, 9 Apr 2019 22:30:48 -0400 (EDT) |
branch: externals/smalltalk-mode
commit a5a661af034cf68b3727e1bee9548dcd3786f90f
Author: Wilfred Hughes <address@hidden>
Commit: Holger Hans Peter Freyther <address@hidden>
Silence byte-compiler warnings
---
smalltalk-mode.el | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/smalltalk-mode.el b/smalltalk-mode.el
index 6ad9d7f..cf83c29 100644
--- a/smalltalk-mode.el
+++ b/smalltalk-mode.el
@@ -418,7 +418,7 @@ expressions."
(defun smalltalk-maybe-insert-spacing-line (n)
(if (not (save-excursion
- (previous-line n)
+ (forward-line (- n))
(looking-at "^[ \t]*$")))
(insert "\n")))
@@ -614,7 +614,7 @@ expressions."
(and (= (preceding-char) ?|)
(progn
(backward-char 1)
- (while (and (not (bobp)) (looking-back "[ \t\na-zA-Z]"))
+ (while (and (not (bobp)) (looking-back "[ \t\na-zA-Z]" nil))
(skip-chars-backward " \t\n")
(skip-chars-backward "a-zA-Z"))
(if (= (preceding-char) ?|)
@@ -1027,22 +1027,23 @@ Whitespace is defined as spaces, tabs, and comments."
(progn (setq curr-hit-point new-hit-point)
(setq curr-hit new-hit)))
(cons curr-hit curr-hit-point)))
-
+
+(defun smalltalk-update-hit-point (current search)
+ (save-excursion
+ (let ((new-hit-point (funcall search)))
+ (if (and new-hit-point
+ (or (not current) (> new-hit-point current)))
+ new-hit-point
+ current))))
+
(defun smalltalk-current-scope-point ()
- (defun smalltalk-update-hit-point (current search)
- (save-excursion
- (let ((new-hit-point (funcall search)))
- (if (and new-hit-point
- (or (not current) (> new-hit-point current)))
- new-hit-point
- current))))
(let ((curr-hit-point (smalltalk-current-class-point)))
(setq curr-hit-point
(smalltalk-update-hit-point curr-hit-point
- #'(lambda ()(search-backward-regexp "^[
\t]*Eval[ \t]+\\[" nil t))))
+ (lambda () (search-backward-regexp "^[
\t]*Eval[ \t]+\\[" nil t))))
(setq curr-hit-point
(smalltalk-update-hit-point curr-hit-point
- #'(lambda ()(search-backward-regexp "^[
\t]*Namespace[ \t]+current:[ \t]+[A-Za-z0-9_.]+[ \t]+\\[" nil t))))
+ (lambda () (search-backward-regexp "^[
\t]*Namespace[ \t]+current:[ \t]+[A-Za-z0-9_.]+[ \t]+\\[" nil t))))
curr-hit-point))
(defun smalltalk-current-class-point ()
@@ -1116,13 +1117,13 @@ Whitespace is defined as spaces, tabs, and comments."
(error (goto-char prev-point)))))
(defun smalltalk-goto-beginning-of-statement ()
- (if (not (looking-back "[ \t\n]"))
+ (if (not (looking-back "[ \t\n]" nil nil))
(smalltalk-safe-backward-sexp)))
(defun smalltalk-has-sender ()
(save-excursion
(smalltalk-backward-whitespace)
- (looking-back "[]})A-Za-z0-9']")))
+ (looking-back "[]})A-Za-z0-9']" nil)))
(defun smalltalk-looking-at-binary-send ()
(looking-at "[^]A-Za-z0-9:_(){}[;.\'\"]+[ \t\n]"))
@@ -1134,7 +1135,7 @@ Whitespace is defined as spaces, tabs, and comments."
(looking-at "[A-Za-z][A-Za-z0-9_]*:"))
(defun smalltalk-looking-back-keyword-send ()
- (looking-back "[A-z][A-z0-9_]*:"))
+ (looking-back "[A-z][A-z0-9_]*:" nil))
(defun smalltalk-find-end-of-keyword-send ()
(save-excursion
@@ -1151,8 +1152,8 @@ Whitespace is defined as spaces, tabs, and comments."
(let ((begin-of-defun (smalltalk-at-begin-of-defun)))
(smalltalk-backward-whitespace)
(if (or (if begin-of-defun
- (looking-back "[].;]")
- (looking-back "[.;]"))
+ (looking-back "[].;]" nil)
+ (looking-back "[.;]" nil))
(= (smalltalk-previous-keyword) (point)))
""
(progn
@@ -1170,7 +1171,7 @@ Whitespace is defined as spaces, tabs, and comments."
(defun smalltalk-previous-keyword-1 ()
(smalltalk-backward-whitespace)
- (if (looking-back "[>[({.^]") ;; not really ok when > is sent in a keyword
arg
+ (if (looking-back "[>[({.^]" nil) ;; not really ok when > is sent in a
keyword arg
nil
(if (= (point) (save-excursion (smalltalk-safe-backward-sexp) (point)))
nil
- [elpa] externals/smalltalk-mode 4160554 12/34: simplify installation of Emacs modes, (continued)
- [elpa] externals/smalltalk-mode 4160554 12/34: simplify installation of Emacs modes, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 90f07e6 32/34: Move smalltalk-mode autoloads to smalltalk-mode, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 453b7f5 34/34: smalltalk-mode: Fix version and author in header, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode d7f4421 28/34: emacs: Fix the smalltalk-mode mode for emacs 24.2 and later, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 7706ca9 22/34: merge smalltalk-mode bugfixes and tags support, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 83e5fa6 03/34: more updates to the FSF address, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 81dda06 10/34: fix Emacs mode glitches reported by Jeronimo Pellegrini, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode f5a8ddb 13/34: update copyright notices for 2009, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 12cf1d9 19/34: more smalltalk mode improvements from Mathieu, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode aaa7cb0 17/34: improve smalltalk.el detection of a new method's indent, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode a5a661a 30/34: Silence byte-compiler warnings,
Stefan Monnier <=
- [elpa] externals/smalltalk-mode f5845a2 06/34: Emacs interactor mode refinements, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 1521656 01/34: initial import, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode c81b497 21/34: Fix smalltalk-mode.el, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode cd36013 26/34: smalltalk-mode fixes, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 58ef6fd 05/34: improvements to the Emacs mode, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode a1e76a8 27/34: new smalltalk-mode navigational shortcuts, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode d3cea5f 25/34: fix typo, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode 99e6910 33/34: smalltalk-mode: Fix issues spotted by Emacs' checkdoc, Stefan Monnier, 2019/04/09
- [elpa] externals/smalltalk-mode a1d6a5d 29/34: Ensure header and footer match Emacs conventions, Stefan Monnier, 2019/04/09