diff options
| author | Stefan Monnier | 2013-10-03 00:41:23 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-03 00:41:23 -0400 |
| commit | 328a8179fec33f5a75e2cfe22e43f4ec0df770b7 (patch) | |
| tree | 1c58ada4da59ca904b6afba923eb6159665a1655 | |
| parent | 15a1e936a0c2bf239d71239bb9899a9177599973 (diff) | |
| download | emacs-328a8179fec33f5a75e2cfe22e43f4ec0df770b7.tar.gz emacs-328a8179fec33f5a75e2cfe22e43f4ec0df770b7.zip | |
* lisp/subr.el (decode-char, encode-char): Use advertised-calling-convention
instead of the docstring to discourage use of the `restriction' arg.
(error): Use `declare'.
* src/charset.c (Fdecode_char, Fencode_char): Remove description of
`restriction' arg. now that it's hidden by advertised-calling-convention.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/subr.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/charset.c | 10 |
4 files changed, 21 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9fa9d0c5076..a0eeb4a47bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * subr.el (error): Use `declare'. | ||
| 4 | (decode-char, encode-char): Use advertised-calling-convention instead | ||
| 5 | of the docstring to discourage use of the `restriction' arg. | ||
| 6 | |||
| 1 | 2013-10-03 Daiki Ueno <ueno@gnu.org> | 7 | 2013-10-03 Daiki Ueno <ueno@gnu.org> |
| 2 | 8 | ||
| 3 | * epg.el (epg-verify-file): Add a comment saying that it does not | 9 | * epg.el (epg-verify-file): Add a comment saying that it does not |
diff --git a/lisp/subr.el b/lisp/subr.el index ba240a27064..ba953656b81 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -301,9 +301,9 @@ This function accepts any number of arguments, but ignores them." | |||
| 301 | In Emacs, the convention is that error messages start with a capital | 301 | In Emacs, the convention is that error messages start with a capital |
| 302 | letter but *do not* end with a period. Please follow this convention | 302 | letter but *do not* end with a period. Please follow this convention |
| 303 | for the sake of consistency." | 303 | for the sake of consistency." |
| 304 | (declare (advertised-calling-convention (string &rest args) "23.1")) | ||
| 304 | (while t | 305 | (while t |
| 305 | (signal 'error (list (apply 'format args))))) | 306 | (signal 'error (list (apply 'format args))))) |
| 306 | (set-advertised-calling-convention 'error '(string &rest args) "23.1") | ||
| 307 | 307 | ||
| 308 | (defun user-error (format &rest args) | 308 | (defun user-error (format &rest args) |
| 309 | "Signal a pilot error, making error message by passing all args to `format'. | 309 | "Signal a pilot error, making error message by passing all args to `format'. |
| @@ -1246,6 +1246,8 @@ is converted into a string by expressing it in decimal." | |||
| 1246 | 'all-completions '(string collection &optional predicate) "23.1") | 1246 | 'all-completions '(string collection &optional predicate) "23.1") |
| 1247 | (set-advertised-calling-convention 'unintern '(name obarray) "23.3") | 1247 | (set-advertised-calling-convention 'unintern '(name obarray) "23.3") |
| 1248 | (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3") | 1248 | (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3") |
| 1249 | (set-advertised-calling-convention 'decode-char '(ch charset) "21.4") | ||
| 1250 | (set-advertised-calling-convention 'encode-char '(ch charset) "21.4") | ||
| 1249 | 1251 | ||
| 1250 | ;;;; Obsolescence declarations for variables, and aliases. | 1252 | ;;;; Obsolescence declarations for variables, and aliases. |
| 1251 | 1253 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 6af5b2ee086..c201df19851 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * charset.c (Fdecode_char, Fencode_char): Remove description of | ||
| 4 | `restriction' arg. now that it's hidden by advertised-calling-convention. | ||
| 5 | |||
| 1 | 2013-10-02 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2013-10-02 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * macfont.m (mac_ctfont_create_preferred_family_for_attributes): Remove | 8 | * macfont.m (mac_ctfont_create_preferred_family_for_attributes): |
| 4 | unised variable (from mac-port). | 9 | Remove unused variable (from mac-port). |
| 5 | (macfont_draw): Use s->ybase for correct y position. | 10 | (macfont_draw): Use s->ybase for correct y position. |
| 6 | 11 | ||
| 7 | 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru> | 12 | 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru> |
| @@ -52,7 +57,7 @@ | |||
| 52 | (ns_term_init): Remove assignment of ns_selection_color, logic | 57 | (ns_term_init): Remove assignment of ns_selection_color, logic |
| 53 | moved to ns_get_color. | 58 | moved to ns_get_color. |
| 54 | 59 | ||
| 55 | * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Renamed from | 60 | * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from |
| 56 | NS_SELECTION_COLOR_DEFAULT. | 61 | NS_SELECTION_COLOR_DEFAULT. |
| 57 | (NS_SELECTION_FG_COLOR_DEFAULT): New. | 62 | (NS_SELECTION_FG_COLOR_DEFAULT): New. |
| 58 | 63 | ||
| @@ -240,8 +245,8 @@ | |||
| 240 | (vroundup_ct): New macro. | 245 | (vroundup_ct): New macro. |
| 241 | (vroundup): Assume argument >= 0; invoke vroundup_ct. | 246 | (vroundup): Assume argument >= 0; invoke vroundup_ct. |
| 242 | * casetab.c (shuffle,set_identity): Change lint_assume to assume. | 247 | * casetab.c (shuffle,set_identity): Change lint_assume to assume. |
| 243 | * composite.c (composition_gstring_put_cache): Change | 248 | * composite.c (composition_gstring_put_cache): |
| 244 | lint_assume to assume. | 249 | Change lint_assume to assume. |
| 245 | * conf_post.h (assume): New macro. | 250 | * conf_post.h (assume): New macro. |
| 246 | (lint_assume): Remove. | 251 | (lint_assume): Remove. |
| 247 | * dispnew.c (update_frame_1): Change lint_assume to assume. | 252 | * dispnew.c (update_frame_1): Change lint_assume to assume. |
diff --git a/src/charset.c b/src/charset.c index ef040a94605..4a36f8059ae 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1860,10 +1860,7 @@ DEFUN ("decode-char", Fdecode_char, Sdecode_char, 2, 3, 0, | |||
| 1860 | doc: /* Decode the pair of CHARSET and CODE-POINT into a character. | 1860 | doc: /* Decode the pair of CHARSET and CODE-POINT into a character. |
| 1861 | Return nil if CODE-POINT is not valid in CHARSET. | 1861 | Return nil if CODE-POINT is not valid in CHARSET. |
| 1862 | 1862 | ||
| 1863 | CODE-POINT may be a cons (HIGHER-16-BIT-VALUE . LOWER-16-BIT-VALUE). | 1863 | CODE-POINT may be a cons (HIGHER-16-BIT-VALUE . LOWER-16-BIT-VALUE). */) |
| 1864 | |||
| 1865 | Optional argument RESTRICTION specifies a way to map the pair of CCS | ||
| 1866 | and CODE-POINT to a character. Currently not supported and just ignored. */) | ||
| 1867 | (Lisp_Object charset, Lisp_Object code_point, Lisp_Object restriction) | 1864 | (Lisp_Object charset, Lisp_Object code_point, Lisp_Object restriction) |
| 1868 | { | 1865 | { |
| 1869 | int c, id; | 1866 | int c, id; |
| @@ -1880,10 +1877,7 @@ and CODE-POINT to a character. Currently not supported and just ignored. */) | |||
| 1880 | 1877 | ||
| 1881 | DEFUN ("encode-char", Fencode_char, Sencode_char, 2, 3, 0, | 1878 | DEFUN ("encode-char", Fencode_char, Sencode_char, 2, 3, 0, |
| 1882 | doc: /* Encode the character CH into a code-point of CHARSET. | 1879 | doc: /* Encode the character CH into a code-point of CHARSET. |
| 1883 | Return nil if CHARSET doesn't include CH. | 1880 | Return nil if CHARSET doesn't include CH. */) |
| 1884 | |||
| 1885 | Optional argument RESTRICTION specifies a way to map CH to a | ||
| 1886 | code-point in CCS. Currently not supported and just ignored. */) | ||
| 1887 | (Lisp_Object ch, Lisp_Object charset, Lisp_Object restriction) | 1881 | (Lisp_Object ch, Lisp_Object charset, Lisp_Object restriction) |
| 1888 | { | 1882 | { |
| 1889 | int c, id; | 1883 | int c, id; |