Commit graph

216 commits

Author SHA1 Message Date
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
Charlie Gordon
4f0ad2e393 new_shell_buffer takes a optional buffer argument
comments, simplifications
2007-12-20 20:37:16 +00:00
Charlie Gordon
0bf19ae51b added dependencies 2007-12-20 20:35:20 +00:00
Charlie Gordon
788461233d raw_save_buffer takes range and returns number of bytes written
added eb_write_buffer, returns number of bytes written
renamed save_buffer to eb_save_buffer, returns number of bytes written
added range in buffer_save method in EditBufferDataType
no longer reset undo log upon file saving
renamed do_save to do_save_buffer
added do_write_region (bound to C-X w)
renamed command execute-extended-command to execute-command
renamed command vc-toggle-read-only to toggle-read-only
fixed mark-whole-buffer to set point to start and mark to end of buffer
query-replace accept upper-case Y and N, and . for replace and quit.
shell passes universal argument to do_shell
bind next-error to C-X `
2007-12-20 16:27:21 +00:00
Charlie Gordon
30cb0c37fb simplified string coloring 2007-12-20 11:52:33 +00:00
Charlie Gordon
e86feb3b8f added offsetof macro for platforms that do not have it
added eb_clear, eb_scratch, eb_replace, eb_delete_range
added remarks about inconsistentcies
check buffer readonly status in low level buffer primitives
2007-12-20 11:49:54 +00:00
Charlie Gordon
c6514ec938 cosmetics 2007-12-20 11:45:45 +00:00
Charlie Gordon
c367d06f88 improved consistency
added remarks for commands that should take argval
2007-12-20 11:45:12 +00:00
Charlie Gordon
24b0aa5f6e use transparent background for HTML src styles 2007-12-20 11:33:55 +00:00
Charlie Gordon
fa760147c8 added Perl mode: perl.c
added Makefile mode: makemode.c
added HTML source mode: htmlsrc.c
added more dependencies in Makefile
added styles for HTML source coloring:
    html-comment, html-string, html-script, html-entity, html-tag
no longer rely on \n at end of line in c_colorize_line
2007-12-18 18:07:03 +00:00
Charlie Gordon
2d70f198fb added sanity tests
append system buffers to list instead of prepending them
2007-12-18 17:59:48 +00:00
Charlie Gordon
740f087f60 added defines for MAX_BUFFERNAME_SIZE (256) and MAX_CMDNAME_SIZE (32)
added char *get_dirname(char *dest, int size, const char *file);
added int match_extension(const char *filename, const char *extlist);
fixed prototype for umemmove
added umemcpy, umemcmp
added int get_clock_usec(void);
increased NB_LOGS_MAX to 100000 (was 50 !)
eb_printf return int
added various disabled fields in structures
added int scale(int a, int b, int c);
added "grey" color
added int get_clock_usec(void);
2007-12-18 17:57:11 +00:00