branch: master
commit 5a34588a85fd3b8c44ff56ca1cbe035d1a47aab2
Author: mas <mas>
Commit: mas <mas>
(mmm-overlays-in): Added checks for point-min and point-max for XEmacs.
(use-local-map): Added the advice back in.
---
mmm-region.el | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/mmm-region.el b/mmm-region.el
index cfd59d5..d9510dc 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <[email protected]>
-;; Version: $Id: mmm-region.el,v 1.6 2000/06/08 11:41:30 mas Exp $
+;; Version: $Id: mmm-region.el,v 1.7 2000/06/08 18:24:00 mas Exp $
;;{{{ GPL
@@ -162,7 +162,8 @@ contained in the region, including their delimiters \(if
any)."
(or (not strict)
(>= stop (mmm-back-end ovl))
(<= start (mmm-front-start ovl)))))
- (overlays-in start stop))))
+ (overlays-in (max start (point-min))
+ (min stop (point-max))))))
(defun mmm-sort-overlays (overlays)
"Sort OVERLAYS in order of decreasing priority."
@@ -289,12 +290,6 @@ mode for it to be a submode or a major mode with submodes."
;; I know, but at the moment I don't have time to think of a neater
;; solution.
-;; Actually, `vm-mail' is the only command I know of which does this,
-;; and one could argue that such behavior is noncompliant with Emacs
-;; standards. The advice seems to cause trouble under XEmacs, but I
-;; haven't had any problems with it under Emacs, so until something
-;; goes wrong, I'll leave it in for the latter only.
-
(defvar mmm-local-maps-alist ()
"Which local maps have been changed in this buffer.
Not used under XEmacs.")
@@ -305,17 +300,15 @@ Not used under XEmacs.")
"Shut up the byte compiler")
(fset 'mmm-real-use-local-map (symbol-function 'use-local-map))
-(unless mmm-xemacs
- (defadvice use-local-map (after mmm-keep-record activate compile)
- "Keep track of which local maps have been changed in which buffers."
- (mmm-valid-buffer
- (mmm-update-current-submode)
- (let* ((mode (or mmm-current-submode major-mode))
- (map (assq mode mmm-local-maps-alist)))
- (if map
- (setcdr map (current-local-map))
- (push (cons mode (current-local-map)) mmm-local-maps-alist)))))
- )
+(defadvice use-local-map (after mmm-keep-record activate compile)
+ "Keep track of which local maps have been changed in which buffers."
+ (mmm-valid-buffer
+ (mmm-update-current-submode)
+ (let* ((mode (or mmm-current-submode major-mode))
+ (map (assq mode mmm-local-maps-alist)))
+ (if map
+ (setcdr map (current-local-map))
+ (push (cons mode (current-local-map)) mmm-local-maps-alist)))))
;;}}}
;;{{{ Updating Hooks