* add `filenames` specification in `ModeDef` structures
* generic mode probing can match a list of filenames
* remove unneeded mode_probe functions
* this enables diff coloring on Makefile
* Fix `put_status`/`put_error` behavior
- use `put_error` instead of `put_status` for command errors
- prevent status message output to console during initialization
- use `put_error` for side effects in command errors
- add `&` prefix in status messages to force screen flush
- flush screen in `qe_display()`, remove redundant calls to `dpy_flush`
- fix gcc compilation errors and warnings
- remove most references to `global_screen`
- free font cache before closing the screen
- prevent mouse handling upon focus detection
* drop CI on macos-12
- rename `indent_size` window field as `indent_width` for consistency
- handle negative argval in `do_tabulate`
- fix reverse region in `indent-rigidly`
- only indent lines that start in the region, ie: lines whose beginning
offset >= start and < end
- fix `do_backspace` to delete a TAB worth of white space after TAB.
no longer use `undo` for this.
- fix `find_window` to locate window according to top-left corner of current
- add `unindent-region` on `M-C-|` to unindent current region
- add `unindent-buffer`
- redirect `S-RET` and `S-DEL` to their unshifted versions
- rename `c-indent-command` command as `c-indent-line-or-region`
* factorize evaluation result handling
* make QEValue.type signed to handle TOK_ERR and TOK_EOF
* extract buffer contents as UTF-8
* eval-region and eval-buffer take universal argument to insert expression
result instead of showing as message
* add multi-line strings with """ syntax and escaped newlines
* call commands with allocated string arguments instead of local arena
* improve triple quoted string support in C like colorizers
* increase SEARCH_LENGTH to 2K (should use allocated arrays)
* fix kill-matching-lines definition
* fix utf8_to_char32 implementation inconsistency for empty destination
* fix buffering errors in eb_insert_utf8_buf() and eb_insert_char32_buf()
* bump version to 5.4.1e
* use memcpy and other value casts to avoid strict aliasing violations.
gcc 12.2 was wrongly assuming that utf8_decode(&p) did not modify p
because *pp was never explicitly set, albeit *(const u8 **)pp = p; was
storing te updated value of p into it and the code generated for that
was produced. The code generator was miscompiling strtokey1 because
the compiler relied on bogus code analysis at the call site.
The gcc team is wasting many hours of valuable debugging time.
They should at least issue a warning about aliasing rules violations.
* fix compiler warning on missing Xvideo header
* fix compiler warning on missing fallthrough
* bump version to 5.4.1c
* add wctoupper() and wctolower()
* add qe_unaccent(c);
* use ligature functions for the above
* handle accents in qe_toupper() and qe_tolower()
* add convert_entry() method in CompletionDef
* pass CompletionDef pointer to minibuffer_edit callback
- char32_t is defined in cutils.h but may conflict with <uchar.h>
- all qe_isxxx functions take a char32_t
- add etf8x encoding for full range of char32_t type
- add utf8_decode_strict()
- add ustr_match_keyword()
- utf8_encode() / utf8_decode() handle up to 32 bits
- improve detect_charset():
- detect utf8 and utf8x
- avoid failure on partial utf8 sequence at end of buffer
- detect overlong utf8 sequences
- fix display bugs for code points beyond MAX_UNICODE_DISPLAY
- simplify do_compare_windows(), avoid magic char values.
- rename functions:
eb_encode_uchar -> eb_encode_char32
eb_insert_uchar -> eb_insert_char32
eb_insert_uchars -> eb_insert_char32_n
eb_match_uchar -> eb_match_char32
eb_delete_uchar -> eb_delete_char32
eb_replace_uchar -> eb_replace_char32
utf8_to_unicode -> utf8_to_char32
- use char32_t for all variables and arrays holding code-points
- fix some language syntax parsers.
- fix detect_eol_type_32bit(), used uint16_t instead of uint32_t
- bump VERSION to 5.4.0
- add charset.h
- add tools/unitable.c to compute unicode_width.h
- add tools/unicode_gen.c to compute more unicode tables
- use Unicode 15.0.0
- add rules to compute width tables from Unicode tables and TTY
- move basic definitions from util.h to cutils.h
- use CONFIG_SESSION for session support (undefined if CONFIG_TINY)
- define CompleteFunc and CT_xxx flags for completion functions
- pass CompleteFunc to xxx_complete() functions
this allows more generic implemetation, without including qe.h
- rename fill_border() as fill_window_slack() for readability
- add QELEVEL environment variable to detect recursive invocation
- use stricter parser for load_ligatures()
- bump VERSION to 5.3.4u
- remove opaque argument in exec_command()
- remove CMD_ISS and CMD_ISSi command signatures
- pass window pointer to isearch_xxx() functions
- isearch-exit() takes key, sets mark where search started;
used for exiting incremental search on other commands.
- isearch-cancel() takes point back where search started;
used for isearch-abort()
- handle prefix argument in query-replace (word match)
- add query_replace_help() on '?', C-h, f1
- remove dead code
- bump VERSION to 5.3.4q
- fix prefix argument handling for describe-key
- echo prefix keys after "Describe key: " prompt
- move session commands to qe.c, remove them from tqe
- use byte_quote() in do_describe_buffer()
- use b->offset to track insertions in describe-xxx commands
- eb_putc(), eb_puts() and eb_printf() insert at `b->offset` instead of `b->total_size`
- do not use eb_write() in eb_trace_bytes()
- bump VERSION to 5.3.4p
- fix has_linum_mode(), was reporting incorrect value
- put_error() messages are also reported as status messages
- qe_parse_script() reports parsing errors with put_error()
- prevent potential infinite loop in shell_mode_free()
- bump VERSION to 5.3.4o
- improve operator lexer: produce token and precedence on 1 step
- merge parser.c and qescript.c
Fix other bugs
- close display before freeing memory in --free-all
- free TTYState in tty_dpy_close()
- free VarDef memory in --free-all
- fix crash bug on --free-all due to duplicating ModeDef structures
Improve variable handling:
- move do_describe_variable() to variable.c
- add var_alloc and str_alloc flags in VarDef to fix `end` hack
- remove ugly kludge to detect allocated strings
- type variables retrieved from environment
- free variable data on --free-all
- bump VERSION to 5.3.4m
- add QEValue utility functions:
void qe_cfg_swap(QEValue *sp, QEValue *sp1);
void qe_cfg_move(QEValue *sp, QEValue *sp1);
- add ds->start_line to restart parsing with correct line numbers
- add ds->newline_seen to handle automatic semicolon insertion
- implement skipping in qe_cfg_expr() and qe_cfg_stmt()
- implement comma and ternary operators
- upgrade tqe parser to token based
- fix lexer for multi character operators
- add qe_set_variable_offset() to control setting point and mark
- bump VERSION to 5.3.4l
- add utility function:
char *file_load(const char *filename, int max_size, int *sizep);
- publish QEValue, selected TOK_xxx and value setters in qe.h
- add more common functions in parser.c
qe_cfg_init(), qe_cfg_release()
- add generic argument parser qe_cfg_get_args()
- add conversion functions in qescript.c:
char(v), int(v), string(v)
- add delim argument in qe_cfg_parse_string() in parse.c
- pass QEmacsDataSource pointer to has_token(), expect_token()
- bump VERSION to 5.3.4j
- add byte_guote() to encode a single byte
- encode non ASCII bytes in strquote()
- split function call parse and evaluation into qe_cfg_call() in tqe's parser.c
- use has_token() in full parser
- fix bogus function name in config file parsing errors
- bump VERSION to 5.3.4i
- move code to do_prefix_argument()
- more qe_ungrab_keys() to isearch_key()
ungrabing should be based on grab function return value
- an explicit 0 prefix argument prevents command execution
unless the command explicitly receives the prefix argument
- use code_letter in exec_command(), qe_get_prototype()
- bump VERSION to 5.3.4h
Extend command dispatch system:
- add CMD_ARG_OPAQUE argument type
- add ISS and ISSi command signatures for ISearchState
- add CMDx() macro for disabled and future commands
- restrict command set in parsers
- add opaque argument for exec_command()
- add sort-region command, same as sort-lines
Extend binding system:
- move do_unset_key() from extras.c to qe.c
- accept bindings lists in unset-key commands
- add exact argument for qe_find_binding()
- reorder xxx_bindings arrays
Improve emulation functions:
- improve set-emulation command:
- add xxx_bindings arrays for emulations
- add register_emulation_bindings()
Search system:
- use exec_command to dispatch isearch functions
this allows easy redefinition of bindings, especially
useful for emacs flavor emulations
- add isearch_commands[] with bindings and command descriptions
- bumped version to 5.3.4g
improve command and bindings registration:
- simplify command and binding registration APIs
- add bindings member in ModeDef structures
- rename qe_register_cmd_table() as qe_register_commands(), change API
- add qe_register_bindings() taking mode, command-name and bindings string
- rename qe_mode_set_key() as qe_register_command_binding()
improve buffer listing:
- add BF_SHELL buffer flag for shell buffers
- show current directory of shell buffers in bufed
improve dired:
- add dired-hide-details-mode on "("
- use details_mask to control long listing
improve trace doctor:
- add EB_TRACE_DEBUG trace flag for debugging traces
- add do_set_trace_flags()
- change do_start_trace_mode() to do_toggle_trace_mode() with arg
misc:
- fix make_user_path() for pathnames without a trailing slash
- use separate commands for prefix_argument handling
- improve strstart(), strend(), pstrcpy(), pstrncpy(), get_dirname()
- add strmatchword() like strstart with check for word boundary
- bumped version to 5.3.3d
- use code characters from emacs (interactive) function
- 'd' for numeric point value
- 'p' for numeric prefix argument
- 'P' for raw prefix argument
- 'q' for negated numeric prefix argument
- handle synthetic and default arguments in parser.c
- add describe-function, bound to C-h f, need more work
- add sort-columns, sort-numbers, sort-paragraphs
- rename sort-region as sort-lines
- remove reverse-sort-buffer and reverse-sort-region
passing C-u argument does reverse on all sort commands
- update TODO list
- bumped version to 5.3.3a
- pass description as 3rd argument to CMDx() macros
- normalize argument specifications
- 'p' means point
- 'a' means argval
- 'A' means argval premultiplied by value
- pass argval before value to do_split_window(),
do_isearch(), do_sort_span(), do_sort_region(), do_sort_buffer()
- add SF_SILENT flag to suppress messages in eb_sort_span()
- bumped version to 5.3.3
- use standard bindings string to all CMDx() definitions
- remove CMDx() key and alt_key
- remove compact key macros: KEY_CTRLX, KEY_CTRLXRET,
KEY_CTRLH, KEY_CTRLC
- removed qe_register_binding2,
- qe_register_cmd_table() takes array length
- remove CMD_DEF_END and CmdDef chaining
- add CmdDefArray to store commands in const arrays
- strtokeys() takes end pointer
- add C-@ as name for null control key
- removed many hacks in CmdDef handling
- merge electric key commands
- fix ~ minibuffer behavior
- bumped version to 5.3.2
- made some local objects static
- fix many const cast issues
- fix comma operator warnings
- add const correct strtol_c(), strtoll_c(), strtold_c()
- add unconst(t) to override const removal warnings
- comment VLAs and flexible arrays
- use get_basename_offset() to enable const correct
get_basename() and get_basename_nc()
- use get_extension_offset() to enable const correct
get_extension() and get_extension_nc()
- always include config.h
- use size_t for some size arguments:
umemmove(), umemcpy(), umemcmp(), qe_memicmp()
- add qe-doc.info and qe-doc.pdf targets
- fix shadowing bug in buf_write: used tor return 0 instead of byte count
- bumped version to 5.3.1e
- fix bogus test for . and .. in find_file_next()
- use strequal() instead of !strcmp()
- add some emacs-lisp defined symbols
- fixed awk mode for `#` comments
- add description placeholders to all CMDx definitions
- swap arguments to qe_split_window() and do_split_window()
- pass iteration count based on universal argument to
do_up_down(), do_left_right(), do_word_right(), do_kill_word(),
do_forward_paragraph(), do_kill_paragraph(), do_c_forward_conditional(),
do_forward_block(), do_kill_block(),
- remove do_backward_paragraph()
- add int eb_prev_paragraph(EditBuffer *b, int offset);
- dont call command on 0 universal prefix
- add CmdArgSpec structure for parse_arg()
- add argument type prefixes for defautl values:
'm' prefix for CMD_ARG_USE_MARK, 'p' for CMD_ARG_USE_POINT
'z' for CMD_ARG_USE_ZERO and 'e' for CMD_ARG_USE_BSIZE,
- rename parse_args as parse_arguments to avoid confusion with parse_arg
- make tabify-region and tabify-buffer call do_tabify()
- make untabify-region and untabify-buffer call do_untabify()
- move command argument specification to CmdDef:spec, followed by description string
- add command and variable description field
- add fuzzy completion on repeated TAB in minibuffer
- remove fuzzy_search variable
- add CompletionDef flags:
- CF_FILENAME to use `/` as separator
- CF_NO_FUZZY to prevent fuzzy matching on second TAB
- CF_SPACE_OK to prevent SPC from completing entry
- CF_NO_AUTO_SUBMIT to insert current match on ENTER
- fix invalid free on CommandDef structures
- improve symbol completion in eval-expression
- use symbol completion in apropos
- fix post increment and decrement evaluation