bpt/emacs.git
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

9 years agouse ptrdiff_t for specpdl counts
BT Templeton [Tue, 16 Jul 2013 02:36:42 +0000 (22:36 -0400)]
use ptrdiff_t for specpdl counts

* src/cygw32.c:
* src/w32fns.c: Use `ptrdiff_t' for storing specpdl indices.

9 years agoremove redundant assignments
BT Templeton [Wed, 10 Jul 2013 05:17:23 +0000 (01:17 -0400)]
remove redundant assignments

* src/dired.c:
* src/fns.c:
* src/keyboard.c:
* src/process.c:
* src/xdisp.c: Remove redundant assignments after `unbind_to'.

9 years agorecord_unwind_protect error handling
BT Templeton [Wed, 10 Jul 2013 04:38:40 +0000 (00:38 -0400)]
record_unwind_protect error handling

9 years agoSPECPDL_FRAME
BT Templeton [Mon, 8 Jul 2013 02:40:31 +0000 (22:40 -0400)]
SPECPDL_FRAME

* src/eval.c (unbind_once): New function.
  (unbind_to): Use unbind_once.

* src/lisp.h (SPECPDL_FRAME): New specbind_tag type.

  (dynwind_begin, dynwind_end): Add prototypes.

9 years agoSAFE_ALLOCA updated
BT Templeton [Sat, 6 Jul 2013 05:01:28 +0000 (01:01 -0400)]
SAFE_ALLOCA updated

* src/alloc.c (record_xmalloc): Remove. All uses changed.

* src/lisp.h (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP): Use normal
  allocation functions and don't explicitly free memory. Remove all
  references to variables defined by these macros.

  (USE_SAFE_ALLOCA, SAFE_FREE): Now no-ops.

9 years agorestructure read_char quit handling
BT Templeton [Fri, 5 Jul 2013 02:12:09 +0000 (22:12 -0400)]
restructure read_char quit handling

Move initialization and quit handling to a separate function to simplify
the conversion to Guile control flow facilities.

* src/keyboard.c (struct read_char_state): New data type.

  (read_char): Move most of this function to `read_char_1'. Initialize a
  state structure and a `longjmp' point for quits, then call
  `read_char_1'.

  (read_char_1): New function.

  (save_getcjmp, restore_getcjmp): Take a pointer to a `jmp_buf' as an
  argument. All callers changed.

9 years agouse guile hash functions
BT Templeton [Fri, 12 Apr 2013 00:34:01 +0000 (20:34 -0400)]
use guile hash functions

* src/fns.c (hashfn_eq): Use `scm_ihashq'.
  (hashfn_eql): Use `scm_ihashv'.
  (hashfn_equal, sxhash): Use `scm_ihash'.
  (SXHASH_MAX_DEPTH, SXHASH_MAX_LEN, sxhash_string, sxhash_float)
  (sxhash_list, sxhash_vector, sxhash_bool_vector): Remove.

9 years agouse type predicates in substitute_object_recurse
BT Templeton [Fri, 5 Apr 2013 01:11:45 +0000 (21:11 -0400)]
use type predicates in substitute_object_recurse

* src/lread.c (substitute_object_recurse): Use type predicates instead
  of `XTYPE'.

9 years ago* src/data.c (Ftype_of): Return `Qt' by default.
BT Templeton [Fri, 5 Apr 2013 01:01:02 +0000 (21:01 -0400)]
* src/data.c (Ftype_of): Return `Qt' by default.

9 years agouse an enum to select concat target type
BT Templeton [Fri, 5 Apr 2013 00:52:25 +0000 (20:52 -0400)]
use an enum to select concat target type

* src/fns.c (concat): Use an enum to select the target type. All callers
  changed.

9 years agouse STRINGP, SYMBOLP in ns_lisp_to_cursor_type
BT Templeton [Fri, 5 Apr 2013 00:27:10 +0000 (20:27 -0400)]
use STRINGP, SYMBOLP in ns_lisp_to_cursor_type

* src/nsfns.m (ns_lisp_to_cursor_type): Use `STRINGP' and `SYMBOLP'
  instead of `XTYPE'.

9 years agouse Fequal for face attribute comparisons
BT Templeton [Fri, 5 Apr 2013 00:25:30 +0000 (20:25 -0400)]
use Fequal for face attribute comparisons

* src/xfaces.c (face_attr_equal_p): Call `Fequal' directly instead of
  optimizing comparison for certain types.

9 years agosmob equality predicates
BT Templeton [Thu, 4 Apr 2013 23:41:47 +0000 (19:41 -0400)]
smob equality predicates

* emacs.c (main): Call `init_fns_once'.

* fns.c (internal_equal): Remove. All callers changed.
  (compare_text_properties): New variable.
  (misc_equal_p, vectorlike_equal_p, string_equal_p): New functions.
  (init_fns_once): New function. Set smob equality predicates.

9 years agodon't set current-load-list in loadup.el
BT Templeton [Tue, 2 Apr 2013 00:30:28 +0000 (20:30 -0400)]
don't set current-load-list in loadup.el

Fixes <http://debbugs.gnu.org/14120>, reported by Taylan Ulrich Bayırlı.

* lisp/loadup.el: Don't set `current-load-list' to nil.

9 years agouse guile-snarf for subr definition
BT Templeton [Fri, 3 Aug 2012 06:12:23 +0000 (02:12 -0400)]
use guile-snarf for subr definition

* src/Makefile.in: Run guile-snarf on files that previously contained
  `defsubr' calls.

* src/alloc.c (syms_of_alloc):
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/casefiddle.c (syms_of_casefiddle):
* src/casetab.c (syms_of_casetab):
* src/category.c (syms_of_category):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (syms_of_charset):
* src/chartab.c (syms_of_chartab):
* src/cmds.c (syms_of_cmds):
* src/coding.c (syms_of_coding):
* src/composite.c (syms_of_composite):
* src/data.c (syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/dired.c (syms_of_dired):
* src/dispnew.c (syms_of_display):
* src/doc.c (syms_of_doc):
* src/dosfns.c (syms_of_dosfns):
* src/editfns.c (syms_of_editfns):
* src/emacs.c (syms_of_emacs):
* src/eval.c (syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/filelock.c (syms_of_filelock):
* src/floatfns.c (syms_of_floatfns):
* src/fns.c (syms_of_fns):
* src/font.c (syms_of_font):
* src/fontset.c (syms_of_fontset):
* src/frame.c (syms_of_frame):
* src/fringe.c (syms_of_fringe):
* src/gnutls.c (syms_of_gnutls):
* src/image.c (syms_of_image):
* src/indent.c (syms_of_indent):
* src/insdel.c (syms_of_insdel):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (syms_of_keymap):
* src/lread.c (syms_of_lread):
* src/macros.c (syms_of_macros):
* src/marker.c (syms_of_marker):
* src/menu.c (syms_of_menu):
* src/minibuf.c (syms_of_minibuf):
* src/msdos.c (syms_of_msdos):
* src/nsfns.m (syms_of_nsfns):
* src/nsmenu.m (syms_of_nsmenu):
* src/nsselect.m (syms_of_nsselect):
* src/print.c (syms_of_print):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sound.c (syms_of_sound):
* src/syntax.c (syms_of_syntax):
* src/term.c (syms_of_term):
* src/terminal.c (syms_of_terminal):
* src/textprop.c (syms_of_textprop):
* src/undo.c (syms_of_undo):
* src/w16select.c (syms_of_win16select):
* src/w32console.c (syms_of_ntterm):
* src/w32fns.c (syms_of_w32fns):
* src/w32font.c (syms_of_w32font):
* src/w32menu.c (syms_of_w32menu):
* src/w32proc.c (syms_of_ntproc):
* src/w32select.c (syms_of_w32select):
* src/window.c (syms_of_window):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xmenu.c (syms_of_xmenu):
* src/xml.c (syms_of_xml):
* src/xselect.c (syms_of_xselect):
* src/xsettings.c (syms_of_xsettings):
* src/xsmfns.c (syms_of_xsmfns): Include guile-snarf files for subr
  definition.

9 years agodefsubr snarfing
BT Templeton [Fri, 3 Aug 2012 04:43:03 +0000 (00:43 -0400)]
defsubr snarfing

* src/lisp.h (DEFUN): Use `SCM_SNARF_INIT' to generate a defsubr call.

9 years agoguile-snarf configuration
BT Templeton [Fri, 3 Aug 2012 04:41:43 +0000 (00:41 -0400)]
guile-snarf configuration

* configure.ac: Check for guile-snarf.
* src/Makefile.in: Add suffix rules for guile-snarf.

9 years agoremove snarf marker from lread.c
Robin Templeton [Wed, 18 Jun 2014 02:39:03 +0000 (22:39 -0400)]
remove snarf marker from lread.c

9 years ago* src/fns.c (Feql): Use `scm_eqv_p'.
BT Templeton [Mon, 16 Jul 2012 20:23:10 +0000 (16:23 -0400)]
* src/fns.c (Feql): Use `scm_eqv_p'.

9 years agouse guile conses
BT Templeton [Wed, 11 Jul 2012 22:38:35 +0000 (18:38 -0400)]
use guile conses

* src/alloc.c (Fcons): Use `scm_cons'.

* src/lisp.h (lisp_cons_tag, XCONS, XSETCONS, struct Lisp_Cons)
  (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove.

  (XCAR): Use `scm_car'.
  (XCDR): Use` scm_cdr'.
  (XSETCAR): Use `scm_set_car_x'.
  (XSETCDR): Use `scm_set_cdr_x'.
  (CONSP): Use `scm_is_pair'.

* src/undo.c (truncate_undo_list): Use `sizeof (scm_t_cell)' as the size
  of a cons cell for estimating memory usage.

9 years agoremove unused variable in `read_vector'
BT Templeton [Wed, 11 Jul 2012 21:44:03 +0000 (17:44 -0400)]
remove unused variable in `read_vector'

* src/lread.c (read_vector): Remove unused variable.

9 years agouse inexact real SCM numbers for lisp floats
BT Templeton [Wed, 11 Jul 2012 20:58:12 +0000 (16:58 -0400)]
use inexact real SCM numbers for lisp floats

* src/alloc.c (make_float): Use `scm_from_double'.n
* src/lisp.h (XFLOAT): Use `scm_to_double'.
  (lisp_float_tag, XSETFLOAT, XFLOAT_INIT): Remove.
  (FLOATP): Use `SCM_INEXACTP'.

9 years agostore lisp structures in SCM objects
BT Templeton [Wed, 11 Jul 2012 06:44:58 +0000 (02:44 -0400)]
store lisp structures in SCM objects

* src/alloc.c (allocate_string, make_float, Fcons, init_vectors)
  (allocate_vectorlike, allocate_buffer, Fmake_symbol, allocate_misc):
  Store a smob in the internal structure's self field. Adapted from
  Ken Raeburn's Guile-Emacs branch.

  (valid_lisp_object_p): Use `SCM_IMP' and `SCM2PTR'.

  (init_alloc_once): Initialize smob types.

  (lsb_bits): Remove.

* src/emacs.c (gdb_use_lsb, gdb_use_struct, gdb_gctypebits)
  (gdb_data_seg_bits): Remove.

* src/font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
* src/frame.h (XFRAME): Use `SCM_SMOB_DATA'.

* src/lisp.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, FIXNUM_BITS)
  (INTMASK, Lisp_Object, XHASH, XINT, XUINT, make_number, SXHASH)
  (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, XTYPE, INTEGERP):
  Redefine in terms of libguile's SCM type.

  (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
  (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE)
  (XBOOL_VECTOR, XSETPSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP):
  Use `SCM_SMOB_DATA'.

  (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
  Use the SCM object from the structure's `self' field.

  (XSETSUBR): Use `SCM_NEWSMOB'.

  (struct Lisp_Cons, struct Lisp_String, struct vectorlike_header)
  (struct Lisp_Subr, struct Lisp_Symbol, struct Lisp_Misc_Any)
  (struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Save_Value)
  (struct Lisp_Float): Add a `self' field.

  (DEFUN): Initialize the `self' field to `NULL'.

  (SYMBOLP, MISCP, VECTORLIKEP, STRINGP, CONSP, FLOATP): Use
  `SCM_SMOB_PREDICATE'.

  (enum Lisp_Type): Simplify.
  (Lisp_Int): New enum value.
  (Lisp_Int0, Lisp_Int1): Remove.
  (LISP_INT_TAG, case_Lisp_Int): Simplify.
  (XTYPE): Use type predicates instead of returning the tag bits.

  (pI): Redefine.

  (lisp_symbol_tag, lisp_misc_tag, lisp_string_tag, lisp_vectorlike_tag)
  (lisp_cons_tag, lisp_float_tag): New variables.

  (VALBITS, VALMAX, USE_LSB_TAG, INTTYPEBITS, LISP_INT1_TAG)
  (LISP_STRING_TAG, LISP_INT_TAG_P, XLI, XIL, TYPEMASK, XSET, XPNTR)
  (XUNTAG, VALMASK): Remove.

* src/vm-limit.c (exceeds_lisp_ptr): Always return false.

* src/w32heap.c (allocate_heap, init_heap): Remove MSB tagging
  support, leaving only code that would have been used with
  (`USE_LSB_TAG' in effect.

9 years agodisable inlining
BT Templeton [Wed, 7 Aug 2013 17:21:35 +0000 (13:21 -0400)]
disable inlining

9 years agoremove pure-space-related Fautoload hack
BT Templeton [Wed, 11 Jul 2012 04:44:31 +0000 (00:44 -0400)]
remove pure-space-related Fautoload hack

* src/eval.c (Fautoload): Allow null docstrings to be passed to Ffset
  regardless of the value of `Vpurify_flag'.

9 years agoremove `chain' field from Lisp_Cons
BT Templeton [Wed, 11 Jul 2012 00:53:23 +0000 (20:53 -0400)]
remove `chain' field from Lisp_Cons

* src/lisp.h (struct Lisp_Cons): Remove `u.chain' field. All uses
  changed.

9 years agodon't create a hash table for pure space
BT Templeton [Thu, 5 Jul 2012 00:53:46 +0000 (20:53 -0400)]
don't create a hash table for pure space

* lisp/loadup.el: Leave purify-flag as `t' instead of allocating a hash
  table for hash-consing.

9 years agoremove ARRAY_MARK_FLAG
BT Templeton [Thu, 5 Jul 2012 00:38:52 +0000 (20:38 -0400)]
remove ARRAY_MARK_FLAG

* src/lisp.h (ARRAY_MARK_FLAG):
* src/emacs.c (gdb_array_mark_flag): Remove variables not used with the
  new GC. All uses changed.
* src/.gdbinit: Update.

9 years agoreplace XTYPE calls in nextstep files
BT Templeton [Wed, 4 Jul 2012 08:51:40 +0000 (04:51 -0400)]
replace XTYPE calls in nextstep files

* src/nsfns.m (XParseGeometry):
* src/nsmenu.m (ns_popup_dialog, process_dialog): Use specific type
  predicates instead of `XTYPE'.

9 years agoinitialize guile
BT Templeton [Tue, 3 Jul 2012 21:53:22 +0000 (17:53 -0400)]
initialize guile

* src/emacs.c (main): Call `scm_init_guile'.

9 years agoremove stack_bottom
BT Templeton [Mon, 2 Jul 2012 21:32:35 +0000 (17:32 -0400)]
remove stack_bottom

* src/emacs.c (stack_bottom): Remove. All uses changed.

9 years agolibguile configuration
BT Templeton [Mon, 2 Jul 2012 19:43:48 +0000 (15:43 -0400)]
libguile configuration

* configure.in (GUILE_CFLAGS, GUILE_LIBS): New variables.
  (BDW_GC_CFLAGS, BDW_GC_LIBS): Remove.

* src/Makefile.in (ALL_CFLAGS): Replace BDW_GC_CFLAGS with GUILE_CFLAGS.
  (LIBES): Replace BDW_GC_LIBS with GUILE_LIBS.

9 years agoremove unused `defalias' function
BT Templeton [Tue, 10 Jul 2012 23:06:33 +0000 (19:06 -0400)]
remove unused `defalias' function

* src/lread.c [NOTDEF] (defalias): Remove unused function.

9 years agoremove gcmarkbit fields
Robin Templeton [Mon, 30 Jun 2014 08:29:47 +0000 (04:29 -0400)]
remove gcmarkbit fields

* src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any)
  (struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Save_Value):
* src/intervals.h (struct interval): Remove `gcmarkbit' fields. All uses
  changed.

Conflicts:
src/alloc.c
src/intervals.h
src/lisp.h

9 years agoremove Lisp_Free struct type
Robin Templeton [Mon, 30 Jun 2014 08:27:15 +0000 (04:27 -0400)]
remove Lisp_Free struct type

* src/lisp.h (struct Lisp_Free): Remove. All uses changed.

Conflicts:
src/lisp.h

9 years agouse xmalloc_atomic for many pointerless objects
Robin Templeton [Mon, 30 Jun 2014 08:26:49 +0000 (04:26 -0400)]
use xmalloc_atomic for many pointerless objects

* src/alloc.c (make_float, memory_full, refill_memory_reserve):
* src/buffer.c (alloc_buffer_text):
* src/ccl.c (Fccl_execute_on_string):
* src/charset.c (Fdefine_charset_internal):
* src/coding.c (encode_coding_object):
* src/composite.c (get_composition_id):
* src/dispnew.c (adjust_frame_message_buffer):
* src/doc.c (Fsubstitute_command_keys):
* src/doprnt.c (doprnt):
* src/editfns.c (Fmessage, Fformat):
* src/emacs.c (sort_args):
* src/filelock.c (current_lock_owner):
* src/fns.c (Fstring_as_unibyte, Fstring_to_unibyte):
* src/ftfont.c (ftfont_get_open_type_spec):
* src/gtkutil.c (get_utf8_string):
* src/image.c (x_create_bitmap_from_file, x_create_bitmap_from_file)
  (x_create_x_image_and_pixmap, slurp_file, xbm_read_bitmap_data)
  (xpm_load, colors_in_color_table, pbm_read_file, png_load, tiff_load):
* src/keyboard.c (parse_tool_bar_item):
* src/lread.c (read1, init_obarray):
* src/minibuf.c (read_minibuf_noninteractive):
* src/print.c (PRINTPREPARE):
* src/search.c (Freplace_match, syms_of_search):
* src/sysdep.c (system_process_attributes):
* src/term.c (init_tty):
* src/termcap.c (tgetst1, tgetent)
* src/tparam.c (tparam1):
* src/widget.c (set_frame_size):
* src/xdisp.c (init_xdisp):
* src/xfns.c (x_encode_text, xic_create_fontsetname, x_window)
  (Fx_change_window_property):
* src/xrdb.c (x_get_customization_string, magic_file_p, gethomedir)
  (get_user_db):
* src/xselect.c (x_get_window_property, receive_incremental_selection):
* src/xsmfns.c (smc_save_yourself_CB, x_session_initialize):
* src/xterm.c (xim_initialize, x_term_init): Use xmalloc_atomic and
  related functions for allocating pointerless objects.

Conflicts:
src/alloc.c
src/editfns.c
src/fns.c
src/xterm.c

9 years agoatomic allocation functions
Robin Templeton [Mon, 30 Jun 2014 08:21:37 +0000 (04:21 -0400)]
atomic allocation functions

* src/alloc.c (xmalloc_atomic, xzalloc_atomic, xmalloc_atomic_unsafe)
  (xnmalloc_atomic): New functions.

Conflicts:
src/alloc.c
src/lisp.h

9 years agoremove chain field from Lisp_Float struct
BT Templeton [Fri, 29 Jun 2012 20:08:48 +0000 (16:08 -0400)]
remove chain field from Lisp_Float struct

* src/lisp.h (struct Lisp_Float): Remove `chain' field.
  (XFLOAT_DATA, XFLOAT_INIT): Update.

9 years agoduplicate current dir name in smc_save_yourself_CB
BT Templeton [Fri, 29 Jun 2012 17:54:58 +0000 (13:54 -0400)]
duplicate current dir name in smc_save_yourself_CB

* src/xsmfns.c (smc_save_yourself_CB): Duplicate and free the string
  returned by `get_current_dir_name'.

9 years agouse g_strdup in update_frame_tool_bar
BT Templeton [Sat, 30 Jun 2012 00:46:45 +0000 (20:46 -0400)]
use g_strdup in update_frame_tool_bar

* src/gtkutil.c (update_frame_tool_bar): Use `g_strdup' and `g_free' for
  widget data.

9 years agouse xmalloc_uncollectable in make_cl_data
BT Templeton [Thu, 28 Jun 2012 03:24:19 +0000 (23:24 -0400)]
use xmalloc_uncollectable in make_cl_data

* src/gtkutil.c (make_cl_data): Allocate the callback data with
  `xmalloc_uncollectable'.