* src/fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.

* lisp/calc/calc-alg.el (math-beforep):
* lisp/progmodes/cc-guess.el (c-guess-view-reorder-offsets-alist-in-style):
Simplify because string-lessp can accept symbols as args.
This commit is contained in:
Dmitry Antipov 2014-06-26 11:13:13 +04:00
parent 51a3c85711
commit 6e5a5743dd
5 changed files with 15 additions and 19 deletions

View file

@ -1,3 +1,9 @@
2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
* calc/calc-alg.el (math-beforep):
* progmodes/cc-guess.el (c-guess-view-reorder-offsets-alist-in-style):
Simplify because string-lessp can accept symbols as args.
2014-06-26 Daiki Ueno <ueno@gnu.org>
* emacs-lisp/package.el (package--check-signature): If

View file

@ -293,7 +293,7 @@
(Math-objectp a))
((eq (car a) 'var)
(if (eq (car b) 'var)
(string-lessp (symbol-name (nth 1 a)) (symbol-name (nth 1 b)))
(string-lessp (nth 1 a) (nth 1 b))
(not (Math-numberp b))))
((eq (car b) 'var) (Math-numberp a))
((eq (car a) (car b))
@ -302,7 +302,7 @@
(and b
(or (null a)
(math-beforep (car a) (car b)))))
(t (string-lessp (symbol-name (car a)) (symbol-name (car b))))))
(t (string-lessp (car a) (car b)))))
(defsubst math-simplify-extended (a)

View file

@ -504,8 +504,7 @@ is called with one argument, the guessed style."
(cond
((or (and a-guessed? b-guessed?)
(not (or a-guessed? b-guessed?)))
(string-lessp (symbol-name (car a))
(symbol-name (car b))))
(string-lessp (car a) (car b)))
(a-guessed? t)
(b-guessed? nil)))))))
style)

View file

@ -1,3 +1,7 @@
2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
* fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
Consistently use validate_subarray to verify substring.

View file

@ -268,21 +268,8 @@ If string STR1 is greater, the value is a positive number N;
characters, not just the bytes. */
int c1, c2;
if (STRING_MULTIBYTE (str1))
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c1, str1, i1, i1_byte);
else
{
c1 = SREF (str1, i1++);
MAKE_CHAR_MULTIBYTE (c1);
}
if (STRING_MULTIBYTE (str2))
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c2, str2, i2, i2_byte);
else
{
c2 = SREF (str2, i2++);
MAKE_CHAR_MULTIBYTE (c2);
}
FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c1, str1, i1, i1_byte);
FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c2, str2, i2, i2_byte);
if (c1 == c2)
continue;