Mercurial > hg > xemacs-beta
diff lisp/obsolete.el @ 5863:15041705c196
Provide `char-code-limit', implement the GNU equivalent in terms of it.
src/ChangeLog addition:
2015-03-15 Aidan Kehoe <kehoea@parhasard.net>
* text.h: Make CHAR_CODE_LIMIT available as a #define.
* text.h (valid_ichar_p): Use it.
* text.c: Make a fixnum Vchar_code_limit available here.
* text.c (non_ascii_valid_ichar_p): Use CHAR_CODE_LIMIT.
* text.c (vars_of_text): Make `char-code-limit' available to
Lisp.
tests/ChangeLog addition:
2015-03-15 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el (test-chars):
Use char-code-limit explicitly here, instead of hardcoding the
corresponding values.
lisp/ChangeLog addition:
2015-03-16 Aidan Kehoe <kehoea@parhasard.net>
* obsolete.el (max-char):
Make this available for compatiblity with GNU, implement it in
terms of char-code-limit.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 16 Mar 2015 00:09:46 +0000 |
parents | 1fd684db4d45 |
children |
line wrap: on
line diff
--- a/lisp/obsolete.el Sun Mar 15 21:13:23 2015 +0000 +++ b/lisp/obsolete.el Mon Mar 16 00:09:46 2015 +0000 @@ -485,5 +485,15 @@ (make-obsolete 'remrassoc "use delete* with :test #'equal, :key #'cdr") (make-obsolete 'remrassq "use delete* with :test #'eq, :key #'cdr") +(defun max-char () + "Return a fixnum one less than `char-code-limit'. + +In contrast with GNU Emacs, this is not necessarily a valid character, but it +is an inclusive upper bound on the possible values returned by `char-int'." + (1- char-code-limit)) +(make-compatible + 'max-char + "consider `char-code-limit', which gives an exclusive upper bound") + (provide 'obsolete) ;;; obsolete.el ends here