aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2020-03-25 17:40:57 -0700
committerPaul Eggert2020-03-25 18:38:07 -0700
commite4b6151ff119f36c64d3653b56f761fcdfe47fd3 (patch)
treea1e0c516bb6fa75b46aed2e217b065c9fa9fb144 /lisp
parentd08c9472e821615da06f92756e49c271be8da7f1 (diff)
downloademacs-e4b6151ff119f36c64d3653b56f761fcdfe47fd3.tar.gz
emacs-e4b6151ff119f36c64d3653b56f761fcdfe47fd3.zip
Fix integer overflow in forward-point
* lisp/subr.el (forward-point): Rewrite in Lisp and move here ... * src/cmds.c (Fforward_point): ... from here. This fixes an integer overflow bug with (forward-point most-positive-fixnum).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 123557e736b..70f33ee5bdb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1558,7 +1558,6 @@ be a list of the form returned by `event-start' and `event-end'."
1558 1558
1559;;;; Obsolescent names for functions. 1559;;;; Obsolescent names for functions.
1560 1560
1561(make-obsolete 'forward-point "use (+ (point) N) instead." "23.1")
1562(make-obsolete 'buffer-has-markers-at nil "24.3") 1561(make-obsolete 'buffer-has-markers-at nil "24.3")
1563 1562
1564(make-obsolete 'invocation-directory "use the variable of the same name." 1563(make-obsolete 'invocation-directory "use the variable of the same name."
@@ -1580,6 +1579,11 @@ be a list of the form returned by `event-start' and `event-end'."
1580(make-obsolete 'string-as-multibyte "use `decode-coding-string'." "26.1") 1579(make-obsolete 'string-as-multibyte "use `decode-coding-string'." "26.1")
1581(make-obsolete 'string-make-multibyte "use `decode-coding-string'." "26.1") 1580(make-obsolete 'string-make-multibyte "use `decode-coding-string'." "26.1")
1582 1581
1582(defun forward-point (n)
1583 "Return buffer position N characters after (before if N negative) point."
1584 (declare (obsolete "use (+ (point) N) instead." "23.1"))
1585 (+ (point) n))
1586
1583(defun log10 (x) 1587(defun log10 (x)
1584 "Return (log X 10), the log base 10 of X." 1588 "Return (log X 10), the log base 10 of X."
1585 (declare (obsolete log "24.4")) 1589 (declare (obsolete log "24.4"))