Commit graph

24 commits

Author SHA1 Message Date
Charlie Gordon
5b1dca5f04 html-mode: add global variable to enable/disable mode
- add use_html global variable
- default value is 1, set to 0 in ~/.qe/config to disable html parser
2017-06-22 22:02:25 +00:00
Charlie Gordon
c5a3bb8ecb updated heading 2017-03-25 18:14:59 +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
9ddd52a7ac basic: made force-tty a global setting and user accessible variable 2016-03-07 10:35:22 +00:00
Charlie Gordon
9b433ae687 sessions: implement session saving/restoring
- add qe_save_variables(s, b)
- add use_session_file global variable
- add VarDef::modified flag to detect customized variables
- set modified flag upon variable modifications
- dired: set modified flag when changing in dired variables
- fix BUG in qe_register_variables, did not set set_value handler
  on last VarDef element
- make qe_save_variables() public
- remove do_save_variables(), move save_session() to parser.c
- add eb_puts() and eb_putc() for consistency
- add WF_HIDDEN window flag to temporarily flag windows to be deleted
- add do_hide_window(), do_delete_all_windows() and do_delete_hidden_windows()
- add qe_save_window_layout() to save window layout to session file
- add do_create_window(s, filename, layout) to restore window layout
- add qe_save_macros() to save keyboard macros to session file
- detect keyboard macro redefinitions and avoid duplicates
- add qe_save_open_files() to save list of open files and directories
- pass `all` flag to do_delete_other_windows() to force complete deletion
- add qe_load_session() and do_save_session():
  * qe_load_session() is invoked before parsing the command line if
    use_session_file is set, via the config file or command line option (-s)
  * do_save_session() is invoked just before closing qemacs.  It can also
    be invoked as a command and shows a popup window with the contents of
    the session file produced instead of saving it.
- fix CRASH BUG in command definitions, missing argument specifier caused
  spurious crashes when invoking commands from script files. This affected:
  find-file(), find-file-other-window(), find-alternate-file(), kill-buffer()
  load-file-from-path().
- insert newly created windows in list in top-down left-right order
- update WF_RSEPARATOR flag upon deletion of vertically split window
2015-09-10 00:25:23 +00:00
Charlie Gordon
72f67310fa variables: add value setting handler support
- Allow handler to return error codes VAR_INVALID or VAR_READONLY
- Display explicit error messages
- Add variables.h to generic dependency list in Makefile
2015-08-30 12:03:46 +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
745972e2fd variables: added VAR_RW_SAVE type for session saving code 2015-08-13 23:00:26 +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
9a1fcba3d1 changed some disabled definitions 2014-05-30 23:13:04 +00:00
Charlie Gordon
e8cebf9d51 improve c-mode
* use mode specific namespace for colorizer states and styles
* use enum values instead of preprocessor macros for states and styles
* expand list of javascript keywords
* fix js regex parser to ignore / in char classes, remove #{} hack
* use generic indenter in do_c_electric and do_c_return
* add auto-indent variable and behavior
2014-04-02 13:05:42 +00:00
Charlie Gordon
c455dedb3e add global variable backup-inhibited
* do not backup files if backup-inhibited
2014-03-15 23:15:53 +00:00
Charlie Gordon
e967914b5a improve consistency in new/delete methodology
* use qe_mallocz for all structures
* prevent spurious uses of malloc/free/realloc
* pass pointers to pointers to all deletion functions
* use consistent patterns for list deletions
* add more dependencies in Makefiles
2014-01-23 12:56:22 +00:00
Charlie Gordon
b953aaf811 improve consistency in buffer variables
* change tab-size to tab-width
* make tab-width a buffer variable
* add fill-column buffer variable
* add set-fill-column on C-x f
* add default-tab-width and default-fill-column global variables
* force indent-tabs-mode in makefile mode
* force tab-width to 8 in shell output buffers
2014-01-21 00:01:20 +00:00
Charlie Gordon
b3a709013a improve mode selection, cleanup
* pass ModeDef pointer to mode_probe functions
* add extensions field to mode structure
* rename ascii mode to binary mode
* rename mode variables and fields to more specific names
2014-01-04 17:26:30 +00:00
Charlie Gordon
62ee618b0d - added compile time test for qe_free argument type: must be pointer to pointer
- fixed crash bug in qe_unregister_binding1, missing indirection in qe_free argument
- added Darwin specific definition for 'end' (this is an ugly patch, to be removed)
- fixed crash bug in qe_set_variable, missing indirection in qe_free argument
2013-11-22 20:50:20 +00:00
Charlie Gordon
9af558752e added about-qemacs command on C-H ? and f1
improved list-variables
2008-04-30 07:18:34 +00:00
Charlie Gordon
b82a15d4e4 added extra help functions:
added command apropos(string)
added command show-bindings(cmd_name)
moved describe-bindings to extras.c
added qe_get_prototype(CmdDef *d, char *buf, int size);
added an extra argument to qe_get_variable() to produce value as source
fixed typo on window variable window-height
fixed type mismatch on mode variable mode-name
added var_domain string array
added strquote conversion function with simplistic implementation
added history tags for all commands
2008-04-29 18:55:14 +00:00
Charlie Gordon
caf6950145 renamed CMD_ and CMDV to CMD2 and CMD3 for consistency 2008-04-25 10:46:58 +00:00
Charlie Gordon
58b5872c52 fixed OpenBSD compile issues:
- check OpenBSD as uname output
- no longer use strcpy, strcat, sprintf
- added CONFIG_PTSNAME to disable Unix98 API under BSD
- fixed crash bug in tty.c on empty window
2008-04-15 23:24:03 +00:00
Charlie Gordon
d4d6f8a0f3 fixed some configure issues for mingw compile under cygwin
added CONFIG_MMAP to control availability of memory mapped files
added CONFIG_DOC to control doc rebuild
use state variables to control file mmapping and loading
default limit of 512MB for loading file
try and load the file upon mmap failure
do not use alloca in CONFIG_WIN32
use CONFIG_WIN32 instead of WIN32
update Makefile to enable win32 build under cygwin (dumps core)
renamed mouse_event to prevent compile warning
patched unix.c util.c win32.c to enable WIN32 compile
fixed kmap.c to load mapping files when mmap fails or is unavailable
2008-04-05 23:04:56 +00:00
Charlie Gordon
72e59be778 fixed crash bug on forward_block in text mode:
- renamed get_colorized_line() to generic_get_colorized_line
 - added get_non_colorized_line() for uncolored modes
 - renamed EditState::get_colorized_line_func to get_colorized_line
   make this function pointer always non NULL

fixed bug in global-set-key: current bindings could not be overloaded

better tty charset detection and handling:
 - always use utf8 when output is not a tty
 - allow override with -c CHARSET command line option
 - added state variable show-unicode to display non latin1 as \uXXXX
 - added command line argument -c CHARSET (--ttycharset) to specify the
   charset of the tty. tty charset is reported in *messages* buffer at startup
 - display unsupported glyphs as half-width or full-width question mark pairs

improved tty output: use kill_end_of_line escape sequence
2008-03-29 18:06:41 +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