+ (and copyright-limit
+ (if copyright-at-end-flag
+ (- (point) copyright-limit)
+ (+ (point) copyright-limit))))
+
+(defun copyright-re-search (regexp &optional bound noerror count)
+ "Re-search forward or backward depending on `copyright-at-end-flag'."
+ (if copyright-at-end-flag
+ (re-search-backward regexp bound noerror count)
+ (re-search-forward regexp bound noerror count)))
+
+(defun copyright-start-point ()
+ "Return point-min or point-max, depending on `copyright-at-end-flag'."
+ (if copyright-at-end-flag
+ (point-max)
+ (point-min)))
+
+(defun copyright-offset-too-large-p ()
+ "Return non-nil if point is too far from the edge of the buffer."
+ (when copyright-limit
+ (if copyright-at-end-flag
+ (< (point) (- (point-max) copyright-limit))
+ (> (point) (+ (point-min) copyright-limit)))))