[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r112890: Improve previous bytecomp fix
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r112890: Improve previous bytecomp fix |
Date: |
Sat, 08 Jun 2013 01:35:56 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112890
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2013-06-07 18:35:47 -0700
message:
Improve previous bytecomp fix
* lisp/emacs-lisp/bytecomp.el (byte-compile-char-before)
(byte-compile-backward-char, byte-compile-backward-word):
Improve previous change, to handle non-explicit nil.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-08 00:56:22 +0000
+++ b/lisp/ChangeLog 2013-06-08 01:35:47 +0000
@@ -1,3 +1,9 @@
+2013-06-08 Glenn Morris <address@hidden>
+
+ * emacs-lisp/bytecomp.el (byte-compile-char-before)
+ (byte-compile-backward-char, byte-compile-backward-word):
+ Improve previous change, to handle non-explicit nil.
+
2013-06-07 Stefan Monnier <address@hidden>
* emacs-lisp/smie.el: Improve show-paren-mode behavior.
=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el 2013-06-06 21:04:43 +0000
+++ b/lisp/emacs-lisp/bytecomp.el 2013-06-08 01:35:47 +0000
@@ -3446,6 +3446,7 @@
(byte-defop-compiler (/ byte-quo) byte-compile-quo)
(byte-defop-compiler nconc)
+;; Is this worth it? Both -before and -after are written in C.
(defun byte-compile-char-before (form)
(cond ((or (= 1 (length form))
(and (= 2 (length form)) (not (nth 1 form))))
@@ -3453,10 +3454,12 @@
((= 2 (length form))
(byte-compile-form (list 'char-after (if (numberp (nth 1 form))
(1- (nth 1 form))
- `(1- ,(nth 1 form))))))
+ `(1- (or ,(nth 1 form)
+ (point)))))))
(t (byte-compile-subr-wrong-args form "0-1"))))
;; backward-... ==> forward-... with negated argument.
+;; Is this worth it? Both -backward and -forward are written in C.
(defun byte-compile-backward-char (form)
(cond ((or (= 1 (length form))
(and (= 2 (length form)) (not (nth 1 form))))
@@ -3464,7 +3467,7 @@
((= 2 (length form))
(byte-compile-form (list 'forward-char (if (numberp (nth 1 form))
(- (nth 1 form))
- `(- ,(nth 1 form))))))
+ `(- (or ,(nth 1 form) 1))))))
(t (byte-compile-subr-wrong-args form "0-1"))))
(defun byte-compile-backward-word (form)
@@ -3474,7 +3477,7 @@
((= 2 (length form))
(byte-compile-form (list 'forward-word (if (numberp (nth 1 form))
(- (nth 1 form))
- `(- ,(nth 1 form))))))
+ `(- (or ,(nth 1 form) 1))))))
(t (byte-compile-subr-wrong-args form "0-1"))))
(defun byte-compile-list (form)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r112890: Improve previous bytecomp fix,
Glenn Morris <=