summaryrefslogtreecommitdiff
path: root/libguile/private-options.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up srcprops implementationAndy Wingo2020-09-031-11/+10
| | | | | | | | | | | | | | | | | * libguile/deprecated.c (scm_sym_copy, scm_make_srcprops): Deprecate. * libguile/deprecated.h (scm_tc16_srcprops) (SCM_SOURCE_PROPERTY_FLAG_BREAK): Deprecate. * libguile/private-options.h (SCM_COPY_SOURCE_P): Remove. * libguile/read.c (struct t_read_opts, scm_read_options): Remove useless copy read option. (maybe_annotate_source): Change line and column to be tagged, and subtract off lookahead here. Change all callers. (READ_OPTION_COPY_SOURCE_P): Remove, renumbering other options. (init_read_options): Remove copy option. * libguile/srcprop.c: Change to put filename inline in source properties. Update private implementation. * libguile/srcprop.h (SCM_PROCTRACEP): Remove. Unusable given that scm_sym_trace was undefined.
* Update license notices in all C filesAndy Wingo2018-06-201-17/+17
| | | | | Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
* libguile header files have uniform format for copyright declarationsAndy Wingo2018-06-201-7/+2
|
* Remove (C) from copyright statementsAndy Wingo2018-06-201-1/+1
| | | | | | As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
* print: Support R7RS |...| symbol notation.Mark H Weaver2014-01-141-1/+2
| | | | | | | | | | | | | | | | | | | * libguile/print.c (scm_print_opts): Add 'r7rs-symbols' print option. (symbol_has_extended_read_syntax): If the 'r7rs-symbols' option is enabled, then disallow '|' and '\' from bare symbols. (print_extended_symbol): Use 'scm_lfwrite' and 'scm_putc' instead of 'display_string' and 'display_character' when printing ASCII literals. (print_r7rs_extended_symbol): New static function. (scm_i_print_symbol_name): If the 'r7rs-symbols' option is enabled, use 'print_r7rs_extended_symbol' instead of 'print_extended_symbol'. * libguile/private-options.h (SCM_PRINT_R7RS_SYMBOLS_P): New macro. (SCM_N_PRINT_OPTIONS): Increment. * doc/ref/api-evaluation.texi (Scheme Write): Mention 'r7rs-symbols' print option. * test-suite/tests/print.test ("write"): Add tests.
* read: Support R7RS |...| symbol notation.Mark H Weaver2014-01-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | * libguile/private-options.h (SCM_R7RS_SYMBOLS_P): New macro. (SCM_N_READ_OPTIONS): Increment. * libguile/read.c (scm_read_opts): Add entry for 'r7rs-symbols'. (t_read_opts): Add field for 'r7rs_symbols_p'. (scm_read_string_like_syntax): New function based on earlier 'scm_read_string' that handles either string literals or R7RS quoted symbols (delimited by vertical bars), depending on the value of 'chr'. (scm_read_string): Reimplement based on 'scm_read_string_like_syntax'. (scm_read_r7rs_symbol): New static function. * doc/ref/api-data.texi (Symbol Read Syntax): Briefly describe the R7RS symbol syntax, mention the 'r7rs-symbols' read option, and give some examples. * doc/ref/api-evaluation.texi (Scheme Read): Mention the 'r7rs-symbols' read option. * test-suite/tests/reader.test ("reading"): Add test.
* Increment SCM_N_READ_OPTIONS for 'curly-infix' option.Mark H Weaver2014-01-081-1/+1
| | | | | * libguile/private-options.h (SCM_N_READ_OPTIONS): Increment to 8. This should have been done when the 'curly-infix' was added.
* Implement SRFI-105 curly infix expressions.Mark H Weaver2012-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/private-options.h: Add SCM_CURLY_INFIX_P macro, and increment SCM_N_READ_OPTIONS. * libguile/read.c (sym_nfx, sym_bracket_list, sym_bracket_apply): New variables. (scm_read_opts): Add curly-infix reader option. Reformat to comply with GNU coding standards. (scm_t_read_opts): Add curly_infix_p and neoteric_p fields. (init_read_options): Initialize new fields. (CHAR_IS_DELIMITER): Add '{', '}', '[', and ']' as delimiters if curly_infix_p is set. (set_port_square_brackets_p, set_port_curly_infix_p): New functions. (read_inner_expression): New function which contains the code that was previously in 'scm_read_expression'. Handle curly braces when curly_infix_p is set. If curly_infix_p is set and square_brackets_p is unset, follow the Kawa convention: [...] => ($bracket-list$ ...) (scm_read_expression): New function body to handle neoteric expressions where appropriate. (scm_read_shebang): Handle the new reader directives: '#!curly-infix' and the non-standard '#!curly-infix-and-bracket-lists'. (scm_read_sexp): Handle curly infix lists. * module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-105 feature identifier. * doc/ref/srfi-modules.texi (SRFI-105): Add stub doc for SRFI-105. * doc/ref/api-evaluation.texi (Scheme Read): Add documentation for the 'curly-infix' read option, and the '#!curly-infix' and '#!curly-infix-and-bracket-lists' reader directives. * doc/ref/api-options.texi (Runtime Options): Add 'curly-infix' to the list of read options. * test-suite/Makefile.am: Add tests/srfi-105.test. * test-suite/tests/srfi-105.test: New file.
* new print option escape-newlines, defaults to #tAndy Wingo2011-12-041-1/+4
| | | | | | | | | * libguile/private-options.h (SCM_PRINT_ESCAPE_NEWLINES_P): * libguile/print.c: Add new escape-newlines print option, defaulting to on. (write_character): For newlines, if SCM_PRINT_ESCAPE_NEWLINES_P, then print them as \n. (scm_init_print): Refactor print options initialization.
* implement r6rs hungry escaped EOLAndy Wingo2011-01-211-1/+2
| | | | | | | | | | | * libguile/private-options.h (SCM_HUNGRY_EOL_ESCAPES_P): New private option. * libguile/read.c: Define SCM_HUNGRY_EOL_ESCAPES_P, defaulting to #f. (skip_intraline_whitespace): New helper. (scm_read_string): If SCM_HUNGRY_EOL_ESCAPES_P, skip_intraline_whitespace after an escaped EOL. * test-suite/tests/reader.test ("read-options"): Add test.
* scm_debug_opts to debug.c, backtrace on by default, scm_*_opts internal linkageAndy Wingo2010-10-011-3/+3
| | | | | | | | * libguile/eval.c: * libguile/debug.c (scm_debug_opts): Move here, from eval.c. Change SCM_BACKTRACE_P to 1, initially. * libguile/private-options.h: Make all options vars private.
* remove elisp-strings and elisp-vectors read optionsAndy Wingo2010-10-011-5/+3
| | | | | | | | | | | * libguile/private-options.h (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): * libguile/read.c (scm_read_opts): Remove unused elisp-vectors option, and the elisp-strings option (which allowed \( and \) escapes in strings). (scm_read_string): Remove the elisp-strings case. * doc/ref/api-options.texi (Reader options): Update, and update wording of the case-insensitive bit.
* remove unused print-optionsAndy Wingo2010-10-011-7/+5
| | | | | | | * libguile/private-options.h (SCM_PRINT_CLOSURE, SCM_PRINT_SOURCE_P): * libguile/print.c (scm_print_opts): * doc/ref/api-options.texi (Printing options): Remove source and closure-hook print options.
* remove a number of debug optionsAndy Wingo2010-09-241-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * libguile/private-options.h (SCM_BREAKPOINTS_P, SCM_TRACE_P) (SCM_REC_PROCNAMES_P, SCM_BACKTRACE_INDENT, SCM_N_FRAMES) (SCM_BACKTRACE_MAXDEPTH, SCM_DEVAL_P): Remove these internal names. * libguile/eval.c (scm_debug_opts): Remove the corresponding debug options -- breakpoints, trace, procnames, indent, frames, maxdepth, and debug. * libguile/debug.c (scm_debug_options): Remove SCM_N_FRAMES check. * test-suite/lib.scm (with-debugging-evaluator*): * module/scripts/summarize-guile-TODO.scm: * module/statprof.scm (statprof-reset): * module/ice-9/boot-9.scm (turn-on-debugging): Remove useless debug-enable 'debug calls. * module/ice-9/deprecated.scm (debug-enable): As it seems that 'debug is a particulatly common option that we just removed, add a deprecation shim. * doc/ref/api-options.texi (Debugger options): Update the set of debug options.
* remove evaluator-traps-interfaceAndy Wingo2010-09-241-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/debug.h: * libguile/debug.c (scm_with_traps): * libguile/eval.c (scm_evaluator_traps, scm_evaluator_trap_table): Remove these procedures. Note that scm_evaluator_traps was known in Scheme as `evaluator-traps-interface'. * libguile/private-options.h (SCM_TRAPS_P, SCM_ENTER_FRAME_P) (SCM_APPLY_FRAME_P, SCM_EXIT_FRAME_P, SCM_ENTER_FRAME_HDLR) (SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR, SCM_MEMOIZE_P) (SCM_MEMOIZE_HDLR): Remove these private interfaces. * module/ice-9/boot-9.scm (traps, trap-enable, trap-disable, trap-set!): Remove. * module/ice-9/scm-style-repl.scm (error-catching-loop): Remove with-traps wrap. * doc/ref/api-options.texi (Low level options interfaces): (User level options interfaces, Evaluator trap options) * doc/ref/api-evaluation.texi (Evaluator Behavior): Remove references to the evaluator traps interface.
* remove eval-optionsAndy Wingo2010-09-241-6/+0
| | | | | | | | | | | | * libguile/eval.c: * libguile/private-options.h (scm_eval_opts, scm_eval_options_interface) (SCM_EVAL_STACK): Remove these private interfaces. * module/ice-9/boot-9.scm (eval-options, eval-enable, eval-disable) (eval-set!): Remove these procedures. * doc/ref/api-evaluation.texi: * doc/ref/api-options.texi: Remove references to eval options.
* lisp nil always enabledAndy Wingo2010-04-091-9/+0
| | | | | | | | | | | | | | | * configure.ac: Remove --disable-elisp option. Lisp nil is always enabled. * libguile/boolean.h: * libguile/gen-scmconfig.c: * libguile/gen-scmconfig.h.in: * libguile/init.c: * libguile/lang.c: * libguile/lang.h: * libguile/pairs.h: * libguile/private-options.h: * libguile/read.c: Remove conditionals for disabling elisp.
* reader options macros incorrect when SCM_ENABLE_ELISP undefinedMichael Gran2010-01-171-3/+6
| | | | | | | | | | When compiled with SCM_ENABLE_ELISP undefined, the reader options macros SCM_R6RS_ESCAPES_P and SCM_SQUARE_BRACKETS_P point past the end of the scm_read_opts struct. *libguile/private-options.h (SCM_R6RS_ESCAPES_P) [!SCM_ENABLE_ELISP]: modified (SCM_SQUARE_BRACKETS_P) [!SCM_ENABLE_ELISP]: modified (SCM_N_READ_OPTIONS): modified
* add reader option for parsing [] as ().Andy Wingo2010-01-151-1/+2
| | | | | | | | | | * libguile/private-options.h: * libguile/read.c (scm_read_opts, SCM_SQUARE_BRACKETS_P): Add an option for treating [ and ] as parentheses, on by default. Note that this makes them delimiters also, so [ and ] cannot appear in a symbol name, with this read option on. (scm_read_sexp): If we start with [, we end with ]. (scm_read_expression): Add case for [.
* Reader option for R6RS hex escapesMichael Gran2010-01-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | This adds a reader option 'r6rs-hex-escapes that modifies the behavior of numeric escapes in characters and strings. When enabled, variable-length character hex escapes (#\xNNN) are allowed and become the default output format for numerically-escaped characters. Also, string hex escapes switch to a semicolon terminated hex escape (\xNNNN;). * libguile/print.c (PRINT_CHAR_ESCAPE): new macro (iprin1): use new macro PRINT_CHAR_ESCAPE * libguile/private-options.h (SCM_R6RS_ESCAPES_P): new #define * libguile/read.c (scm_read_opts): add new option r6rs-hex-escapes (SCM_READ_HEX_ESCAPE): modify to take a terminator parameter (scm_read_string): parse R6RS hex string escapes (scm_read_character): parse R6RS hex character escapes * test-suite/tests/chars.test (with-read-options): new procedure (R6RS hex escapes): new tests * test-suite/tests/strings.test (with-read-options): new procedure (R6RS hex escapes): new tests
* remove unused scm_eval_stack varAndy Wingo2009-12-011-3/+1
| | | | | | * libguile/private-options.h: * libguile/eval.c (scm_eval_stack): Remove declaration and definition of unused scm_eval_stack variable.
* Change Guile license to LGPLv3+Neil Jerram2009-06-171-6/+7
| | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* * private-options.h: idem.Han-Wen Nienhuys2007-01-221-1/+1
| | | | | | | | | | | | | | | | * eval.i.c: copyright nitpicking. * eval.c: distangle. move duplicate code to eval.i.c and include twice. * eval.i.c: new file. * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c, read.h, stacks.c, symbols.c, throw.c: use private-options.h * private-options.h: new file: contain hardcoded option definitions.
* * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.cHan-Wen Nienhuys2007-01-221-0/+103
eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c, read.h, stacks.c, symbols.c, throw.c: use private-options.h * private-options.h: new file: contain hardcoded option definitions.