Commit graph

915 commits

Author SHA1 Message Date
Charlie Gordon
abe81df0b2 basic: move some global variables
- move up_down_last_x to an EditState member
- make single_window static in qe.c
- move user_option to the QEmacsState structure
- move minibuffer and completion state to a MinibufState structure
- remove static state in do_minibuffer_exit
- add key name: LB for `{`, RB for `}` and VB for `|`
2017-04-16 17:31:14 +00:00
Charlie Gordon
3dccd7f696 basic: improve command line parsing
- add qe_strtobool(str, def). Returns boolean value from str:
  y yes t true 1 evaluate to true
  any other string evaluates to false
  the empty string evaluates to def
- add bstr_t type:
  constant bounded string with pointer and length.
  bstr_make creates a bstr_t from a string pointer or NULL
  bstr_token creates a bstr_t from a string upto a separator
  bstr_get_nth creates a bstr_t from a the nth element of a string list
  bstr_equal compares bstr_t objects for equality
- use macros for type safe registation of command line options
- combine short, long, argument names and help string
- support command line options with optional arguments
2017-04-16 17:20:49 +00:00
Charlie Gordon
f1de1ca561 files: add do_find_file_noselect command
- add LF_NOSELECT flag for qe_load_file()
- add find-file-noselect command: load a file into a buffer but do not
  attach the buffer to the current window.  Due to the current implementation
  of set_mode, the buffer is only attached to the file, the file will only be
  loaded when it is finally attached to a window.
2017-04-15 13:10:53 +00:00
Charlie Gordon
84547c6209 build: fix compile time warning
- fix some warnings on unused variables and variables potentially
  used before set
- force definition of va_copy() and atomic_get_and_set() for haiku
2017-04-15 09:39:02 +00:00
Charlie Gordon
b39607410e fixed compilation warnings 2017-04-14 06:59:17 +00:00
Charlie Gordon
8ab9a36ad1 shell: move point to the end of buffer in start-shell
- C-x RET RET can be used to go to the shell prompt directly
2017-04-12 07:56:15 +00:00
Charlie Gordon
e333c211fe display: fix some popup issues
- prevent some commands from a popup-window or close it
2017-04-12 07:54:30 +00:00
Charlie Gordon
6c595c1f2c colors: extend color system
- add 8K color modes and 64-bit QETermStyle values
- add 64-bit buffer style support
- reduce colored character system used in syntax handlers to 8-bit style
  and 24-bit code point
- use QETermStyle type instead of int wherever a composite style is used
- force color system used by the terminal with environment variables:
  USE_16_COLORS=1, USE_256_COLORS=1 or USE_TRUE_COLORS=1
2017-04-12 07:33:20 +00:00
Charlie Gordon
c64555e638 lists: use QE_STYLE_SEL bit instead of hard coded QE_STYLE_SELECTION 2017-04-11 07:28:26 +00:00
Charlie Gordon
f106d3dc66 extra-modes: fix potential out of bounds access 2017-04-11 07:27:14 +00:00
Charlie Gordon
5d463eb5ad styles: improve consistency
- rename font styles QE_STYLE_xxx to QE_FONT_STYLE_xxx
- rename font family QE_FAMILY_xxx to QE_FONT_FAMILY_xxx
- improve tests/16colors.pl: display bold italics combination
- improve tests/color-spaces.pl: compare true color and palette dumps
- add colortest target in Makefile to produce various color patterns
2017-04-11 06:46:13 +00:00
Charlie Gordon
e5c5103335 clang: improve auto-indentation
- auto-indent multi-line comments to align initial stars
  such as this:

  /* This is a comment
   * with a second line.
   */

and free form comment paragraphs this way:

  /* This is a comment
     with a second line.
   */
2017-04-10 17:09:22 +00:00
Charlie Gordon
799b1489bc display: full support for 256 color virtual terminal
- add various utilities for color escape sequence testing:
  tests/16colors.pl
  tests/256colors2.pl
  tests/color-spaces.pl
  tests/truecolors.sh
  tests/xterm-colortest.sh
  tests/xterm-colour-chart.py
- use colored code-points only for syntax highlighting
- use QETermStyle and QEStyleDef internally
- convert to TTYChar attributes only for text terminal output.
- remove most CHAR_MASK and STYLE_SHIFT handling
- pass QETermStyle array to get_colorized_line mode handlers
- pass QETermStyle array to isearch_colorize_matches
- remove combine_static_colorized_line
- move color matching functions to util.c
- rename get_tty_color as qe_map_color
- improve local variable naming consistency:
  DisplayState *ds, QEStyleDef *stp, QEStyleDef styledef.
2017-04-03 08:33:57 +00:00
Charlie Gordon
4104ab568b display: improve color and style handling
- add support for 256 and true color terminals
- fix color handling for defined styles
- fix bold, italic and underline handling for terminals
- use more explicit symbols for qe-term emulator in shell.c
- shell buffer terminal emulator still uses 16 colors
- display buffer style in C-X =
- bumped version to 0.5.0dev
2017-04-02 01:12:01 +00:00
Charlie Gordon
ebadabb17a extras: improve compare-windows
- move resync code to separate function
- try and resync on spacing changes and single word changes
2017-04-01 14:38:28 +00:00
Charlie Gordon
0eae5a52fb fix parenthesis colors 2017-03-31 19:12:07 +00:00
Charlie Gordon
073fbc3439 tags: fix some bugs, extend system
- pass target window to completion functions
- fix tag completion at find-tag prompt
- add tag support in python mode
- set tag offset to the actual word instead of start of line
2017-03-31 15:33:02 +00:00
Charlie Gordon
35d2610146 clang: add primitive tag support
- add buffer properties with offset tracking
- use buffer properties for type, macro, function and object definitions.
- display current function or type name on mode line
- add list-tags command to show the tags detected for the current buffer
- add goto-tag on C-X , and M-F1 to jump to the definition of the current word
- add find-tag on C-X . to search for a given tag with completion
2017-03-31 07:51:56 +00:00
Charlie Gordon
d3e8e65277 shell: fix colorization of clang note diagnostics 2017-03-31 07:42:44 +00:00
Charlie Gordon
c7d8b8ee29 fix indentation 2017-03-31 06:05:16 +00:00
Charlie Gordon
66599e65cf haiku: add qemacs.rdef icon 2017-03-28 20:11:55 +00:00
Charlie Gordon
7a8cca8232 haiku: merge patch by Francois Revol to compile with gcc5 2017-03-28 12:53:15 +00:00
Charlie Gordon
004e173dee shell-script-mode: small improvements
- more explicit sh-bang support
- support $'This is a quote: "\'"' syntax
- better match for keywords
- keywords introduce command state except for, case, export and in
2017-03-28 12:50:30 +00:00
Charlie Gordon
5ad42a0dc3 shell-script-mode:
- renamed script-mode to shell-script-mode
- merged patch by Hadrien Lacour
- improve parsing, recognise names, keywords, meta-characters, substitutions...
- add flexibility in forward-block (M-C-f) and backward-block (M-C-b) to
  match block delimiters with non default styles
2017-03-28 06:33:29 +00:00
Charlie Gordon
d06fdbfd14 basic: changed API for popup windows
- pass current window to show_popup()
- remove show_ptr argument from new_help_buffer()
- call show_popup() unconditionally
- add int eb_vprintf(EditBuffer *b, const char *fmt, va_list ap);
2017-03-26 15:57:24 +00:00
Charlie Gordon
5118c5e482 ignore some temporary files 2017-03-25 18:16:32 +00:00
Charlie Gordon
c5a3bb8ecb updated heading 2017-03-25 18:14:59 +00:00
Charlie Gordon
dc0db62312 utilities: sundries 2017-03-25 18:13:32 +00:00
Charlie Gordon
67e50a2511 arm: use to_hex instead of local function 2017-03-25 18:09:50 +00:00
Charlie Gordon
a449fe3c23 simplified to_hex() 2017-03-25 18:07:18 +00:00
Charlie Gordon
24769141f4 updated headings 2017-03-25 18:04:51 +00:00
Charlie Gordon
91d842618f modes: add less mode for .less files
- rename all popup related mode functions from less_* to popup_*
- add less-mode for .less files (preprocessor for css files)
- add FILE to list of C types
2017-03-25 18:00:52 +00:00
Charlie Gordon
7e27ea3c66 C-x C-m finds the most recently used process buffer 2017-03-25 17:49:39 +00:00
Charlie Gordon
2d59865702 charset: default to mac-roman for non utf-8 files with old style mac eol 2017-03-22 17:13:10 +00:00
Charlie Gordon
34a4da48b2 files: add -1 (--single-window) command line option
- add command line options to prevent window splitting
2017-03-20 18:43:33 +00:00
Charlie Gordon
5020243384 unihex: fix display problems
- fix invalid widths in unicode_width.h
- avoid setting s->offset to invalid values in hex.c
- update s->unihex_mode on the fly if larger code-points are displayed
- display code-points with at least 4 hex digits
- compute default s->dump_width more accurately
2017-03-19 15:39:25 +00:00
Charlie Gordon
96f51a84c5 unicode: updated width table 2017-03-19 13:24:06 +00:00
Charlie Gordon
7a8065c5a8 extras: improved compare-windows
- add static int qe_skip_comments(EditState *s, int offset, int *offsetp);
- add static int qe_skip_spaces(EditState *s, int offset, int *offsetp);
- add state variable ignore-comments
- C-u A-= toggles ignore-spaces
- C-u C-u A-= toggles ignore-comments
- C-u 2 0 A-= toggles ignore-spaces and ignore-comments
- compare-windows status messages document ignored stuff
2017-03-19 13:20:34 +00:00
Charlie Gordon
12a44b104e clang: fix alignment bug on ternary operator 2017-03-18 14:24:47 +00:00
Charlie Gordon
0d630448db shell: handle C-t and M-t at shell prompt 2017-03-18 14:13:33 +00:00
Charlie Gordon
0f4285bfec shell: add support for word case changing commands 2017-03-17 16:28:04 +00:00
Charlie Gordon
3a65d1143a display: fix single accent curor position 2017-03-17 16:26:16 +00:00
Charlie Gordon
a63aff6f3e fixed compilation on stack Debian 2017-03-16 17:18:29 +00:00
Charlie Gordon
74be7bcc22 update TODO file 2017-03-16 09:35:28 +00:00
Charlie Gordon
26fd39d9e0 unicode: improve support for wide and combining code points
- qe_isaccent() recognises all combining code points (to be refined)
- add computer generated width table unicode_width.h
- display difference in hex in compare-windows to distinguish
  space and nbsp, normal and combined form for accented letters.
- display multiple combining code points in what-cursor-position (C-x =)
- attach combining code points to preceeding space in display_char_bidir
- handle accents specificaaly in flush_fragment
- handle combining code-points in screen backstore via indirection table
  this transient table can be inspected via describe-screen
2017-03-16 09:16:31 +00:00
Charlie Gordon
ec07d5aec8 basic: charset improvements
- add QECharset.encode_table as a default for CharsetDecodeState.table
- make CharsetDecodeState.table const
- use static initializers for utf8 tables
- add al32utf8 charset name (used in Oracle for true utf-8 encoding)
- use direct pointers in unicode_glyph_range_index
- initialize unicode_glyph_range_index at run time
- rename unicode_glyph_tty_width as unicode_tty_glyph_width
- changed unihex display to space out single width characters
2017-03-15 23:42:23 +00:00
Charlie Gordon
252e2848ab basic: fix potentially invalid shifts
- use unsigned arithmetics to avoid implementation-defined behavior
  on (1 << 31)
2017-03-15 23:17:58 +00:00
Charlie Gordon
22594638fb unihex: fix crash bug
- fix crash bug in initialization code
- prevent display of invalid code points
2017-03-15 07:38:58 +00:00
Charlie Gordon
063801372c file: improve qe_load_file API
- pass flags as bit mask for:
  kill_buffer, load_resource, cwd_relative, split_window
- fix bug with multiple files on command line from different directories
2017-03-15 07:32:48 +00:00
Charlie Gordon
38fdd559f5 display: improve display structure handling
- add QEDisplay.dpy_describe handler
- rename dpy_init as screen_init
- allocate TTYState instead of using static struct in tty.c
2017-03-15 07:24:31 +00:00