fsf-compat / overlay.el

Diff from to


 (defsubst overlay-normalize-begin-end-buffer (beg end &optional buffer)
-  "BEG and END will be normalized so 1 <= BEG <= END <= \(1+ \(length BUFFER)).
+  "Normalize BEG and END so that 1 <= BEG <= END <= \(1+ \(length BUFFER)).
 If BUFFER is nil, the current buffer is assumed.  If BEG is
-greater than END, exchange their value."
+greater than END, exchange their value.
-  (if (null buffer)
-      (setq buffer (current-buffer))
-    (check-argument-type 'bufferp buffer))
+Returns values BEG END BUFFER.  See `multiple-value-setq' and
+`multiple-value-bind'. "
+  (check-argument-type #'bufferp (setq buffer (or buffer (current-buffer))))
   (setq beg (overlay-normalize-pos beg buffer)
 	end (overlay-normalize-pos end buffer))
   (when (> beg end)
     (setq beg (prog1 end (setq end beg))))
-  (values beg end))
+  (values beg end buffer))
 (defun make-overlay (beg end &optional buffer front-advance rear-advance)
   "Create a new overlay with range BEG to END in BUFFER.