branch: master
commit 7142b026a77ef4eb4cd8a16363889f212ff98351
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>
Fix compilation warnings
---
mmm-auto.el | 5 ++---
mmm-cmds.el | 3 ++-
mmm-noweb.el | 3 ++-
mmm-region.el | 15 +++++++--------
mmm-sample.el | 3 ++-
mmm-utils.el | 4 ++--
6 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/mmm-auto.el b/mmm-auto.el
index e068eb4..1fd9609 100644
--- a/mmm-auto.el
+++ b/mmm-auto.el
@@ -148,8 +148,7 @@ everything in `mmm-major-mode-hook' will be run."
(remove-hook 'post-command-hook 'mmm-check-changed-buffers)
(dolist (buffer mmm-changed-buffers-list)
(when (buffer-live-p buffer)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(mmm-run-major-mode-hook))))
(setq mmm-changed-buffers-list '()))
@@ -176,4 +175,4 @@ This function is deprecated and may be removed in future."
(provide 'mmm-auto)
-;;; mmm-auto.el ends here
\ No newline at end of file
+;;; mmm-auto.el ends here
diff --git a/mmm-cmds.el b/mmm-cmds.el
index 893214a..fef13c8 100644
--- a/mmm-cmds.el
+++ b/mmm-cmds.el
@@ -30,6 +30,7 @@
;;; Code:
+(require 'cl)
(require 'font-lock)
(require 'mmm-compat)
(require 'mmm-vars)
@@ -443,4 +444,4 @@ NAME is a symbol naming the insertion."
(provide 'mmm-cmds)
-;;; mmm-cmds.el ends here
\ No newline at end of file
+;;; mmm-cmds.el ends here
diff --git a/mmm-noweb.el b/mmm-noweb.el
index ec0e5d3..cb59518 100644
--- a/mmm-noweb.el
+++ b/mmm-noweb.el
@@ -35,6 +35,7 @@
;;; Code:
+(require 'cl)
(require 'mmm-region)
(require 'mmm-vars)
(require 'mmm-mode)
@@ -407,4 +408,4 @@ optional NAME to determine the current region name."
(provide 'mmm-noweb)
-;;; mmm-noweb.el ends here
\ No newline at end of file
+;;; mmm-noweb.el ends here
diff --git a/mmm-region.el b/mmm-region.el
index 3a113bb..bfac6df 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -472,12 +472,12 @@ Does not handle delimiters. Use `mmm-make-region'."
(defun mmm-clear-overlays (&optional start stop strict)
"Clears all MMM overlays overlapping START and STOP.
If STRICT, only clear those entirely included in that region."
- (mapcar #'delete-overlay
- (if strict
- (mmm-overlays-contained-in (or start (point-min))
- (or stop (point-max)))
- (mmm-overlays-overlapping (or start (point-min))
- (or stop (point-max)))))
+ (mapc #'delete-overlay
+ (if strict
+ (mmm-overlays-contained-in (or start (point-min))
+ (or stop (point-max)))
+ (mmm-overlays-overlapping (or start (point-min))
+ (or stop (point-max)))))
(mmm-update-submode-region))
;;}}}
@@ -507,8 +507,7 @@ is non-nil, don't quit if the info is already there."
;; On errors, the temporary buffers don't get deleted, so here
;; we get rid of any old ones that may be hanging around.
(when (buffer-live-p (get-buffer mmm-temp-buffer-name))
- (save-excursion
- (set-buffer (get-buffer mmm-temp-buffer-name))
+ (with-current-buffer (get-buffer mmm-temp-buffer-name)
(set-buffer-modified-p nil)
(kill-buffer (current-buffer))))
;; Now make a new temporary buffer.
diff --git a/mmm-sample.el b/mmm-sample.el
index 04e7d0c..cda15e2 100644
--- a/mmm-sample.el
+++ b/mmm-sample.el
@@ -31,6 +31,7 @@
;;; Code:
+(require 'cl)
(require 'mmm-auto)
(require 'mmm-vars)
@@ -371,4 +372,4 @@ and MODE is a major mode function symbol.")
(provide 'mmm-sample)
-;;; mmm-sample.el ends here
\ No newline at end of file
+;;; mmm-sample.el ends here
diff --git a/mmm-utils.el b/mmm-utils.el
index 7f2eb4b..04ef1f4 100644
--- a/mmm-utils.el
+++ b/mmm-utils.el
@@ -93,7 +93,7 @@ ON-STRING, if supplied, means to use the match data from a
subexp)
(save-match-data
(while (string-match "~\\([0-9]\\)" string)
- (setq subexp (string-to-int (match-string-no-properties 1 string))
+ (setq subexp (string-to-number (match-string-no-properties 1 string))
string (replace-match
(save-match-data
(set-match-data old-data)
@@ -155,4 +155,4 @@ i.e. whether text inserted at the marker should be inside
the region."
(provide 'mmm-utils)
-;;; mmm-utils.el ends here
\ No newline at end of file
+;;; mmm-utils.el ends here