1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -08:00
Commit graph

650 commits

Author SHA1 Message Date
Jan D
f57e2426f0 Remove __P and P_ from .c and .m files and definition of P_
* lisp.h:
* atimer.h: Remove define for P_.

* alloc.c: Remove __P and P_ from .c and .m files.
* atimer.c:
* buffer.c:
* callint.c:
* category.c:
* charset.c:
* chartab.c:
* cm.c:
* coding.c:
* composite.c:
* data.c:
* dired.c:
* dispnew.c:
* doc.c:
* editfns.c:
* emacs.c:
* eval.c:
* fileio.c:
* filelock.c:
* fns.c:
* font.c:
* fontset.c:
* frame.c:
* ftfont.c:
* ftxfont.c:
* gmalloc.c:
* gtkutil.c:
* image.c:
* indent.c:
* intervals.c:
* keyboard.c:
* keymap.c:
* lread.c:
* marker.c:
* menu.c:
* minibuf.c:
* print.c:
* process.c:
* scroll.c:
* search.c:
* sound.c:
* strftime.c:
* syntax.c:
* sysdep.c:
* term.c:
* terminal.c:
* textprop.c:
* unexalpha.c:
* w32console.c:
* w32fns.c:
* w32font.c:
* w32menu.c:
* w32term.c:
* w32uniscribe.c:
* window.c:
* xdisp.c:
* xfaces.c:
* xfns.c:
* xfont.c:
* xftfont.c:
* xmenu.c:
* xselect.c:
* xterm.c: Likewise.

* ebrowse.c: Remove P_ and __P.
* etags.c:
* movemail.c:
* pop.c:
* update-game-score.c: Likewise.
2010-07-02 14:19:53 +02:00
Stefan Monnier
ce5b453a44 Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that.  This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
2010-04-19 21:50:52 -04:00
Kenichi Handa
fb608df3c6 Fix the ccl encoder for the case that the output buffer is fullfilled. 2010-03-16 14:48:41 +09:00
Kenichi Handa
fbdc17211b coding.c (decode_coding_ccl): Fix previous change for the multibyte case. 2010-03-16 11:14:40 +09:00
Eli Zaretskii
685ebdc8b1 (emacs_mule_char): Fix a typo in commentary. 2010-03-02 23:43:50 +02:00
Eli Zaretskii
75f80e63ca Fix bug in decoding emacs-mule encoding.
coding.c (decode_coding_emacs_mule): Fixup pointers to buffer
 text that could be relocated inside the call to emacs_mule_char.
 (emacs_mule_char): Use CODING_DECODE_CHAR instead of DECODE_CHAR.
 (CODING_DECODE_CHAR): Add a comment describing its purpose.
2010-03-02 22:35:44 +02:00
Kenichi Handa
ebaf11b608 Fix handling of CODING_RESULT_INSUFFICIENT_DST. 2010-02-18 11:27:25 +09:00
Kenichi Handa
d0396581d5 Fix the ccl decoder for the case that the output buffer is fullfilled. 2010-02-17 15:47:32 +09:00
Kenichi Handa
4d1e6632e7 Fix ccl encoding of unibyte source. 2010-01-20 11:33:52 +09:00
Kenichi Handa
d12bd91784 Fix handling of euc-xx coding systems. 2010-01-14 20:31:16 +09:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Kenichi Handa
a63dba4250 (decode_coding_iso_2022): Ignore ISO_CODE_SS2_7 (0x19)
in 8-bit encoding.
2009-12-14 01:20:29 +00:00
Dan Nicolaescu
9143355208 * process.c (ifflag_def): Make flag_sym constant.
(Fnetwork_interface_info): Use a constant pointer.
(ifflag_table):
* xfns.c (cursor_bits):
* xdisp.c (power_letter):
* termcap.c (speeds, esctab):
* sysdep.c (baud_convert):
* keyboard.c (lispy_accent_codes, modifier_names):
* image.c (xbm_format, xpm_format, pbm_format, png_format)
(jpeg_format, tiff_format, gif_format, svg_format)
(interlace_start, interlace_increment, gs_format):
* gtkutil.c (separator_names):
* fringe.c (swap_nibble):
* fns.c (base64_value_to_char, base64_char_to_value):
* fileio.c (make_temp_name_tbl):
* coding.c (suffixes): Make constant.
2009-11-11 20:11:51 +00:00
Dan Nicolaescu
d67b4f80db * xterm.c (syms_of_xterm):
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string.  Use pure_cons instead of Fcons.

* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.

* image.c: Move png.h #include earlier to avoid warnings.

* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h.  (Bug#4643)

* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Andreas Schwab
de59072a63 (decode_coding_iso_2022): Fix operator precedence. 2009-09-24 08:18:40 +00:00
Kenichi Handa
60afa08d41 (encode_coding_utf_16): Fix checking of an Unicode character. 2009-08-27 07:30:51 +00:00
Kenichi Handa
f07190ca1f (detect_coding_sjis): Handle shift_jis-2004 correctly.
(encode_coding_sjis): Fix the code range check.
2009-07-08 02:22:05 +00:00
Kenichi Handa
624bda0987 (setup_coding_system): Initialize
coding->carryover_bytes to 0.
(Fset_keyboard_coding_system_internal): If CODING-SYSTEM is nil,
use Qno_conversion.
2009-07-01 11:35:07 +00:00
YAMAMOTO Mitsuharu
0e727afa9d (Ffind_coding_systems_region_internal): Cache checked characters. 2009-06-19 08:39:44 +00:00
Kenichi Handa
cf299835b1 (decode_coding_iso_2022): Check MSB of bytes more rigidly. 2009-06-18 10:29:51 +00:00
Kenichi Handa
7f1faf1cc2 (detect_coding_utf_16): Fix previous change. 2009-06-17 00:42:17 +00:00
Kenichi Handa
cc13543e84 (detect_coding_utf_16): Fix previous change. 2009-06-16 02:04:25 +00:00
Kenichi Handa
9c6d2887cd (detect_coding_utf_16): Fix the logic of rejecting
UTF-16 by checking the dispersion of Eth and Oth bytes.
2009-06-16 01:17:10 +00:00
Andreas Schwab
977b85f4d9 (detect_coding_utf_16): Fix typo counting odd bytes. 2009-06-15 21:36:44 +00:00
Chong Yidong
4bed590990 * coding.c (get_translation_table): Check Venable_character_translation. 2009-06-04 01:06:04 +00:00
Andreas Schwab
409ea3a1dd (record_conversion_result): Don't modify
Vlast_code_conversion_error for successful result.
(alloc_destination): Don't clobber conversion result.  (Bug#1650)
2009-05-02 11:32:42 +00:00
Chong Yidong
708e05dc7a * keyboard.c (Fset_input_meta_mode): Doc fix.
* dispnew.c (Fsend_string_to_terminal): Doc fix.

* data.c (Fterminal_local_value, Fset_terminal_local_value): Doc
fixes.

* coding.c (Fterminal_coding_system): Doc fix.

* xfns.c (Fx_display_grayscale_p, Fx_display_pixel_width)
(Fx_display_pixel_height, Fx_display_planes)
(Fx_display_color_cells, Fx_server_max_request_size)
(Fx_server_vendor, Fx_server_version, Fx_display_screens)
(Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, Fx_synchronize): Doc
fixes, replacing "terminal id" with "terminal object".
(check_x_display_info): Handle terminal objects instead of
terminal ids.
2009-04-22 04:32:21 +00:00
Kenichi Handa
df80c7f014 (decode_coding_utf_16): Reduce charbuf_end for the
worst case.
(decode_coding_emacs_mule, decode_coding_iso_2022)
(decode_coding_sjis, decode_coding_big5, decode_coding_charset):
Likewise.
2009-04-21 06:36:21 +00:00
Kenichi Handa
67ceab9df4 (Fdetect_coding_string): Improve the docstrings. 2009-03-27 07:26:37 +00:00
Kenichi Handa
b811c52b91 (Fdetect_coding_region, Fcoding_system_priority_list): Improve the
docstrings.
2009-03-27 07:25:44 +00:00
Kenichi Handa
e951386e38 (CODING_ISO_CMP_STATUS): New macro.
(CODING_ISO_EXTSEGMENT_LEN, CODING_ISO_EMBEDDED_UTF_8): New macros.
(MAX_ANNOTATION_LENGTH): Defined to 5.
(ADD_COMPOSITION_DATA): New arg nbytes.
(emacs_mule_char): New arg cmp_status.
(DECODE_EMACS_MULE_COMPOSITION_CHAR): Delete it.
(DECODE_EMACS_MULE_COMPOSITION_RULE_20): New arg c.
(DECODE_EMACS_MULE_COMPOSITION_RULE_21): New arg c.
(DECODE_EMACS_MULE_21_COMPOSITION): Delete the arg c.
(DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_COMPOSITION_START): New macro.
(EMACS_MULE_COMPOSITION_END): New macro.
(emacs_mule_finish_composition): New function.
(EMACS_MULE_MAYBE_FINISH_COMPOSITION): New macro.
(decode_coding_emacs_mule): Avoid long looking ahead while
handling composition.
(DECODE_COMPOSITION_RULE): Argument changed to rule and nbytes.
(ENCODE_COMPOSITION_RULE): New macro.
(finish_composition): New function.
(MAYBE_FINISH_COMPOSITION): Call finish_composition.
(DECODE_COMPOSITION_START): New implementation.
(DECODE_COMPOSITION_END): Likewise.
(STORE_COMPOSITION_RULE): New macro.
(decode_coding_iso_2022): Avoid long looking ahead while handling
composition, CTEXT extended segment, and embedded UTF-8.
(setup_coding_system): For a coding of type iso-2022, reset
CODING_ISO_EXTSEGMENT_LEN (coding) and
CODING_ISO_EMBEDDED_UTF_8 (coding).
(get_translation): Delete arguments last_block, from_nchars,
to_nchars.  Callers changed.
(produce_chars): Don't modify charbuf.  Adjusted for the change of
get_translation.
(produce_composition): Adjusted for the new annotation sequence.
(handle_composition_annotation): Likewise.
(consume_chars): Adjusted for the change of get_translation.
2009-03-06 07:51:52 +00:00
Eli Zaretskii
0a9564cb01 (decode_coding_utf_8, decode_coding_utf_16, decode_coding_emacs_mule,
decode_coding_iso_2022, encode_coding_iso_2022, decode_coding_sjis,
decode_coding_big5, decode_coding_raw_text, decode_coding_charset,
setup_coding_system, decode_eol, decode_coding, consume_chars): Honor
inhibit-eol-conversion.  (Bug #2186)
2009-02-28 15:53:11 +00:00
Jason Rumney
237aabf40e (detect_coding_charset): Fix last change for non-latin charsets. 2009-02-28 13:52:03 +00:00
Jason Rumney
9f0526cb4b (detect_coding_charset): If not checking latin extra,
fail on characters between 0x80 and 0xA0.  (Bug#2354)
2009-02-28 13:37:33 +00:00
Eli Zaretskii
a4aee864ad (detect_coding_charset): Fix change from 2008-10-21.
Also, check iso-latin-*, not only iso-8859-*.
2009-02-28 12:05:36 +00:00
Andreas Schwab
1b3b981ba9 * coding.h (struct coding_system): Make safe_charsets a pointer to
unsigned char.
* coding.c (CODING_ISO_REQUEST): Check for safe_charsets content
being 255.
(SAFE_CHARSET_P): Likewise.
(setup_iso_safe_charsets): Properly setup safe_charsets.
(Fdefine_coding_system_internal): Likewise.
(setup_coding_system): Likewise.  Remove unneeded casts.
(detect_coding_iso_2022): Compare Viso_2022_charset_list with
CODING_ATTR_CHARSET_LIST, not CODING_ATTR_SAFE_CHARSETS.  Remove
unneeded casts.
2009-02-22 15:48:02 +00:00
Kenichi Handa
f289d37532 (detect_coding): Don't overflow coding->carryover. 2009-02-19 04:24:54 +00:00
Kenichi Handa
73cce38dbc (detect_coding): Preserve coding->mode. 2009-02-19 02:43:38 +00:00
Andreas Schwab
4c1958f4a9 (Fcheck_coding_systems_region): Fix test for unibyte
string.
2009-02-16 13:04:15 +00:00
Kenichi Handa
5704f39a80 (Fcheck_coding_systems_region): Fix typo; Qt -> Qnil. 2009-02-16 11:53:52 +00:00
Juanma Barranquero
8510724d46 Remove spurious semicolons. 2009-02-11 09:45:12 +00:00
Kenichi Handa
cb84a2bed1 (detect_coding_charset): Fix previous change. 2009-02-09 00:45:17 +00:00
Eli Zaretskii
8434d0b8c0 (syms_of_coding) <translation-table-for-input>: Modify doc string to
discourage use for character code unification.
2009-02-07 10:52:13 +00:00
Kenichi Handa
e9f91eced1 (coding_system_charset_list): New function. 2009-02-04 01:52:39 +00:00
Eli Zaretskii
75f4f1ac04 (detect_eol, decode_eol): Handle text with DOS-style EOLs that also has
stray ^M characters.
2009-01-30 15:46:03 +00:00
Kenichi Handa
4cddb209b4 (detect_coding_system): Fix handling of null_byte_fount. 2009-01-15 07:13:39 +00:00
Kenichi Handa
220eeac9e4 Fix previous changes. 2009-01-14 12:51:06 +00:00
Kenichi Handa
f56a445091 (TWO_MORE_BYTES): New macro.
(detect_coding_utf_16): Use TWO_MORE_BYTES instead of
ONE_MORE_BYTE.
2009-01-14 12:19:44 +00:00
Eli Zaretskii
97b1b294af Fix Bug #876:
(inhibit_null_byte_detection): New variable.
(detect_coding, detect_coding_system): Don't pay attention to null bytes if
inhibit_null_byte_detection is non-zero.
(syms_of_coding) <inhibit-null-byte-detection>: Declare and document.
<inhibit-iso-escape-detection>: Doc fix.
2009-01-10 10:41:23 +00:00