2 new commits in fsf-compat:
https://bitbucket.org/xemacs/fsf-compat/commits/9ca2a22d7c94/
Changeset: 9ca2a22d7c94
User: sperber
Date: 2013-02-20 11:30:13
Summary: Add `copy-overlay', `remove-overlays' functions from GNU Emacs.
2013-02-20 Michael Sperber <mike(a)xemacs.org>
* overlay.el (copy-overlay, remove-overlays): Add functions from
GNU Emacs.
Affected #: 2 files
diff -r 65d33b7ebc516f9bba2e936a6bdc005a2d806e7e -r
9ca2a22d7c9445bb86ea46d702faf681d22bc78b ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-20 Michael Sperber <mike(a)xemacs.org>
+
+ * overlay.el (copy-overlay, remove-overlays): Add functions from
+ GNU Emacs.
+
2009-08-14 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.19 released.
diff -r 65d33b7ebc516f9bba2e936a6bdc005a2d806e7e -r
9ca2a22d7c9445bb86ea46d702faf681d22bc78b overlay.el
--- a/overlay.el
+++ b/overlay.el
@@ -291,6 +291,49 @@
prop)))
(set-extent-property overlay prop value))
+(defun copy-overlay (o)
+ "Return a copy of overlay O."
+ (let ((o1 (if (overlay-buffer o)
+ (make-overlay (overlay-start o) (overlay-end o)
+ ;; FIXME: there's no easy way to find the
+ ;; insertion-type of the two markers.
+ (overlay-buffer o))
+ (let ((o1 (make-overlay (point-min) (point-min))))
+ (delete-overlay o1)
+ o1)))
+ (props (overlay-properties o)))
+ (while props
+ (overlay-put o1 (pop props) (pop props)))
+ o1))
+
+(defun remove-overlays (&optional beg end name val)
+ "Clear BEG and END of overlays whose property NAME has value VAL.
+Overlays might be moved and/or split.
+BEG and END default respectively to the beginning and end of buffer."
+ ;; This speeds up the loops over overlays.
+ (unless beg (setq beg (point-min)))
+ (unless end (setq end (point-max)))
+ (overlay-recenter end)
+ (if (< end beg)
+ (setq beg (prog1 end (setq end beg))))
+ (save-excursion
+ (dolist (o (overlays-in beg end))
+ (when (eq (overlay-get o name) val)
+ ;; Either push this overlay outside beg...end
+ ;; or split it to exclude beg...end
+ ;; or delete it entirely (if it is contained in beg...end).
+ (if (< (overlay-start o) beg)
+ (if (> (overlay-end o) end)
+ (progn
+ (move-overlay (copy-overlay o)
+ (overlay-start o) beg)
+ (move-overlay o end (overlay-end o)))
+ (move-overlay o (overlay-start o) beg))
+ (if (> (overlay-end o) end)
+ (move-overlay o end (overlay-end o))
+ (delete-overlay o)))))))
+
+
(provide 'overlay)
;;; overlay.el ends here
https://bitbucket.org/xemacs/fsf-compat/commits/62743319f0c0/
Changeset: 62743319f0c0
User: sperber
Date: 2014-01-05 11:57:49
Summary: Only call `activate-timer' on non-active-timers.
2013-12-03 Michael Sperber <mike(a)xemacs.org>
* timer.el (timer-activate-when-idle): Only call `activate-timer'
on non-active-timers.
Affected #: 2 files
diff -r 9ca2a22d7c9445bb86ea46d702faf681d22bc78b -r
62743319f0c0cdf939832d8d6101c5273b1e8c90 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-03 Michael Sperber <mike(a)xemacs.org>
+
+ * timer.el (timer-activate-when-idle): Only call `activate-timer'
+ on non-active-timers.
+
2013-02-20 Michael Sperber <mike(a)xemacs.org>
* overlay.el (copy-overlay, remove-overlays): Add functions from
diff -r 9ca2a22d7c9445bb86ea46d702faf681d22bc78b -r
62743319f0c0cdf939832d8d6101c5273b1e8c90 timer.el
--- a/timer.el
+++ b/timer.el
@@ -113,8 +113,10 @@
(defun timer-activate-when-idle (timer &optional dont-wait)
"Arrange to activate TIMER whenever Emacs is next idle.
DONT-WAIT is for Emacs compatibility and is currently ignored."
- (set-itimer-is-idle timer t)
- (activate-itimer timer))
+ (when (and (not (itimer-live-p timer))
+ (not (get-itimer (itimer-name timer))))
+ (set-itimer-is-idle timer t)
+ (activate-itimer timer)))
;; can't do this, different kind of timer
;;(defalias 'disable-timeout 'cancel-timer)
Repository URL:
https://bitbucket.org/xemacs/fsf-compat/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches