Commit graph

142 commits

Author SHA1 Message Date
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
29b51f0457 split parser.c from qe.c
* store config parser as separate source file parser.c
2014-02-02 14:29:36 +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
645b9c1aeb cosmetic changes
* report lack of undo information in do_undo and do_redo
* make region command remove region highlight
2014-01-31 14:50:13 +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
2c6e5f4c2c cosmetic changes: messages should start with capital letter 2014-01-29 23:28:38 +00:00
Charlie Gordon
acf421085a fix compilation warnings 2014-01-25 09:21:48 +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
e8eee25183 fix c89 compile for Haiku (from Francois Revol) 2014-01-18 14:57:21 +00:00
Charlie Gordon
17b2c69145 fix problems with do_transpose and compute_crc
* improve compute_crc: no longer fail on simple 1 character transposition
* remove limitations on block size in do_transpose
* preserve styles in do_transpose
2014-01-17 13:19:14 +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
46cf177d9b fix bug in write-file command
* write-file no longer fails on unmodified buffers
2014-01-13 11:57:28 +00:00
Charlie Gordon
9e97be7022 improve minibuffer completion system
* fix utf8 issues with completion, no longer match partial characters
* fix missing focus on completion popup upon first display
* close completion popup on space/tab
2014-01-13 11:53:19 +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
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
3dc8691a68 fixed crash in recursive help popup 2014-01-07 14:34:17 +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
f939ce7181 small improvements
* show new charset in set-buffer-file-coding-system
* do not use double negative if/else constructs
* ignore new extensions in file_completion
* pass filename to probe_mode, no longer need buffer reference
* fix support for line drawing characters in utf8 shell window
2014-01-05 12:51:41 +00:00
Charlie Gordon
3f2dfb08c0 fix do_goto for hex encoded offsets in chars and bytes 2014-01-04 17:35:12 +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
70eeae2309 support +line_num cmdline syntax in front of filenames 2013-12-27 02:04:21 +00:00
Charlie Gordon
7759a1467a simplified edit_set_mode API, display mode in bufed 2013-12-27 01:54:12 +00:00
Charlie Gordon
ae7e2089fb warning about potential problem with signed errors in unused code 2013-12-24 16:10:52 +00:00
Charlie Gordon
9434c3ba7b renamed functions for consistency 2013-12-23 23:26:43 +00:00
Charlie Gordon
0a90a0e83f added configure variables for portability (Haiku from Francois Revel)
Added datadir and mandir for systems that use different directory trees
In Haiku we don't have share/ at the usual prefix, and man pages are in
documentation/man/... So we need to pass those to configure.
This patch adds --datadir and --mandir support, the autofools way.
2013-12-21 16:24:38 +00:00
Charlie Gordon
357cf51a52 display error msg or new current directory in cd command 2013-12-03 17:38:16 +00:00
Charlie Gordon
c2155e1d7b added feedback for change-directory command 2013-11-30 12:12:40 +00:00
Charlie Gordon
9a684a9c25 patch for OS/X to expand user home dir to /Users/xxx instead of /home/xxx
this is a poor solution, should use a more generic method.
2013-11-28 15:52:38 +00:00
Charlie Gordon
ba06d7883e fixed gcc 4.7 warnings about variables set but unused 2013-11-23 19:11:13 +00:00
Charlie Gordon
9bd2dfd515 fixed const warning on CmdArg deletion 2013-11-23 10:53:13 +00:00
Charlie Gordon
090f2202d5 more informative status messages 2009-04-20 08:12:31 +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
cd610d839f got rid of some ugly casts 2008-04-24 11:43:15 +00:00