Commit graph

943 commits

Author SHA1 Message Date
Charlie Gordon
94dac6e8cb archive: select tar on .taz and man on .roff 2017-05-03 08:04:08 +00:00
Charlie Gordon
03bb89b96f shell: set error pointer upon process buffer creation 2017-05-03 07:18:05 +00:00
Charlie Gordon
aadbb5ede3 tests: add fractal types 2017-04-29 09:22:45 +00:00
Charlie Gordon
f1888d89b5 display: fix graphics cursor in process buffer
- force cursor minimum width at end of line
2017-04-28 21:46:01 +00:00
Charlie Gordon
df77bc2635 fractal: use buffer_mode_data instead of static structure for FractalState 2017-04-28 13:32:43 +00:00
Charlie Gordon
dbc17518c2 tests: add fractal test functions
- improve mandelbrot shell script
- add fractal.c: a fractal generator and navigator that can
  be used as a terminal stress test.
- add fractal-mode for easy fractal navigation and zooming
  with key bindings.
- try it out with C-h m SP / SP / SP ...
2017-04-27 23:04:10 +00:00
Charlie Gordon
b50a3f42b1 shell: improve terminal emulation
- emulate alternate screen, snap top of screen in display_hook
- add ShellState.alternate_screen_top
- save and restore cursor
- handle combination marks and wide glyphs in qe_term_get_pos() and
  qe_term_goto_xy()
- erase screen \E[J
- prevent automatic switch to interactive mode in full screen applications
  when moving point to cur_offset. Must use C-o as a toggle.
- notify shell process of window size change with C-l (shell-refresh)
2017-04-26 07:05:42 +00:00
Charlie Gordon
ff1952f5a0 display: improve line wrap handling
- add WRAP_AUTO and WRAP_TERM (for terminal emulator)
  WRAP_AUTO wraps lines if the window is more than 3/4 of the screen width
  if window is narrower, lines are truncated.
  WRAP_TERM does not display the \ wrapping mark to simulate terminal behavior
- add default_wrap member in ModeDef structure
- delegate to view pane for man, ssh and compile commands
2017-04-25 17:41:27 +00:00
Charlie Gordon
5bb58a9c16 display: improve window splitting API
- add EditState *qe_split_window(EditState *s, int prop, int side_by_side);
  takes proportion and direction
- set-trace splits the current window 75/25
- add start-trace-mode
2017-04-25 17:15:03 +00:00
Charlie Gordon
161053d03f dired: update sort order prompt 2017-04-25 17:14:30 +00:00
Charlie Gordon
b66bdb1206 tty: hide cursor during redisplay 2017-04-25 16:58:46 +00:00
Charlie Gordon
d210ba864b charset: improve eol and binary detection
- accept extra CR in badly encoded DOS files
- ignore ^Z in DOS files, do not detect them as binary
2017-04-25 16:56:26 +00:00
Charlie Gordon
d329669530 buffer: new APIs
- int eb_insert_uchars(EditBuffer *b, int offset, int c, int n);
- int eb_replace_uchar(EditBuffer *b, int offset, int c);
- inline eb_insert_spaces() using eb_insert_uchars() instead
- add minp(), maxp() and clampp() with side effect on first argument
- publish ucs2 and ucs4 charsets
2017-04-25 16:46:41 +00:00
Charlie Gordon
59ce60a518 lisp: add xaos-mode 2017-04-25 13:28:41 +00:00
Charlie Gordon
0496b811d8 man-mode: recognise .man files that look like man page source files 2017-04-25 12:52:16 +00:00
Charlie Gordon
72fed2e7a1 display: fixed compilation for linux 2017-04-21 14:50:53 +00:00
Charlie Gordon
eacb2ad6e0 shell: major improvements in tty emulator
terminal emulator:
- add EditState.cols and EditState.rows: window dimensions in characters
- pass target window to new_shell_buffer()
- use window size for shell terminal emulator initial screen size
- set COLUMNS and LINES environment variables for child processes
- factorize emulator character output
- increase number of CSI arguments
- simplify and improve CSI m argument processing including
  multiple argument sequences
- minimal support for `:` as argument separator eg:
  \033[38;5;128:128:128m
- support erase line vt100 command:
  \033[K, \033[0K erase end of line
  \033[1K         erase beginning of line
  \033[2K         erase complete line
debugging:
- pass string argument to set-trace: on, off or list of trace indicators
- remove doctor command
- add QE_TRACE_EMULATE for emulator trace messages
- fix incorrect uses of eb_delete()
2017-04-21 14:44:14 +00:00
Charlie Gordon
bf2cc7c457 html: fix cursor movement functions
- add default versions of move_word_left_right, move_bof
  and move_eof functions
2017-04-21 12:26:44 +00:00
Charlie Gordon
d8180c89c4 display: improve crc because of trivial collisions 2017-04-19 08:20:20 +00:00
Charlie Gordon
89b3ccbda3 clang: detect objective-C header files 2017-04-19 08:14:31 +00:00
Charlie Gordon
a3cba9d3a8 htmlsrc: select on plist files 2017-04-19 08:13:24 +00:00
Charlie Gordon
d1cefb2663 display: improve crc formula to avoid trivial collisions
- use 64 bit checksum values
- use simple formula with fewer collisions.
2017-04-18 14:26:39 +00:00
Charlie Gordon
c57a7c6233 display: small fixes for consistency
- add wrappers in display.h
- renamed tty dpy_xxx handlers for consistency
- separate tty_term_resize called on signal and tty_dpy_invalidate
- add dpy_xor_rectangle for software cursor, remove QECOLOR_XOR
2017-04-18 09:14:55 +00:00
Charlie Gordon
8756b73b0c x11: remove static data
- rename handlers to x11_dpy_xxx
- move almost all static data to X11State structure pointed to
  by QEditScreen.priv_data
2017-04-17 23:06:06 +00:00
Charlie Gordon
7b40bb4f3a display: improve automatic redisplay upon terminal window resize
- signal and detect asynchronous redisplay signal from SIGWINCH
2017-04-17 23:01:21 +00:00
Charlie Gordon
3580b53452 syntax: improve minibuffer and popup handling
- remove static state for minibuffer handling, use mode specific state attached
  to the buffer.
- remove static pointer for the popup last active window.  Use new
  target_window member in EditState.
- remove EditState.minibuf, replaced by WF_MINIBUF flag in EditState.flags
- rename minibuffer commands for consistency
- remove unused global variable debug_flags
- prevent search from minibuffer
- fix toggle-full-screen refresh bug. C-x f is bound to toggle-full-screen
  and could be typed by mistake for C-x C-f, switching to full screen mode
  but with a refresh delay.  This caused confusing behavior interpreted as a
  layout bug.
- make charset_ucs2le, charset_ucs2be, charset_ucs4le, charset_ucs4be local
  in charset.c
- make edit_detach() and edit_attach() local in qe.c
- redraw status and diag messages in edit_display(). This caused display
  bugs in x11 as asynchronous messages were erased by minibuffer window
  refresh.
- display status messages in diag area (bottom right screen corner) if
  minibuffer is active.
- force put_status message update if message starts with !
- force complete_refresh if window was resized or layout was changed
2017-04-17 18:14:15 +00:00
Charlie Gordon
e71273f3af syntax: improve tag display
- increase identifier buffer lengths
- fix some bugs in buffer property handling
2017-04-17 09:16:24 +00:00
Charlie Gordon
e08867b692 basic: reduce global variable clutter
- make more registered objects static
- document some non static global objects
- remove some global variables
2017-04-16 21:51:19 +00:00
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