* pass `QEmacsState` to key grab functions
* clear `grab_key_opaque` when freeing windows, buffers, mode_data
* add checks on window and buffer pointers in key grab functions
* this should fix a crash bug when deleting unsynched buffers from bufed
* fix `reload_buffer` to update buffer `file_size` and `mtime` fields
* check buffer file before invoking commands that modify the buffer
* check buffer file after command that changes the current window
or the current window's buffer
* rename and pass flags to byte quoting functions:
`byte_quote` -> `strquote_byte`
* add `eb_print_style` to output data to a buffer in a given style
* add `eb_print_field` to output a field name and value using styles
* use styles in describe commands
* improve byte stats and page layout output in `describe-buffer`
* add `wall-chart` command (sorted list of bindings)
* add `describe-help` command
* parse process output for shell prompts with current directory
* parse `make -w -C` output for temporary subdirectory excursions
* handle property type and flags separately
* add `QE_PROP_MARK` to prevent offset update at range boundary
* use `QE_PROP_DUP` to optimize buffer properties with single allocation
* use mask in `eb_delete_properties` to delete tags selectively
* fix `eb_find_property` range glitch
* fix offset tracking for CWD properties
* simplify default directory selection for shell commands
* fix compiler warnings on variable shadow definitions
* optimize `next_error()`: no lookback needed anymore
* display buffer properties in `describe-buffer`
* update TODO.md
* keep track of original file size and time in buffer data
* check for file changes upon window change, buffer modification and save
* prompt for reloading buffer contents and other options
* keep track of buffer creation, modification and access times
* add buffer sorting methods (buffer times, pathname, basename)
* always sort systems buffers last in alpha order
* small touch up in modeline
* add `eb_put_filename()` to encode buffer or file names with
non-ASCII characters according to PF_xxx flags
* add `CF_SAVE_LIST` flag for completions to store the list
of matches in `MinibufState`
* fix bufed and dired layout issues
* fix buffer and filename completion popup layout
* add commands to control display of Unicode and non printing
charcaters in buffer or file names:
- U toggles unicode display
- \ cycles through 4 possible encodings: ? ^J \x10 \010
* use `(*fp)()` syntax for indirect function calls
* use `BC_REUSE | BC_CLEAR` to avoid killing the `*occur*` buffer
* this ensures the `*occur*` buffer stays current in windows that show it
* modify the `BC_CLEAR` semantics to imply `BC_REUSE`
* simplify calls: remove redundant `BC_REUSE` flag
* pass const `char32_t` array and `QETermStyle` array to `ColorizeFunc`
* add `cp_colorize_line()` wrapper to call colorizer function on null
terminated buffer.
* remove unused `EditBuffer` colorize fields
* remove `EditState` field `colorize_func`: rely on `colorize_mode` only
* no longer combine style into codepoint buffer.
* remove `STYLE_BITS`, `STYLE_SHIFT`, `CHAR_MASK`
* rename `set_colorize_func` as `set_colorize_mode`
* rename `SET_COLOR` and `SET_COLOR1` as `SET_STYLE` and `SET_STYLE1`
* add documentation for buffer API functions
- add `repeat` command on `C-x z`
- add `repeat-mode`, always enabled
- cycle all matching tags in current file on `goto-tag` and `find-tag`
- set up `repeat-mode` for these commands:
- `undo` on `C-x u` (`u` repeats `undo`, `r` performs `redo`)
- `undo` on `C-x r` (`r` repeats `redo`, `u` performs `undo`)
- `find-window-left`, `find-window-right`, `find-window-up`, `find-window-dow`
repeat navigation on `up`, `down`, `left`, `right`
- `next-error`, `previous-error`: `M-n` and `M-p` repeat in corresponding direction
- `next-buffer`, `previous-buffer: repeat buffers nagivation with `left` and `right`
- `enlarge-window` / `shrink-window`: repeat resizing on `^`, `v`, `{`, `}`
and cursor movement keys
- `goto-tag` on `C-x ,` goto next tag with `,` and `.`
- `call-last-kbd-macro` on `C-x e`: repeat macro on `e`
- add `eb_count_buffers` and `eb_get_buffer_from_index` for safe buffer navigation
- add transient bindings, known as repeat maps in GNU emacs
- pass `KeyDef **lp` (aka key maps) instead of mode for binding commands
- replace `do_next_buffer` and `do_prevous_buffer` with repeatable command
`do_buffer_navigation`
- fix `bufed_select` crash bug when selecting buffer from a regular window
* 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
- 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
After spending a few hours debugging a stupid memcpy size error, I
decided to use a typed version of memcpy, memcmp and memmove wherever
the array type size is greater than 1.
- add blockcmp(p1, p2, n), blockcpy(p1, p2, n), blockmove(p1, p2, n)
for operation on typed arrays
- add max_uint() and min_uint()
- bumped VERSION to 5.3.4w
- 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
- 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
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
- add screen_top to avoid recomputing from buffer contents
- fix getline behavior on very long lines in shell buffer
- add LF bindings to run qemacs in lldb session
- qe_term_get_pos() returns screen start
- handle \t and wide chars inside shell buffers for xy positioning
- split qe_term_goto_pos() from qe_term_goto_xy()
- add flags in qe_term_goto_pos():
TG_RELATIVE_COL: column number is relative to offset position
TG_RELATIVE_ROW: row number is relative to offset position
TG_RELATIVE: column and/or row is relative
TG_NOCLIP: do not clip destx/desty coordinates
TG_NOEXTEND: do not modify buffer to reach destination
- add qe_term_fix_wrap() to break wrapping lines
- fix qe_term_goto_tab() behavior on long lines
- fix qe_term_skip_lines() to handle wrapping lines
- handle UTF-8 for lastc and repeat graphics character
- bump VERSION to 5.3.3e
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
- move language syntax handling to `lang` directory
- move other modes to `modes` directory
- move tools to `tools` directory
- compile tools to `bin` directory
- bump version to 5.3alpha
- remove duplicate node names in qe-doc
- update Makefiles