Commit graph

720 commits

Author SHA1 Message Date
Charlie Gordon
b8fb3f310e search: split search code from qe.c into new module search.c 2015-08-17 16:56:48 +00:00
Charlie Gordon
1033a348d8 search: another 35% speed improvement on large files
- improve utf8 handling in eb_prevc() using eb_read_one_byte()
- added utf8_is_trailing_byte(b) to standardize testing for this
- improve hex searching by 50% using eb_read_one_byte()
- improve regular searching by 35% by removing extra calls to eb_nextc()
2015-08-16 23:15:01 +00:00
Charlie Gordon
e80cb5a149 search: another 2.5x speed improvement on large files
- simplify eb_read() and eb_write() primitives
- make eb_write() return number of bytes actually written
- add eb_read_byte(buffer, offset) to read a single byte
- simplify eb_nextc() accordingly
2015-08-16 19:22:01 +00:00
Charlie Gordon
4dd09ba89d search: 10x speed improvement on large files
- do_center_window used to be very inefficient when invoked with point
  at a great distance from the current window.  This was slowing down
  successful searches on large files by a factor of 10 or more.
2015-08-16 18:01:06 +00:00
Charlie Gordon
456051b1a2 search: some fixes
- fix case matching cycling with C-c and A-c in incremental search
- use smartcase for search-forward and search-backward
- display status for search-forward and search-backward failures
- eb_search returns -1 upon abort
- make eb_search and search_abort_func private;
2015-08-16 17:52:13 +00:00
Charlie Gordon
504f111229 view-mode: improve navigation
- move cursor instead of scrolling at top of file
- move cursor horizontally except left on bol
- scroll-left anf scroll-right toggle line-wrapping
- change some bindings
  C-down -> forward-paragraph
  C-up   -> backward-paragraph
- fix scroll-left and scroll-right direction argument
- add eb_at_bol(b, offset) primitive
2015-08-16 17:40:40 +00:00
Charlie Gordon
f4001a3610 haskel-mode: add keywords, fix multi-line comment coloring 2015-08-16 17:31:50 +00:00
Charlie Gordon
375187456d clang: improve regex detection in javascript and similar scripts 2015-08-16 17:28:45 +00:00
Charlie Gordon
dd3671e702 complete: do case insensitive matching 2015-08-15 14:18:51 +00:00
Charlie Gordon
5af9d29a2e searching: many improvements
- clean search and replace code
- fix point position upon matches in forward and backward directions
- prevent reverse search from find overlapping matches
- hilite current match
- add style search-match to hilite the current match in incremental-search
  defaults to cyan / magenta
- C-l centers the window
- C-q quotes next character in incremental search
- C-w grabs the word at point
- C-y grabs from point to next end of line
- A-b cycles unihex hex and normal search
- A-w toggles word matching
- A-y yanks last kill in search string
- add same control keys to query-replace command
- fix searching and replacing in hex and unihex modes
- wrap search after failure
- pass search data as u32 buffer
- add eb_insert_u32_buf(b, offset, buf, len) to insert unicode code points
- add window.offset_end -> offset of first char beyond the window
- add qestate.emulation_flags to select between standard emacs behaviour and
  alternate behaviours in internal commands
- fix do_center_cursor() when point is before window start
- add do_center_cursor_maybe() to center window if point is not visible
- allow C-q to quote DEL key (ASCII 127)
2015-08-15 13:08:41 +00:00
Charlie Gordon
65e16f7f82 tty: fixed non ASCII input from utf8 terminals 2015-08-14 15:56:28 +00:00
Charlie Gordon
6c2bef2533 hex-mode: some improvements
- added probe function for binary mode so it gets selected when cycling
  modes with next-mode (bound to M-m)
- renamed w->disp_width as dump_width and make it a window variable
- compute default dump-width more accurately for dired-mode
- dump-width can be controlled with C-left and C-right in
  hex, unihex and binary modes
2015-08-13 23:26:59 +00:00
Charlie Gordon
f84a844a5e tty: improved support for OS/X iterm2
- added support for extended CSI sequences such as
  C-up    = ^[[1;5A
  C-down  = ^[[1;5B
  C-left  = ^[[1;5D
  C-right = ^[[1;5C
  S-left  = ^[[1;2D
  S-right = ^[[1;2C
2015-08-13 23:14:11 +00:00
Charlie Gordon
745972e2fd variables: added VAR_RW_SAVE type for session saving code 2015-08-13 23:00:26 +00:00
Charlie Gordon
b0d01a50ed config script: added new commands
- add eval-expression(expression) on M-:
- add eval-buffer()
- add eval-region()
- add +load <file> command line option to load a script file
- add +eval <expression> command line option to execute commands
  This can be used to benchmark load time:
  time qe `find . -name "*.[ch]"` +eval 'exit_qemacs(0)'
2015-08-11 22:15:38 +00:00
Charlie Gordon
a66cf5a68e minibuffer completion: add fuzzy matching
- add extra group argument in functions add_string() and set_string()
- group matches in completion_sort_func()
- add const char *strmem(const char *str, const void *mem, int size);
- add variable fuzzy-search
- add minibuffer-insert command to handle insert triggers
- display variable status after set-variable
- make TAB a regular char in incremental search
- display control chars as ^x in incremental search prompt
2015-08-11 17:45:30 +00:00
Charlie Gordon
a884c1514c use buf_puts for simple strings 2015-08-11 17:23:23 +00:00
Charlie Gordon
fe6e1ac4c6 incremental-search: new commands
- simplify code with buf_xxx APIs
- add C-l to grab current line into search pattern
- add C-d to yank current word into search pattern
- add C-y to yank current kill into search pattern
2015-08-10 20:01:02 +00:00
Charlie Gordon
1fd5a57bae dired: improve preview-mode
- pass bf_flags for buffer creation from do_find_file() ...
- do not set BF_PREVIEW flag for existing buffers from dired
- exit preview-mode with C-g and RET
- SPC and BSP move by page in preview-mode
- add Preview mode-line indicator
- add preview-mode() command
2015-08-10 19:44:19 +00:00
Charlie Gordon
f45b61d3c6 rust: made number suffix table static 2015-08-10 18:37:20 +00:00
Charlie Gordon
be02b048b9 shell: accept more error message formats, handle column number 2015-08-10 18:35:13 +00:00
Charlie Gordon
6852093779 added colorizer for C2 language 2015-08-10 18:29:49 +00:00
Charlie Gordon
e83f6c99e1 improve colorization
- simpler test for BOM characters
- combine colors from syntax colorizer and styles buffer
2015-08-07 20:56:48 +00:00
Charlie Gordon
ff5865af95 use qe_isblank instead of qe_isspace in syntax colorizers 2015-08-07 20:55:40 +00:00
Charlie Gordon
5cc02fc9c7 factorize code in colorizers 2015-08-07 17:26:13 +00:00
Charlie Gordon
04bc922185 factorized check_fcall(), simplified some colorizers 2015-08-07 16:45:10 +00:00
Charlie Gordon
cab6df9cb8 add colorizer for the Groovy programming language 2015-08-07 08:28:59 +00:00
Charlie Gordon
b8eee898b3 simplify and improve java support
- parse @annotations generically
- assume all words with an initial capital and at least one lowercase letter
  are type names.
- colorize shebang line as preprocessor
2015-08-04 17:14:29 +00:00
Charlie Gordon
3097c63d03 fortran: added extensions .for and .f03 2015-08-04 11:22:33 +00:00
Charlie Gordon
e077f2caa0 rust: removed unused style 2015-08-04 11:21:07 +00:00
Charlie Gordon
4d17aec176 select fortran mode for files with .f95 extension 2015-07-30 17:52:07 +00:00
Charlie Gordon
2131032cfd added handler for LHA archives 2015-07-30 17:51:08 +00:00
Charlie Gordon
10d2c0959f bumped version, updated TODOs 2015-07-28 19:03:51 +00:00
Charlie Gordon
e5df36b74a add colorizer for Ralph Griswold icon language 2015-07-28 19:03:23 +00:00
Charlie Gordon
34a157ee0f cobol: small fix 2015-07-28 19:01:36 +00:00
Charlie Gordon
936d95b378 make r_lang probe more restrictive, fixed small issues 2015-07-28 19:00:28 +00:00
Charlie Gordon
a9a7f59bf0 added mode for the R language 2015-06-24 12:42:36 +00:00
Charlie Gordon
b57cbb7802 dired-mode: added dired-toggle-dot-files on . 2015-06-24 12:38:53 +00:00
Charlie Gordon
277d3da126 improved cobol mode, added keywords 2015-06-20 19:03:23 +00:00
Charlie Gordon
0b403ecb4e added cobol syntax colorizer 2015-06-19 21:44:43 +00:00
Charlie Gordon
5849caca73 added simplistic colorizer for EBNF and AntLR syntax 2015-06-19 21:42:58 +00:00
Charlie Gordon
0efc7d9c56 commented casts 2015-06-19 21:39:07 +00:00
Charlie Gordon
f0944465fc Fixed Makefile for rust-mode, rust is based on c-mode 2015-06-19 14:51:17 +00:00
Charlie Gordon
df82b6a4af added rust-mode for the Rust Programming Language 2015-06-19 14:49:10 +00:00
Charlie Gordon
a80d4e2dd4 improves markdown mode
* made verbatim block coloring completely generic using language name lookup
* removed global references to most snytax coloring modes
2015-06-19 14:34:30 +00:00
Charlie Gordon
671f634161 changed ustrstart() and ustristart() API
* take an `int *` for the match size instead of a `const unsigned int **`
2015-06-19 14:23:55 +00:00
Charlie Gordon
7806168c2e added variables to control the display of hidden files
* dired-show-dot-files: show files and directories starting with '.', default 1
* dired-ds-store: show .DS_Store files on Mac OS/X, default 0
2015-06-19 14:09:31 +00:00
Charlie Gordon
83439a2329 updated TODO.org 2015-06-08 09:19:04 +00:00
Charlie Gordon
78f3b2ec0c improved markdown mode
* made language support for code blocks generic
* fixed HTML comments
* fixed state bit allocation
* improved HTML block support with fewer state collisions
* colorize text and code in block quotes
2015-06-08 09:18:45 +00:00
Charlie Gordon
2d82194349 added scala syntax 2015-06-08 07:40:39 +00:00