Commit graph

477 commits

Author SHA1 Message Date
Charlie Gordon
6e8346d8f5 improved do_what_cursor_position:
- use buf_t to prevent buffer overflow
 - fixed octal and hex char output
 - display actual buffer bytes for encoded characters
2008-03-26 20:43:55 +00:00
Charlie Gordon
6106adfa09 fixed bug in buf_putc_utf8 2008-03-26 20:32:47 +00:00
Charlie Gordon
54b6f9c641 added reduce_filename to compute a stripped filename for mode probing
stripping VCS/backup prefixes and suffixes, fixing case.
added Lex (.l .lex) and .C files to C mode
fixed spurious error message at edit_set_mode_file
restored standard behaviour for extension() : return pointer to last extension
2008-03-26 08:03:55 +00:00
Charlie Gordon
74f5008613 ignore numeric extensions in extension() and match_extension() 2008-03-25 11:05:45 +00:00
Charlie Gordon
a261e3e64d fixed color tracking in tty_csi_m 2008-03-25 11:04:59 +00:00
Charlie Gordon
1f75556248 fixed buffer read-only mode in dired_mark 2008-03-25 11:02:52 +00:00
Charlie Gordon
e483a5bc9c added buffer variable EditBuffer::tab_size
added buffer variable EditBuffer::offset
added more tests for CONFIG_XV
added test on GCC version for forward reference on hex_mode
2008-03-25 10:13:37 +00:00
Charlie Gordon
b2122f442a fixed cygwin compile 2008-01-24 14:05:03 +00:00
Charlie Gordon
537217675b updated copyright 2008-01-18 17:04:58 +00:00
Charlie Gordon
9516917f97 added variables.h and variables.c for configurable state and window properties
cleaned up Makefile
renamed ModeDef::mode_line function pointer to get_mode_line
fixed some sparse warnings
use c99 syntax in video.c and image.c
added EditBuffer::offset for buffer parsing
added state variables QEmacsState::it, QEmacsState::ignore_spaces,
   QEmacsState::mmap_threshold
support variables in config file, strings can be delimited with ' and "
2008-01-18 17:03:35 +00:00
Charlie Gordon
cb8abc29fc added primitive Shell-script mode in module script.c
added extensions .idl .json .pcc for c-mode
match perl scripts on #!.*bin/perl.*
added DisplayState.space_width
added do_electric_filename on minibuf_mode / and ~
expand ~ syntax upon completing filename entry in minibuf
enable undo in minibuffer
2008-01-12 09:57:40 +00:00
Charlie Gordon
28397f424f moved input_methods to QEmacsState
qe_register_binding takes ModeDef* and returns status
cosmetic changes in QEDisplay API
added int dpy_init(QEditScreen *s, QEDisplay *dpy, int w, int h);
  copies *dpy (or dummy_dpy if NULL) to QEditScreen and calls method
simplified dpy_init methods and calls
inlined 5 more methods
moved dummy_dpy to display.c and simplified
simplified to_hex
simplified qe_colors array handling
2008-01-11 11:29:28 +00:00
Charlie Gordon
de952df347 changed Makefile and ifdefs to link tiny version as tqe at all times
moved kmap code from input.c to new file kmap.c
updated TODO
2008-01-10 12:21:05 +00:00
Charlie Gordon
2681b68040 removed EditBuffer.yank_mark and QEmacsState.mark_yank_region
changed API for GetColorizedLineFunc: offset passed by address,
  updated to start of next line
added check_readonly(EditState *s)
added tentative code for unregistring bindings, cycling modes and charsets
experiment alternate method for region highlighting:
  added EditState.region_style and EditState.curline_style
  added QEmacsState.hilite_region
  added DisplayState.style
  added clear_color to reset style bits in unicode array
  display_char_bidir takes style from DisplayState, code point is bare.
  fixed problem in text_display where line_num was not computed in shell mode
  handle region coloring in text_display (tentative)
display line numbers and hex dump offsets as QE_STYLE_COMMENT
display hex dump as QE_STYLE_FUNCTION
2008-01-09 13:41:40 +00:00
Charlie Gordon
a5eae3ed92 bumped copyrights, some cosmetics 2008-01-08 16:37:54 +00:00
Charlie Gordon
98939ddcac changed API for completion functions:
- use CompleteState struct
- use complete_test for each potential match with simple prefix comparison
added new smart string compare function qe_collate to sort strings in
  lexicographical order but sort numeric portions in numerical order
use qe_collate in popup lists and dired
removed redundant alias "iso8859-2"
added strequal(a,b) as an alias for !strcmp(a,b)
  this function makes string collation with strcmp more explicit
  this even fixed a spurious bug in do_set_emulation
2008-01-08 03:42:53 +00:00
Charlie Gordon
ae163f897b fixed crash on charset_completion
renamed css_strtolower -> qe_strtolower
use offsetof for SAVED_DATA_SIZE macro (this stuff must go)
cosmetics in css_get_enum
remarks
fixed text-mode colorization bug: because of saved_data stuff,
  must reset colorization function after mode restore.  This saved data
  stuff is bogus and should be rewritten
smaller version of roman numeral converter
fixed alpha converter
smaller implementation of css_counter_str
fixed list_mode name: no longer generates extra mode completion entry
2008-01-07 16:25:22 +00:00
Charlie Gordon
26319c05a7 cosmetics: reformated command definitions 2008-01-04 23:04:11 +00:00
Charlie Gordon
f11cf4a207 eb_scratch takes buffer creation flags
added eb_find_new -> find a buffer by name, create one from flags if not found.
qe_register_cmd_table takes ModeDef* instead of mode name
do_global_set_key -> do_set_key with local/global flag
added local-set-key
reuse *bufed* buffer if one exists
bind increase/decrease-width commands from command definition
cosmetics, comments, remarks
renamed kill buffers from *yank* to *kill-%d*
save QErrorContext in parse_args, load_all_modules:
  improves readability in *messages* buffer
fixed qe_init to fall back from x11 display to terminal session upon failure
2008-01-04 22:24:37 +00:00
Charlie Gordon
a71b9efbb4 renamed do_set_mode -> edit_set_mode
use match_extension in mode probe functions
pass move indicator to do_return, removed do_open_line
renamed do_cmd_set_mode -> do_set_mode for consistency
separated strfind and strcasefind, optimized implementation
published register_input_method
unpublished input_methods
optimized KeyDef structure layout
changed eb_search arguments
used eb_delete_range
comments, remarks
better tests on fread failures
set buffer to read-only upon loading non writable file
do_insert_file tests for failure
  set mark at beginning of inserted block and offset at the end
fixed search for word boundary case
made raw_load_buffer1 return number of bytes read, of -1 on error
2008-01-03 18:31:24 +00:00
Charlie Gordon
4743fa1308 added remove_slash and append_slash path utilities
renamed canonize to canonicalize
added crude support for ~user -> /home/user
added win32 specific stuff in basename
added C-/ as an alias for C-_
some cosmetics, moved code
create files with mode 0644 in raw_save_buffer
untabified, removed redundant spaces
modified code generators to the same effect
2008-01-03 09:51:29 +00:00
Charlie Gordon
bef7b245a1 removed redundant object unihex.o
generate module initialization list automatically
2007-12-27 11:20:38 +00:00
Charlie Gordon
c556f52763 renamed set_buffer_name to eb_set_buffer_name
made log buffer more readable with log structure padding trick
renamed set_filename to eb_set_filename
added CmdSig enum and CmdProto union for signature based command dispatcher
changed CmdDef structure, val is now required to be an integer (24 bits)
intrinsic string argument ('S') is now passed as prompt with S{xxx} syntax
changed set-mode functions and do_define_kbd_macro accordingly
added signature in CMD_ and CMDV macros
renamed do_load to do_find_file
2007-12-27 10:04:09 +00:00
Charlie Gordon
090b71f4b4 pass argval to list-buffers command, making all buffers visible 2007-12-27 10:01:32 +00:00
Charlie Gordon
6d3fed85ac cosmetics, comments 2007-12-26 11:09:34 +00:00
Charlie Gordon
b4e1063722 recognise perl module extension .pm
use qe_isalpha_ and qe_isalnum_
use more conservative method for special variable matching
recognize numbers starting with .
2007-12-26 10:24:11 +00:00
Charlie Gordon
79770ea8a8 renamed do_quit -> do_exit_qemacs, takes argval:
exits unconditionally if passed argument
do_not_modified takes argval: set modified status if passed argument
fixed argval passing to do_execute_command
M-- start argument with -4, or changes sign
protect against buffer overflow in qe_key_process (repeated C-u caused it)
bind search forward/backward to M-S and M-R
pass argval to do_replace_string, matches words if set
fixed word matching in search function
published search/replace functions as commands
published do_end_macro and do_cmd_set_mode
use name argval instead of argument for universal argument passed to command
2007-12-26 10:20:09 +00:00
Charlie Gordon
084ae4f628 use qe_isalnum_ 2007-12-26 09:56:14 +00:00
Charlie Gordon
538d127573 use qe_isalpha_ and qe_isalnum_ in parser
moved block navigation and kill functions to generic command table
2007-12-26 09:55:35 +00:00
Charlie Gordon
23d29addbf added qe_isalpha_(int c) and qe_isalnum_(int c): alpha/alnum + underscore
added qe_inrange(intc, int a, int b), use it in qe_isxxx
2007-12-26 09:53:46 +00:00
Charlie Gordon
093951820b simplified probe code 2007-12-26 09:52:07 +00:00
Charlie Gordon
f4193d52f2 prevent potential buffer overflow 2007-12-26 09:49:52 +00:00
Charlie Gordon
a0ea65c425 pass argument to do_char, do_tab, do_quote (fixes bug in C-u C-q a)
pass closure to quote_key
2007-12-25 07:54:00 +00:00
Charlie Gordon
1ddbbf66f4 fixed Cygwin compile:
- fixed clash on FWRITE redefinition
- fixed crash on do_toggle_control_h(NULL...)
- fixed some Makefile issues
2007-12-24 10:22:22 +00:00
Charlie Gordon
f6d34c25cf use bold flag for high intensity tty colors
use default PuTTY colors
2007-12-24 09:31:36 +00:00
Charlie Gordon
8142f3a9e3 fixed eb_replace API
added capitalize-word (M-c) and capitalize-region (M-C-c)
fixed eb_changecase and added support for capitalization
simplified do_changecase_word and do_changecase_region
2007-12-21 22:34:31 +00:00
Charlie Gordon
a662a31c8d improved Perl mode:
- fixed multiline format template support
- fixed multiline here documents
match mode on file first line, same as /^#!.*/usr/bin/perl.*/
2007-12-21 14:29:54 +00:00
Charlie Gordon
aefd95484f added const void *memstr(const void *buf, int size, const char *str);
added line_len and total_size in ModeProbeData structure
extended SEARCH_LENGTH to 256, allowing upto 256 matches in incremental C-s
2007-12-21 14:27:11 +00:00
Charlie Gordon
f1b6c45623 moved more configuration control to configure script
cleaned Makefile a bit
2007-12-21 14:24:08 +00:00
Charlie Gordon
d3d937acc6 fixed compile warning on empty printf formats 2007-12-21 12:34:08 +00:00
Charlie Gordon
658149e9f8 moved global variables to QEmacsState structure:
- first_mode, first_key, first_cmd,
 - first_completion, first_history
 - trace_buffer, trace_buffer_state,
 - backspace_is_control_h
2007-12-21 12:30:55 +00:00
Charlie Gordon
8a2ad8b193 made color table handling simpler and more consistent 2007-12-21 12:30:34 +00:00
Charlie Gordon
2ba4b76e20 fixed popup bug caused by readonly flag 2007-12-21 12:20:17 +00:00
Charlie Gordon
1a6fe3489e use INT_MAX instead of MAXINT
use INT_MIN for NO_ARG
2007-12-21 10:32:27 +00:00
Charlie Gordon
c0d551da2e use generic prompt system for write-file and simplify do_save_buffer
use INT_MAX instead of MAXINT
use INT_MIN for NO_ARG
2007-12-21 10:30:24 +00:00
Charlie Gordon
8732586d6a reordered commands in qeconfig.h 2007-12-21 10:28:14 +00:00
Charlie Gordon
6754c5379d fixed configure and Makefile for tiny build
updated statistics in qe-doc (sadly, sizes have increased substantially)
2007-12-20 21:37:34 +00:00
Charlie Gordon
ddf57b1f6e new_shell_buffer takes a optional buffer argument 2007-12-20 20:41:19 +00:00
Charlie Gordon
58f37aad91 adjust bogus window size 2007-12-20 20:40:55 +00:00
Charlie Gordon
69b5b1f40e comments 2007-12-20 20:39:18 +00:00