bpt/emacs.git
21 months agodeclare smobs in alloc.c wip
Robin Templeton [Mon, 18 Jul 2022 22:10:55 +0000 (18:10 -0400)]
declare smobs in alloc.c

21 months agoextern lisp.h smobs
Robin Templeton [Mon, 18 Jul 2022 21:19:20 +0000 (17:19 -0400)]
extern lisp.h smobs

8 years agobetter load-path defaults
Robin Templeton [Tue, 12 May 2015 23:10:41 +0000 (19:10 -0400)]
better load-path defaults

8 years agoremove ".elc" from load-suffixes
Robin Templeton [Tue, 12 May 2015 18:38:57 +0000 (14:38 -0400)]
remove ".elc" from load-suffixes

* src/lread.c (syms_of_lread): Remove ".elc" from load-suffixes.

9 years agomake_lisp_proc bug
Robin Templeton [Sun, 7 Dec 2014 22:59:28 +0000 (17:59 -0500)]
make_lisp_proc bug

* src/lisp.h (make_lisp_proc): Return the `self' object from the
  structure header. This prevents the allocation of distinct objects
  representing the same process. Thanks to Matt Kramer
  <matt314159@gmail.com> for the report.

9 years agodisable GC_all_interior_pointers
Robin Templeton [Fri, 26 Sep 2014 08:20:26 +0000 (04:20 -0400)]
disable GC_all_interior_pointers

* src/emacs.c (main): Don't enable `GC_all_interior_pointers'.
* src/eval.c (specpdl_base): New variable.
  (init_eval_once, grow_specpdl): Save the dummy entry preceding the
  specpdl in `specpdl_base'.

9 years agocut debugger frames from backtraces
Robin Templeton [Tue, 23 Sep 2014 04:44:45 +0000 (00:44 -0400)]
cut debugger frames from backtraces

Thanks to Oleg Sivokon <olegsivokon@gmail.com> for the report.

* lisp/emacs-lisp/debug.el (debug-inner-cut): New variable.
  (debug-1): New function extracted from `debug'.
  (debug): Call `debug-1' in a new prompt, binding `debug-inner-cut'
  to the prompt tag.
  (debugger-setup-buffer): Cut the backtrace with `debug-inner-cut'.

9 years agoprint scheme objects unreadably
Robin Templeton [Mon, 22 Sep 2014 14:40:59 +0000 (10:40 -0400)]
print scheme objects unreadably

* src/lread.c (print_object): Print Scheme objects unreadably, instead
  of printing them in Scheme syntax. Thanks to Taylan Ulrich
  Bayırlı/Kammer <taylanbayirli@gmail.com> for the report.

9 years agoremove use of nested function in map_obarray
Robin Templeton [Sun, 21 Sep 2014 07:56:15 +0000 (03:56 -0400)]
remove use of nested function in map_obarray

* src/lread.c (map_obarray_inner): New function.
  (map_obarray): Remove use of non-standard nested function. Thanks to
  Jaime Fournier <jaimef@linbsd.org> for the bug report.

9 years agodon't use function-equal in nadvice
Robin Templeton [Sun, 21 Sep 2014 07:55:11 +0000 (03:55 -0400)]
don't use function-equal in nadvice

* lisp/emacs-lisp/nadvice.el (advice--set-buffer-local): Use `equal'
  instead of `function-equal'.

9 years agoguile feature
Robin Templeton [Sun, 21 Sep 2014 07:53:07 +0000 (03:53 -0400)]
guile feature

* src/fns.c (syms_of_fns): Add `guile' to `features'.

9 years ago* configure.ac: Require Guile 2.2.
Robin Templeton [Thu, 18 Sep 2014 01:55:57 +0000 (21:55 -0400)]
* configure.ac: Require Guile 2.2.

9 years agoremove eval-when-compile and eval-and-compile
Robin Templeton [Mon, 18 Aug 2014 05:18:13 +0000 (01:18 -0400)]
remove eval-when-compile and eval-and-compile

9 years agoguile string conversion functions
Robin Templeton [Mon, 18 Aug 2014 05:18:03 +0000 (01:18 -0400)]
guile string conversion functions

9 years agoavoid recursive `require' when loading semantic
Robin Templeton [Sun, 17 Aug 2014 23:13:55 +0000 (19:13 -0400)]
avoid recursive `require' when loading semantic

9 years agoalways load from source directory
Robin Templeton [Tue, 12 Aug 2014 11:42:51 +0000 (07:42 -0400)]
always load from source directory

9 years agoautoloading eval-when forms
Robin Templeton [Tue, 12 Aug 2014 11:42:29 +0000 (07:42 -0400)]
autoloading eval-when forms

9 years agodon't require grep in vc-git
Robin Templeton [Tue, 12 Aug 2014 11:41:26 +0000 (07:41 -0400)]
don't require grep in vc-git

9 years agodefun/defmacro autoload generation
Robin Templeton [Tue, 12 Aug 2014 11:41:14 +0000 (07:41 -0400)]
defun/defmacro autoload generation

9 years agoguile-elisp defsubst
Robin Templeton [Mon, 11 Aug 2014 11:01:49 +0000 (07:01 -0400)]
guile-elisp defsubst

9 years agoscheme interaction mode
Robin Templeton [Mon, 11 Aug 2014 11:01:19 +0000 (07:01 -0400)]
scheme interaction mode

9 years agoignore-errors ignores scheme exceptions
Robin Templeton [Mon, 11 Aug 2014 10:59:48 +0000 (06:59 -0400)]
ignore-errors ignores scheme exceptions

9 years agoguile-elisp eval-when
Robin Templeton [Mon, 11 Aug 2014 10:59:28 +0000 (06:59 -0400)]
guile-elisp eval-when

9 years agoremove inline bytecode
Robin Templeton [Mon, 11 Aug 2014 10:29:12 +0000 (06:29 -0400)]
remove inline bytecode

* lisp/gnus/gnus-sum.el (gnus-thread-head): Remove inline bytecode.

9 years agoedebug specs for guile-elisp
Robin Templeton [Fri, 8 Aug 2014 07:38:39 +0000 (03:38 -0400)]
edebug specs for guile-elisp

9 years agomisc changes
Robin Templeton [Thu, 7 Aug 2014 21:16:22 +0000 (17:16 -0400)]
misc changes

9 years agouse guile-elisp macroexpansion
Robin Templeton [Thu, 7 Aug 2014 21:14:10 +0000 (17:14 -0400)]
use guile-elisp macroexpansion

9 years agocompare symbol names with `equal'
Robin Templeton [Thu, 7 Aug 2014 21:12:56 +0000 (17:12 -0400)]
compare symbol names with `equal'

9 years agoremove `declare' macro
Robin Templeton [Sun, 3 Aug 2014 06:14:45 +0000 (02:14 -0400)]
remove `declare' macro

9 years agoevaluation time changes
Robin Templeton [Sun, 3 Aug 2014 06:14:36 +0000 (02:14 -0400)]
evaluation time changes

9 years agomake macro errors less verbose
Robin Templeton [Fri, 18 Jul 2014 19:08:20 +0000 (15:08 -0400)]
make macro errors less verbose

9 years agoread_menu_command fix
Robin Templeton [Fri, 18 Jul 2014 19:08:12 +0000 (15:08 -0400)]
read_menu_command fix

9 years agoflet/labels support in macroexp
Robin Templeton [Fri, 18 Jul 2014 19:07:44 +0000 (15:07 -0400)]
flet/labels support in macroexp

9 years agodynwind fixes
Robin Templeton [Fri, 18 Jul 2014 19:07:36 +0000 (15:07 -0400)]
dynwind fixes

9 years agoFequal_including_properties fix
Robin Templeton [Fri, 18 Jul 2014 19:07:12 +0000 (15:07 -0400)]
Fequal_including_properties fix

9 years agofix push/pop
Robin Templeton [Fri, 18 Jul 2014 19:06:16 +0000 (15:06 -0400)]
fix push/pop

9 years agorm not definition
Robin Templeton [Fri, 18 Jul 2014 19:06:06 +0000 (15:06 -0400)]
rm not definition

9 years agorm commented code
Robin Templeton [Fri, 18 Jul 2014 19:05:24 +0000 (15:05 -0400)]
rm commented code

9 years agosubrp fix
Robin Templeton [Fri, 18 Jul 2014 19:03:49 +0000 (15:03 -0400)]
subrp fix

9 years agorm cl labels
Robin Templeton [Fri, 18 Jul 2014 19:02:38 +0000 (15:02 -0400)]
rm cl labels

9 years agobytecomp changes
Robin Templeton [Sun, 22 Jun 2014 04:42:29 +0000 (00:42 -0400)]
bytecomp changes

9 years agorm lazy macro use
Robin Templeton [Sun, 22 Jun 2014 04:42:07 +0000 (00:42 -0400)]
rm lazy macro use

9 years agomake gnus-byte-compile a nop
Robin Templeton [Sun, 22 Jun 2014 04:41:46 +0000 (00:41 -0400)]
make gnus-byte-compile a nop

9 years agorm early use of pcase
Robin Templeton [Sun, 22 Jun 2014 04:41:34 +0000 (00:41 -0400)]
rm early use of pcase

9 years agoremove documentation-string reading hack
Robin Templeton [Sun, 22 Jun 2014 04:40:57 +0000 (00:40 -0400)]
remove documentation-string reading hack

9 years agolisp_string printer
Robin Templeton [Wed, 18 Jun 2014 02:38:51 +0000 (22:38 -0400)]
lisp_string printer

9 years agodefine `inline' as a macro
Robin Templeton [Wed, 25 Jun 2014 08:57:36 +0000 (04:57 -0400)]
define `inline' as a macro

* lisp/emacs-lisp/byte-run.el (inline): Define as a macro.

9 years agoupdate unidata-gen.el
Robin Templeton [Tue, 12 Aug 2014 11:40:46 +0000 (07:40 -0400)]
update unidata-gen.el

9 years agomake Fprogn static
Robin Templeton [Fri, 18 Jul 2014 19:04:20 +0000 (15:04 -0400)]
make Fprogn static

9 years agoremove bytecode interpreter
Robin Templeton [Thu, 20 Mar 2014 05:49:18 +0000 (01:49 -0400)]
remove bytecode interpreter

* src/bytecode.c: Delete.
  (syms_of_bytecode, exec_byte_code): Removed. All uses changed.

9 years agoshow entire backtrace in `debug'
Robin Templeton [Thu, 20 Mar 2014 05:48:56 +0000 (01:48 -0400)]
show entire backtrace in `debug'

9 years agoupdate nadvice
Robin Templeton [Thu, 20 Mar 2014 05:25:39 +0000 (01:25 -0400)]
update nadvice

* lisp/emacs-lisp/nadvice.el (advice--where-alist): Replace literal
  bytecode with equivalent Lisp functions.
  (advice--bytecodes): Remove.
  (advice--p, advice--car, advice--cdr, advice--props,
  advice--make-1): Use procedure properties, etc.

9 years ago* lisp/emacs-lisp/byte-run.el (defun): Set name after definition.
Robin Templeton [Thu, 20 Mar 2014 05:25:12 +0000 (01:25 -0400)]
* lisp/emacs-lisp/byte-run.el (defun): Set name after definition.

9 years ago* src/profiler.c: Delete.
Robin Templeton [Wed, 25 Jun 2014 07:10:37 +0000 (03:10 -0400)]
* src/profiler.c: Delete.

9 years agoremove backtrace functions
Robin Templeton [Tue, 18 Mar 2014 23:43:47 +0000 (19:43 -0400)]
remove backtrace functions

* src/eval.c (backtrace_function, backtrace_nargs, backtrace_args)
  (backtrace_debug_on_exit, set_backtrace_args)
  (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
  (backtrace_next, do_debug_on_call, record_in_backtrace)
  (Fbacktrace_debug, Fbacktrace, get_backtrace_frame)
  (Fbacktrace_frame, backtrace_eval_unrewind, Fbacktrace_eval)
  (get_backtrace, backtrace_top_function, Vsignaling_function):
  Remove. All references changed.

* src/lisp.h (SPECPDL_BACKTRACE): Remove. All references changed.

9 years agoremove ident string
Robin Templeton [Thu, 26 Jun 2014 04:30:25 +0000 (00:30 -0400)]
remove ident string

9 years agoguile-elisp bootstrap (lisp)
Robin Templeton [Wed, 25 Jun 2014 02:32:08 +0000 (22:32 -0400)]
guile-elisp bootstrap (lisp)

* lisp/abbrev.el: Remove use of cl-lib functions.
* lisp/frame.el: Remove use of cl-lib functions.
* lisp/international/mule-cmds.el: Remove use of cl-lib functions.
* lisp/minibuffer.el: Remove uses of cl-lib functions.

* lisp/byte-run.el: (defun-declarations-alist)
  (macro-declarations-alist): Define at compile time.

* lisp/faces.el: Move face-listing code to "faces2.el".
* lisp/faces2.el: New file.

* lisp/files.el: Move minibuffer-with-setup-hook to subr.el.

* lisp/help.el: Move definition of with-help-window.

* lisp/international/mule.el: Define temporary defcustom macro.

* lisp/jka-cmpr-hook.el: Disable auto-compression-mode.

* lisp/loadup.el: Load mule and mule-conf earlier. Load gv
  explicitly. Load subr2, derived, easy-mmode, cl-lib, cl-macs,
  help-macro, help-fns, faces2, ccl, and kmacro explicitly.

* lisp/simple.el: Move defs of internal-push-keymap,
  internal-pop-keymap, set-temporary-overlay-map from subr.el.

* lisp/subr.el (push): Use eval after loading macros.
  (dolist): Remove.
  (with-current-buffer, with-temp-buffer): Move definitions earlier.
  (with-demoted-errors): Use `progn' instead of `macroexp-progn'.
  (called-interactively-p-functions, called-interactively-p,
  interactive-p): Move to "subr2.el".
* lisp/subr2.el: New file.

9 years agocharset map entries are pointerless
BT Templeton [Fri, 11 Oct 2013 08:11:31 +0000 (04:11 -0400)]
charset map entries are pointerless

* src/charset.c (charset_map_entries): Make `entry' field a pointer
  instead of an array. All uses changed.

9 years agoguile-elisp bootstrap part (C)
BT Templeton [Thu, 3 Oct 2013 23:14:58 +0000 (19:14 -0400)]
guile-elisp bootstrap part (C)

* src/data.c (Finteractive_form): Switch order of COMPILEDP and
  scm_procedure_p tests.

* src/doc.c (Fdocumentation): Switch order of COMPILEDP and
  scm_procedure_p tests.

* src/eval.c (init_eval_once): Make smobs applicable.
  (eval_sub_1): Wrap eval_fn, plus a quit.

  (Ffuncall1): Make static.
  (apply_lambda): Don't eval_sub args. Don't set backtrace.

9 years agoicc_lisp_handler fix
Robin Templeton [Fri, 18 Jul 2014 19:06:58 +0000 (15:06 -0400)]
icc_lisp_handler fix

9 years agoguile-elisp bootstrap (C)
Robin Templeton [Wed, 25 Jun 2014 02:24:52 +0000 (22:24 -0400)]
guile-elisp bootstrap (C)

* src/data.c (Fsetq_default): Remove

* src/editfns.c (Fsave_excursion, Fsave_current_buffer)
  (Fsave_restriction): Change to functions taking thunks as arguments.

* src/eval.c (eval_fn, funcall_fn): New variables.
  (init_eval_once): Increase initial vales of max_specpdl_size and
  max_lisp_eval_depth. Define eval_fn and funcall_fn.
  (Fif, Fsetq, Fquote): Remove.
  (Ffunction): Don't define as DEFUN.
  Whitespace change.
  (Fdefvar, Fdefconst, FletX, Flet): Remove.
  (Fcatch): Take thunk as evaluated argument.
  (Funwind_protect): Remove.
  (Fcondition_case): Replace with Fcall_with_handler.
  (eval_sub_1): Only supported compiled and Scheme procedures.
  (Fapply): Don't define as DEFUN.
  (Ffuncall1): Don't define as DEFUN. Just call funcall_fn.
  (syms_of_eval): Don't unintern internal-interpreter-environment.

* src/fns.c (Fwidget_apply): Call `apply' instead of Fapply.

* src/keyboard.c (Ftrack_mouse): Take thunk as evaluated argument.

* src/lisp.h (WRAP1): Define a global symbol for the wrapped function.

9 years agoguile-elisp bootstrap (C)
BT Templeton [Mon, 23 Sep 2013 23:01:42 +0000 (19:01 -0400)]
guile-elisp bootstrap (C)

* src/alloc.c (allocate_string): Return a Lisp_Object. All callers changed.

  (allocate_string_data): Take a Lisp_Object as first argument. All
  callers changed.

* src/callint.c (Finteractive): Remove.

* src/data.c (Finteractive_form): Handle a nil interactive-form
  correctly.

* src/emacs.c (main2): Set `lisp-string?'.

* src/eval.c (Fwhile): Remove.

  (Fcommandp): Handle a nil interactive-form correctly.

* src/lisp.h (struct Lisp_String): Move definition.

9 years agoFfboundp declaration
Robin Templeton [Fri, 18 Jul 2014 19:05:39 +0000 (15:05 -0400)]
Ffboundp declaration

9 years agoguile-elisp bootstrap (C)
BT Templeton [Mon, 23 Sep 2013 07:40:05 +0000 (03:40 -0400)]
guile-elisp bootstrap (C)

* src/alloc.c (initialize_symbol): Remove. All callers changed.

* src/data.c (Ffboundp, Fmakunbound, Ffmakunbound, Fsymbol_function)
  (Ffset): Call the corresponding Guile-Elisp functions.
  (Fbind_symbol): New function.

* src/emacs.c (string_from_scheme): New function.
  (main2): Resolve modules instead of defining them.
  Set `make-lisp-string'. Call `emacs!'.

* src/eval.c (For, Fand, Fcond, Fprog1, Fprog2, Fbind_symbol): Remove.

* src/lisp.h (XSYMBOL): Use `symbol-desc' from Guile-Elisp.
  (SYMBOL_NAME, SYMBOL_INTERNED_P, SYMBOL_FUNCTION):
  (WRAP1, WRAP2): New macros.
  (set_symbol_function, symbol_plist, set_symbol_plist): Call the
  corresponding Guile-Elisp function.

* lread.c (init_obarray): Use Guile-Elisp's unbound symbol object.
  (Ffind_symbol): Return the symbol if it is present in the obarray.

9 years agodisable byte-compilation
Robin Templeton [Tue, 12 Aug 2014 11:42:11 +0000 (07:42 -0400)]
disable byte-compilation

9 years ago* src/lread.c (oblookup): Remove. All callers changed.
BT Templeton [Sun, 22 Sep 2013 20:31:27 +0000 (16:31 -0400)]
* src/lread.c (oblookup): Remove. All callers changed.

9 years agouse vectors for symbol slots
BT Templeton [Sat, 21 Sep 2013 07:24:01 +0000 (03:24 -0400)]
use vectors for symbol slots

* src/alloc.c (initialize_symbol): Use Guile vectors to store symbol
  slots.

* src/lisp.h (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
  (lisp_h_SYMBOL_VAL): Use Guile vectors to store symbol slots.
  (sym_t): New typedef.
  (SYMBOL_SELF, SET_SYMBOL_SELF, SYMBOL_REDIRECT, SET_SYMBOL_REDIRECT)
  (SYMBOL_CONSTANT, SET_SYMBOL_CONSTANT, SYMBOL_DECLARED_SPECIAL)
  (SET_SYMBOL_DECLARED_SPECIAL): New macros.
  (struct Lisp_Symbol): Change all field names. All references changed
  to use `sym_t' and the above macros instead.

9 years agoremove sigio blocking
BT Templeton [Wed, 18 Sep 2013 04:19:06 +0000 (00:19 -0400)]
remove sigio blocking

* src/sysdep.c (request_sigio, unrequest_sigio): Remove. All callers
  changed.

9 years agoremove polling suppression
BT Templeton [Wed, 18 Sep 2013 03:50:16 +0000 (23:50 -0400)]
remove polling suppression

* src/eval.c (struct catchtag): Remove `poll_suppress_count'
  field. All references changed.

* src/keyboard.c (poll_suppress_count, stop_polling,
  set_poll_suppress_count, STOP_POLLING, RESUME_POLLING): Remove. All
  references changed.
  (wait_reading_process_output): Turn on atimers unconditionally.

9 years agodelete_temp_file fix
BT Templeton [Mon, 16 Sep 2013 21:31:31 +0000 (17:31 -0400)]
delete_temp_file fix

* src/callproc.c (delete_temp_file_ptr): New function.
  (call_process_kill): Use it.

9 years ago* src/eval.c (Fbind_symbol): New function.
BT Templeton [Fri, 23 Aug 2013 06:32:49 +0000 (02:32 -0400)]
* src/eval.c (Fbind_symbol): New function.

9 years agouse guile subrs
BT Templeton [Thu, 22 Aug 2013 05:43:31 +0000 (01:43 -0400)]
use guile subrs

* src/data.c (Qspecial_operator): New variable.
  (CHECK_SUBR, Ftype_of, Fsubrp, Fsubr_arity, Finteractive_form):
  Update for new subr representation.

* src/emacs.c (main2): Call `syms_of_data' early.

* src/lisp.h (XSUBR, SUBRP): Remove. All callers changed.
  (DEFUN): Define subrs as Guile procedures.
  (functionp): Update for new subr representation.

* src/lread.c (defsubr): Update for new subr representation. Take
  relevant subr properties as direct arguments instead of accepting a
  `Lisp_Subr' struct; all callers changed.

* src/doc.c (Fdocumentation, store_function_docstring):
* src/eval.c (Fcommandp, eval_sub_1, Fapply, Ffuncall1):
* src/print.c (print_object):
* src/xmenu.c: Update for new subr representation.

9 years agouse #nil and #t
BT Templeton [Thu, 22 Aug 2013 00:49:32 +0000 (20:49 -0400)]
use #nil and #t

9 years agocallable guile procs
BT Templeton [Tue, 20 Aug 2013 17:00:47 +0000 (13:00 -0400)]
callable guile procs

* src/eval.c (eval_sub_1, Ffuncall):
* src/lisp.h (functionp): Add support for calling Guile procedures.

9 years ago[SQUASH] symbol
BT Templeton [Sat, 17 Aug 2013 04:01:50 +0000 (00:01 -0400)]
[SQUASH] symbol

* src/lisp.h (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P): Move...
* src/data.c (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P): ...here, and
  update for Guile.
* src/lisp.h (SYMBOL_INTERNED_P): Use `scm_symbol_interned_p'.

9 years ago[SQUASH] rm symbol name
BT Templeton [Sat, 17 Aug 2013 20:31:48 +0000 (16:31 -0400)]
[SQUASH] rm symbol name

* src/alloc.c (set_symbol_name): Remove. All callers changed.
  (SYMBOL_NAME): Return Guile symbol name.

9 years agoplist module
BT Templeton [Sat, 17 Aug 2013 20:31:30 +0000 (16:31 -0400)]
plist module

9 years agosymbol plist accessor
BT Templeton [Sat, 17 Aug 2013 02:50:55 +0000 (22:50 -0400)]
symbol plist accessor

9 years ago* admin/coccinelle/symbol_accessors.cocci (symbol_plist): New.
BT Templeton [Sat, 17 Aug 2013 02:37:01 +0000 (22:37 -0400)]
* admin/coccinelle/symbol_accessors.cocci (symbol_plist): New.

9 years agofunction split
BT Templeton [Sat, 17 Aug 2013 20:25:56 +0000 (16:25 -0400)]
function split

9 years ago* admin/coccinelle/symbol_accessors.cocci: New file.
BT Templeton [Sat, 17 Aug 2013 02:33:44 +0000 (22:33 -0400)]
* admin/coccinelle/symbol_accessors.cocci: New file.

9 years agouse guile obarrays
BT Templeton [Thu, 8 Aug 2013 04:26:57 +0000 (00:26 -0400)]
use guile obarrays

* src/alloc.c (initialize_symbol): New function, extracted from
  `Fmake_symbol'.
  (Fmake_symbol): Use `scm_make_symbol'.
* src/emacs.c (main2): Define a symbol module.
* src/lisp.h (SYMBOLP, XSYMBOL): Update.
  (set_symbol_next): Remove. All callers changed.
* src/lread.c (obhash): New function.
  (Fintern, Fintern_soft, Funintern, oblookup, map_obarray): Use Guile
  obarrays.
  (init_obarray): Initialize a hash table of obarrays.
* src/lread.c (Ffind_symbol): New function.

9 years agomultiple values
BT Templeton [Fri, 16 Aug 2013 01:43:51 +0000 (21:43 -0400)]
multiple values

* src/eval.c (values_to_list, Fmultiple_value_call, Fvalues)
  (eval_sub_1, Ffuncall1): New functions.
  (eval_sub, Ffuncall): Return only the first value.

9 years agoLisp completion functions
BT Templeton [Thu, 15 Aug 2013 00:23:59 +0000 (20:23 -0400)]
Lisp completion functions

* src/minibuf.c (minibuf_conform_representation, Ftry_completion)
  (Fall_completions, Ftest_completion, Finternal_complete_buffer):
  Rewrite in Lisp and move...
* lisp/minibuffer.el (minibuf-conform-representation, try-completion)
  (all-completions, test-completion, internal-complete-buffer):
  ...here.

9 years ago[TMP] enable load_prefer_newer
Robin Templeton [Sat, 18 Apr 2015 22:49:58 +0000 (18:49 -0400)]
[TMP] enable load_prefer_newer

9 years agouse scm_boot_guile
BT Templeton [Tue, 13 Aug 2013 01:46:27 +0000 (21:46 -0400)]
use scm_boot_guile

* src/emacs.c (main2): Renamed from `main'.
  (main): Use `scm_boot_guile'.

9 years agofix lwlib makefile
BT Templeton [Fri, 2 Aug 2013 00:02:48 +0000 (20:02 -0400)]
fix lwlib makefile

* lwlib/Makefile.in: Update for Guile.
  Patch provided by Mark H. Weaver <mhw@netris.org>.

9 years agoeval-scheme command
BT Templeton [Sat, 20 Jul 2013 21:35:16 +0000 (17:35 -0400)]
eval-scheme command

* src/fns.c (Feval_scheme): New function.

9 years agohandle guile exceptions
Robin Templeton [Wed, 2 Apr 2014 08:14:49 +0000 (04:14 -0400)]
handle guile exceptions

* src/keyboard.c (command_loop_2_body, command_loop_2_handler)
  (command_loop_2_inner): New functions.
  (top_level_2): Rename to 'top_level_2_body'.
  (command_loop_2, top_level_2): Use the above functions to catch
  Guile exceptions during initialization and in the command loop.

9 years agoprinting support for Guile objects
BT Templeton [Sat, 20 Jul 2013 21:34:40 +0000 (17:34 -0400)]
printing support for Guile objects

* src/print.c (print_object): Use `scm_display' to print Scheme
  objects.

9 years agoadd Lisp_Other type
BT Templeton [Sat, 20 Jul 2013 21:34:02 +0000 (17:34 -0400)]
add Lisp_Other type

* src/lisp.h (Lisp_Other): New `Lisp_Type'.
  (XTYPE): Return `Lisp_Other' for objects of an unknown type.

9 years agouse libguile dynamic wind + c pseudo-closures
BT Templeton [Fri, 19 Jul 2013 20:57:48 +0000 (16:57 -0400)]
use libguile dynamic wind + c pseudo-closures

* src/eval.c (specpdl_arg): Remove.
  (set_catchlist, set_handlerlist, restore_catchtag): New functions.
  (internal_catch, internal_lisp_condition_case)
  (internal_condition_case, internal_condition_case_1)
  (internal_condition_case_2, internal_condition_case_n): Use
  `call_with_prompt'.
  (unwind_to_catch): Use `abort_to_prompt'.
  (set_lisp_eval_depth): New function.

  (record_in_backtrace): Set an unwind handler to remove the backtrace
  entry.

  (eval_sub, Ffuncall, specbind, record_unwind_protect_ptr_1): Use
  Guile unwind handlers.

  (call_void): New function.

  (record_unwind_protect_1, record_unwind_protect_int_1)
  (record_unwind_protect_void_1): Use `record_unwind_protect_ptr_1'.

  (unbind_once): Now static. Remove support for `SPECPDL_UNWIND',
  `SPECPDL_UNWIND_PTR', `SPECPDL_UNWIND_INT' and `SPECPDL_UNWIND_VOID'
  specpdl entries.

  (dynwind_begin): Use `scm_dynwind_begin'.
  (dynwind_end): Use `scm_dynwind_end'.

  (unbind_to_1, unbind_to): Remove.

  (backtrace_eval_unrewind): Remove support for `SPECPDL_UNWIND',
  `SPECPDL_UNWIND_PTR', `SPECPDL_UNWIND_INT' and `SPECPDL_UNWIND_VOID'
  specpdl entries.

  (abort_to_prompt, call_with_prompt, make_prompt_tag): New functions.

  (struct handler, struct catchtag): Moved from "lisp.h".

  src/keyboard.c (save_getcjmp, restore_getcjmp): Remove.

  (read_event_from_main_queue, read_decoded_event_from_main_queue)
  (read_char, read_char_1, quit_throw_to_read_char): Use delimited
  continuations instead of `setjmp' and `longjmp'.

* src/lisp.h (SPECPDL_FRAME, SPECPDL_UNWIND, SPECPDL_UNWIND_PTR)
  (SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID): Remove. All references
  changed.

  (struct handler, struct catchtag): Move to "eval.c".

--------------------------------------------------

* src/emacs.c (main2): Call `init_guile'.

* src/eval.c (icc_thunk, icc_handler, icc_handler_n)
  (icc_lisp_handler): New functions.

  (internal_catch, internal_lisp_condition_case)
  (internal_condition_case, internal_condition_case_1)
  (internal_condition_case_2, internal_condition_case_n): Use
  `make_c_closure' and the above functions.

* src/guile.c: New file.
  (make_c_closure, apply_c_closure, init_guile): New functions.

* src/keyboard.c (read_char_thunk, read_char_handle_quit): New
  functions.
  (read_char): Use `make_c_closure' and the above functions.

9 years agorm specpdl check in bytecode interpreter
Robin Templeton [Wed, 9 Jul 2014 09:45:58 +0000 (05:45 -0400)]
rm specpdl check in bytecode interpreter

9 years agodynwind fixes
Robin Templeton [Wed, 9 Jul 2014 09:45:38 +0000 (05:45 -0400)]
dynwind fixes

9 years agodisable new catch/condition-case instructions
Robin Templeton [Wed, 9 Jul 2014 09:43:12 +0000 (05:43 -0400)]
disable new catch/condition-case instructions

9 years agouse dynwind_begin and dynwind_end
BT Templeton [Mon, 16 Sep 2013 21:02:53 +0000 (17:02 -0400)]
use dynwind_begin and dynwind_end

This patch was generated using Coccinelle.

9 years agococcinelle scripts for dynwind
BT Templeton [Sat, 20 Jul 2013 18:59:45 +0000 (14:59 -0400)]
coccinelle scripts for dynwind

* admin/coccinelle/double_unbind.cocci:
* admin/coccinelle/dynwind.cocci:
* admin/coccinelle/int_specpdl.cocci:
* admin/coccinelle/macros.h: New files.

9 years agococcinelle skip comments
BT Templeton [Thu, 18 Jul 2013 03:01:42 +0000 (23:01 -0400)]
coccinelle skip comments

* src/bytecode.c (exec_byte_code):
* src/keyboard.c (read_char, read_char_1):
* src/print.c (PRINTDECLARE, PRINTPREPARE, PRINTFINISH, PRINTCHAR):
  Skip these functions and macros in Coccinelle.

9 years agouse dynwind_begin and dynwind_end
BT Templeton [Sun, 21 Jul 2013 20:48:22 +0000 (16:48 -0400)]
use dynwind_begin and dynwind_end

This commit only changes uses of `SPECPDL_INDEX' and `unbind_to' that
could not be easily converted using Coccinelle.

9 years agosimplify cpp usage in wait_reading_process_output
BT Templeton [Tue, 16 Jul 2013 06:06:16 +0000 (02:06 -0400)]
simplify cpp usage in wait_reading_process_output