Commit graph

138 commits

Author SHA1 Message Date
Charlie Gordon
15ab1f9601 improve x11 clipboard support
* add eb_get_content_size() to compute size of buffer contents encoded in utf8
* simplify selection_send()
2014-02-07 15:56:15 +00:00
Charlie Gordon
6402058e14 ignore case when matching extensions.
* ignore case in match_extension() used for mode selection
2014-02-07 07:38:30 +00:00
Charlie Gordon
a7853b3dff add support for end of line types
* support 3 types of end of line: Unix, Dos and old style Mac
* detect eol type automatically in detect_charset
* set buffer eol_type together with charset
* transparently convert eol sequence to \n upon reading buffers
  characters in eb_nextc().
* transparently convert \n to eol sequence in eb_encode_uchar()
* handle eol types in convert-file-buffer-coding-system: either preserve
  current value or force it via charset suffix -unix, -doc and -mac
* change read_charset() to accept eol_type suffix
* add eol_type and eol_char to CharsetDecodeState
* change charset methods to take CharsetDecodeState instead of charset pointers
* display eol_type in mode line if not unix
2014-02-05 00:56:48 +00:00
Charlie Gordon
d0c2e1d3e6 replace unicode_to_charset with eb_encode_uchar
* prepare support for eol_type support by making char encoding buffer specific
* fix small bugs and unsafe cases.
* fix bug in eb_goto_pos for EBCDIC charsets
2014-02-04 22:47:31 +00:00
Charlie Gordon
6b0e73b689 compile parser.c separately
* publish parse_config_file() and parse_arg()
* change Makefile to compile objects for tiny version separately
2014-02-03 20:03:07 +00:00
Charlie Gordon
48c14ba824 add support for combining marks (accents)
* add qe_isaccent() to test for combining marks
* add do_combine_char() command to insert or remove combining marks
* fix some display glitches involving combining marks
* add expand_ligature() and combine_accent() to handle simple ligatures
* change do_what_cursor_position() to display combining marks
2014-02-01 12:49:06 +00:00
Charlie Gordon
87a1d39c9f cosmetic changes in buffer API
* make eb_insert return number of bytes inserted
* make eb_printf return number of bytes inserted (was length of utf8 string)
2014-01-31 12:14:13 +00:00
Charlie Gordon
57d44f9dda pass pointer to pointer to edit_close 2014-01-24 01:30:54 +00:00
Charlie Gordon
c5f56a0d5b Fix memory leaks and bad references detected by valgrind
* add free_font_cache()
* add css_free_colors()
* add unload_ligatures()
* add --free-all cmd line option to free memory upon exit for valgrind
* tty.c: fix off by 3 size in qe_realloc. Should be typed
* qe.c: fix invalid pointer reference upon destroying transient buffer
2014-01-24 00:46:26 +00:00
Charlie Gordon
e967914b5a improve consistency in new/delete methodology
* use qe_mallocz for all structures
* prevent spurious uses of malloc/free/realloc
* pass pointers to pointers to all deletion functions
* use consistent patterns for list deletions
* add more dependencies in Makefiles
2014-01-23 12:56:22 +00:00
Charlie Gordon
b953aaf811 improve consistency in buffer variables
* change tab-size to tab-width
* make tab-width a buffer variable
* add fill-column buffer variable
* add set-fill-column on C-x f
* add default-tab-width and default-fill-column global variables
* force indent-tabs-mode in makefile mode
* force tab-width to 8 in shell output buffers
2014-01-21 00:01:20 +00:00
Charlie Gordon
890af446cf simplify colorize_line functions: always pass NUL terminated line
* added ustrstart, ustrstr and ustristr utility functions
* simplified org_mode_colorize
2014-01-20 18:04:00 +00:00
Charlie Gordon
c0b4323ef9 merge eb_is_blank_line and eb_is_empty_line, simplify paragraph commands
* simplify eb_is_blank_line
* remove eb_is_empty_linek
* simplify paragraph commands with eb_is_blank_line
2014-01-19 17:25:02 +00:00
Charlie Gordon
571a96441b make new buffers use utf8 charset by default
* added BF_RAW flag for undo and styles buffers
2014-01-16 15:18:44 +00:00
Charlie Gordon
f545ee779b add do_mark_region, do_mark_paragraph
* add do_mark_region to set hilighted region
* add command mark-paragraph on M-h
* make command mark-whole-buffer display hilighted region
2014-01-16 14:28:28 +00:00
Charlie Gordon
2f98140860 add buf_put_key, buf_put_keys, use buf_t more consistently
* changed keytostr to buf_put_key using buf_t structure
* changed keys_to_str tp buf_put_keys using buf_t structure
* add buf_attach to initialize buf_t with non empty buffer
* simplify qe_list_bindings with inherit argument
2014-01-16 14:24:03 +00:00
Charlie Gordon
5e0256ead3 use buf_t in get_mode_line functions, add compute_percent
* add compute_percent to compute percentages safely and correctly
* changed get_mode_line API
* simplify code
2014-01-16 14:00:28 +00:00
Charlie Gordon
02da1bb7a1 add generic styles buffer from shell color mode
* styles_buffer hold static style info for each character in the buffer
* new buffer flags to create styles buffers with 1, 2 or 4 bytes per char
* copy static styles to the kill_ring and pasted them style enabled buffers
* preserve static styles in convert-buffer-file-coding-system
* display style bytes in bufed list
* add commands set-region-color, set-region-style, drop-styles
2014-01-15 19:44:24 +00:00
Charlie Gordon
c258955d08 improve undo system
* use bit 2 in b->save_log to suspend callbacks and logging during transient
  undo phase.
* dispatch callbacks before buffer modification (eb_delete)
* this fixes bugs in the undo system where some offsets were not properly
  updated, color buffer was shifted, cursor would get lost and sometimes
  crash would follow.
* buffer colors are not undone properly
* pass extra int argument to buffer callbacks
* make eb_offset_callback more generic: handle edge effect via extra arg.
  edge effect causes offset to move upon insertion at current value
* add new log variables log_last_char and last_log.
  use these to coalesce consecutive log records and make undo more efficient
* add new command "redo" on C-x C-_ and C-x r
* fix undo glitches in the process buffer, update cursor correctly upon redo
2014-01-14 03:29:36 +00:00
Charlie Gordon
4226224c4c improve kill / yank functions
* fix bug in do_kill that caused M-w to fail on read-only buffers
* pass base buffer to new_yank_buffer to initialize charset correctly
2014-01-13 11:28:00 +00:00
Charlie Gordon
3796d5d22e add BF_TRANSIENT buffer flag: buffer freed upon window close
* closing a window with a 'transient' buffer frees unless it is viewed in another window
2014-01-13 11:00:43 +00:00
Charlie Gordon
37b3edf206 improve unihex-mode
* determine hex dump width from max char value in buffer
* display byte offset in margin instead of char offset
* accept 0x1f in text-mode
* no longer output octal char value if not ASCII
2014-01-12 01:39:10 +00:00
Charlie Gordon
e454380c7e improve convert-buffer-file-coding-system
* preserve offset, mark and other buffer positions
* output message with new charset and buffer size
* add debug_flags (used for debugging only)
2014-01-12 01:18:45 +00:00
Charlie Gordon
82157e67bf extend eb_match_xxx APIs to update end offset 2014-01-11 15:07:14 +00:00
Charlie Gordon
592ab5ebc3 add some buffer APIs
* add buffer APIs for matching and inserting text:
  - eb_insert_str
  - eb_match_uchar
  - eb_match_str
  - eb_match_istr
* simplify eb_insert_utf8_buf: no longer accept -1 len
2014-01-11 14:38:30 +00:00
Charlie Gordon
6561901967 improve and publish lisp mode for recursive coloring
* publish lisp_mode for recursive coloring
* fix multi-line string coloring
* accept \" to escape quotes in strings
2014-01-10 01:09:26 +00:00
Charlie Gordon
9a58b44917 new character based APIs for buffers
* add eb_skip_chars
* rename eb_delete_nextc to eb_delete_uchar
* deprecate eb_line_pad
* use char based buffer API in orgmode
2014-01-08 16:26:44 +00:00
Charlie Gordon
2c725986f8 add support for CTRL('c') as command prefix
* add KEY_CTRLC(x) as compressed key combination
* bind shell-interrupt to C-c C-c
2014-01-07 14:44:23 +00:00
Charlie Gordon
ab445e4bc1 improve overwrite-mode
* accept universal argument: NO_ARG: toggle, ==0 insert, !=0 overwrite
* added insert-mode command
2014-01-06 10:24:26 +00:00
Charlie Gordon
deb6972ca3 better charset handling
* make eb_insert_buffer return the number of bytes inserted
* reset page bits upon charset change
* add eb_delete_nextc: delete one encoded character at offset
* add eb_insert_uchar: insert a unicode character with encoding
* add eb_insert_utf8_buf: insert a utf8 encoded buffer with conversion
* make eb_printf insert utf8 bytes with conversion
* add eb_insert_buffer_convert: copy chars between buffers with charset
  conversion
* handle charset conversion correctly in various places
* insert wide caracters from hex mode
* create most buffers as BF_UTF8 by default
* set kill-buffer charset to that of kill source
* convert charsets when yanking
* handle charsets in search/replace system
2014-01-06 09:40:20 +00:00
Charlie Gordon
c91bd12b8f simplified editing modes
* added colorize_func in ModeDef struct
* removed mode_init functions for most language modes
* other small improvements in mode_probe functions
* no need for get_basename in mode_probe functions
2014-01-05 23:42:54 +00:00
Charlie Gordon
2dbe907a64 move first_buffer_data_type to QEmacsState 2014-01-04 17:32:42 +00:00
Charlie Gordon
b3a709013a improve mode selection, cleanup
* pass ModeDef pointer to mode_probe functions
* add extensions field to mode structure
* rename ascii mode to binary mode
* rename mode variables and fields to more specific names
2014-01-04 17:26:30 +00:00
Charlie Gordon
02dec8bf1a added generic utility function unicode_glyph_tty_width in charset.c
* moved and improved code from tty_term_glyph_width
2014-01-02 11:28:30 +00:00
Charlie Gordon
7759a1467a simplified edit_set_mode API, display mode in bufed 2013-12-27 01:54:12 +00:00
Charlie Gordon
a3286d64ba simplified shell process interface, added ssh command
* more generic new_shell_buffer API, takes cmd, caption, flags
* added ssh command to open ssh connections
2013-12-24 23:42:10 +00:00
Charlie Gordon
9434c3ba7b renamed functions for consistency 2013-12-23 23:26:43 +00:00
Charlie Gordon
c05cee4e3d fixed compile warnings in gcc2 (for Haiku) 2013-12-19 01:00:14 +00:00
Charlie Gordon
68b4ba44ab fix for C++ compile (needed for Haiku)
renamed private structure members to priv_data
added casts on assignents from void* (OK in C, not in C++)
2013-12-17 16:06:35 +00:00
Charlie Gordon
c1833a2f53 added make_user_path to compute path relative to user HOME directory 2013-12-03 17:35:06 +00:00
Charlie Gordon
ee1282ef91 - added test for texi2html install to control doc build
- added config variable CONFIG_HAS_TYPEOF
- improved qe_free type checking with typeof
- fixed gcc 4.4.5 warning on strict anti-aliasing breakage
2013-11-23 10:55:20 +00:00
Charlie Gordon
62ee618b0d - added compile time test for qe_free argument type: must be pointer to pointer
- fixed crash bug in qe_unregister_binding1, missing indirection in qe_free argument
- added Darwin specific definition for 'end' (this is an ugly patch, to be removed)
- fixed crash bug in qe_set_variable, missing indirection in qe_free argument
2013-11-22 20:50:20 +00:00
Charlie Gordon
23cd92e91c fixed find-charset to use strxfind, implement strxfind correctly 2008-05-04 15:54:39 +00:00
Charlie Gordon
9cf6a3cb87 simplified buffer decoding methods: pass ptr in CharsetDecodeState 2008-05-02 17:05:38 +00:00
Charlie Gordon
e493a2e99c fixed many problems with charset encodings
added charset methods for buffer line and position computations
added QECharset fields for char_size and variable_size indicator
use charset's eol_char to count lines in buffers: this should fix EBCDIC support
added support for ucs2 and ucs4 little and big endian encodings
charset's decode_func call no longer be NULL
eb_nextc and eb_prev now require non NULL third parameter
2008-05-02 16:04:09 +00:00
Charlie Gordon
b82a15d4e4 added extra help functions:
added command apropos(string)
added command show-bindings(cmd_name)
moved describe-bindings to extras.c
added qe_get_prototype(CmdDef *d, char *buf, int size);
added an extra argument to qe_get_variable() to produce value as source
fixed typo on window variable window-height
fixed type mismatch on mode variable mode-name
added var_domain string array
added strquote conversion function with simplistic implementation
added history tags for all commands
2008-04-29 18:55:14 +00:00
Charlie Gordon
caf6950145 renamed CMD_ and CMDV to CMD2 and CMD3 for consistency 2008-04-25 10:46:58 +00:00
Charlie Gordon
ddf30b9d10 fixed compile/splint warning 2008-04-23 15:32:26 +00:00
Charlie Gordon
174c5a38fd renamed universal argument as numeric argument 2008-04-22 09:28:33 +00:00
Charlie Gordon
7bde58c799 renamed qe_collate -> qe_strcollate, cosmetics 2008-04-22 08:15:04 +00:00