Commit graph

129 commits

Author SHA1 Message Date
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
Charlie Gordon
a10c10ecf1 hide local data 2008-04-23 15:30:33 +00:00
Charlie Gordon
174c5a38fd renamed universal argument as numeric argument 2008-04-22 09:28:33 +00:00
Charlie Gordon
18d9c15b87 simple fix to highlight region in html, hex and other text modes 2008-04-22 08:21:23 +00:00
Charlie Gordon
3302819b5b small code reordering, added disabled exit_all_modules 2008-04-22 08:18:48 +00:00
Charlie Gordon
7bde58c799 renamed qe_collate -> qe_strcollate, cosmetics 2008-04-22 08:15:04 +00:00
Charlie Gordon
04ebeb7606 better separation of function pointers and void*
use CmdFunc typedef for generic command function pointers
no longer use \e for escape use \033 instead
use memcpy trick to prevent gcc warning on dlsym in -pedantic mode
2008-04-20 12:01:34 +00:00
Charlie Gordon
9e7ccb5423 fixed delete-char and backward-delete-char to append to kill buffer after a kill command 2008-04-19 09:03:58 +00:00
Charlie Gordon
24d4fda0aa split global key binding list into mode specific and global lists
added commands local-unset-key and global-unset-key
2008-04-18 14:39:07 +00:00
Charlie Gordon
62f320c7d5 added str_credits and str_version to share between usage and help 2008-04-17 08:15:19 +00:00
Charlie Gordon
58b5872c52 fixed OpenBSD compile issues:
- check OpenBSD as uname output
- no longer use strcpy, strcat, sprintf
- added CONFIG_PTSNAME to disable Unix98 API under BSD
- fixed crash bug in tty.c on empty window
2008-04-15 23:24:03 +00:00
Charlie Gordon
fa7b29d311 use blink for high intensity background color 2008-04-12 12:40:23 +00:00
Charlie Gordon
bdf7a89b29 comments 2008-04-10 21:21:14 +00:00
Charlie Gordon
0f862d64dd pass key to exec_command and call_func
added intrinsic command argument ki for last key pressed
simplified C electric keys: : ; { } invoke the same command c-electric-key
pass actual key to self-insert-command
handle M-d, M-DEL, M-p, M-n in shell mode
2008-04-08 09:25:16 +00:00