1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

123663 Commits

Author SHA1 Message Date
Paul Eggert
c8a972b0c3 Style fixes for indenting etc. in module code
This is mostly indenting and spacing changes.  Also, remove
some unnecessary static decls instead of bothering to reindent them.
* src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline,
as most other Emacs files do for this sort of thing.
2015-11-19 11:32:21 -08:00
Eli Zaretskii
7cd728c813 Minor improvements in modules testing Makefile
* modules/mod-test/Makefile (EMACS, SO): New variables.
(CFLAGS): When SO = dll, don't use -fPIC.
(check): New target, runs the test.
2015-11-19 19:49:29 +02:00
Eli Zaretskii
d4869dde91 * .gitignore: Add "*.dll". 2015-11-19 19:21:50 +02:00
Paul Eggert
ca3bc790a7 Migrate modules/.gitignore into .gitignore
* .gitignore: Add former contents of modules/.gitignore.
* modules/.gitignore: Remove.
2015-11-19 08:21:41 -08:00
Paul Eggert
c8404f48a3 Add copyright notices to module code
Put them in the usual format for GNU Emacs copyright notices.
2015-11-19 08:14:51 -08:00
Paul Eggert
80f19fb898 Rename emacs_module.h to module.h
* src/module.h: Rename from src/emacs_module.h.
All uses changed.
2015-11-19 07:54:33 -08:00
Juanma Barranquero
4ec83fd11b * src/module.c (Fmodule_load): Remove unused vars doc_name', args' 2015-11-19 11:07:10 +01:00
Juanma Barranquero
3c6a085351 * src/lread.c (Fload): Remove unused variable `size' 2015-11-19 11:02:38 +01:00
Alan Mackenzie
981335073b src/keyboard.c (pre-command-hook): Fix typo in doc string: "pre" -> "post". 2015-11-19 09:40:39 +00:00
Dmitry Gutov
3c5989da74 Prioritize looking inside vc-parent-buffer over log-view-mode fallback
* lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside
vc-parent-buffer over log-view-mode fallback (bug#21955).
2015-11-19 03:38:36 +02:00
Alan Mackenzie
b442b94858 lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall. 2015-11-18 21:14:30 +00:00
Ken Brown
e8bbdc4665 * configure.ac (LIBMODULES): Don’t define on Cygwin 2015-11-18 15:17:58 -05:00
Eli Zaretskii
520dc85f31 Fix MS-Windows build --with-modules
* src/module.c: Reformat copyright commentary.
(module_vec_get): Use explicit cast to size_t to avoid compiler
warning in 32-bit builds.
(check_main_thread) [WINDOWSNT]: Fix letter-case in Windows APIs.
Compare thread IDs directly, as GetThreadId is not available
before Windows Vista.
(check_main_thread) [WINDOWSNT]: Duplicate the thread handle
without using APIs and constants not available on XP and older
systems.  Obtain and store the thread ID as well.
2015-11-18 22:09:08 +02:00
Eli Zaretskii
9328e3d0ea ; * admin/release-process: Minor copyedits and additions. 2015-11-18 21:33:12 +02:00
Aurélien Aptel
955e25dbcd Add dynamic module test and helper script
Add 'modhelp.py' script (python2) to automate module testing and
module generation.

To build and test all modules in the modules/ dir
  $ ./modhelp.py test

To generate a module from template code (good starting point)
  $ ./modhelp init mynewtestmodule

See the script -h option for more documentation.

* modules/modhelp.py: New module helper script.
* modules/mod-test/Makefile: New file. Makefile for the test module.
* modules/mod-test/mod-test.c: New file. Test module source file.
* modules/mod-test/test.el: New file. ert test suite for the test module.
* modules/.gitignore: New file. Local .gitignore file.

Co-authored-by: Philipp Stephani <phst@google.com>
2015-11-18 14:24:35 -05:00
Aurélien Aptel
218caccd96 Make 'Fload' look for modules
'Fload' can now load dynamic modules. This also makes 'require' work.

* src/lread.c:
  (suffix_p): New function.
  (Fload): Use 'suffix_p'.  Call 'Fmodule_load' when we try to load a file
  with a module suffix.
  (syms_of_lread): Append module suffix to 'Vload_suffixes'.
2015-11-18 14:24:28 -05:00
Aurélien Aptel
307e76c799 Add dynamic module module support
* configure.ac: Add '--with-modules' option.  Conditionally add
  dynlib.o and module.o to the list of objects.  Add any system
  specific flags to the linker flags to support dynamic libraries.
* m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc
  attributes.
* src/Makefile.in: Conditionally add module objects and linker flags.
* src/alloc.c (garbage_collect_1): protect module local values from
  GC.
* src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes.
* src/emacs_module.h: New header file included by modules.  Public
  module API.
* src/module.c: New module implementation file.

Co-authored-by: Philipp Stephani <phst@google.com>
2015-11-18 14:24:19 -05:00
Aurélien Aptel
f69cd6bfa1 Add new User Pointer (User_Ptr) type
* src/lisp.h: Add new Lisp_Misc_User_Ptr type.
(XUSER_PTR): New User_Ptr accessor.
* src/alloc.c (make_user_ptr): New function.
(mark_object, sweep_misc): Handle Lisp_Misc_User_Ptr.
* src/data.c (Ftype_of): Return 'user-ptr' for user pointer.
(Fuser-ptrp): New user pointer type predicate function.
(syms_of_data): New 'user-ptrp', 'user-ptr' symbol.  New 'user-ptrp'
subr.
* src/print.c (print_object): Add printer for User_Ptr type.
2015-11-18 14:24:06 -05:00
Aurélien Aptel
435cf35bcc Add portable layer for dynamic loading
* src/dynlib.h: New file.
* src/dynlib.c: New file.

Co-authored-by: Philipp Stephani <phst@google.com>
2015-11-18 14:23:53 -05:00
Philipp Stephani
7cdc5d628a Add catch-all & no-signal version of PUSH_HANDLER
Ground work for modules. Add a non-signaling version of PUSH_HANDLER and
a new "catch-all" handler type.

* src/eval.c (init_handler, push_handler, push_handler_nosignal): New
  functions.
* src/fns.c (hash_remove_from_table): Expose function public.
* src/lisp.h: New handler type, define macro to push_handler call.
2015-11-18 14:23:41 -05:00
Ken Brown
133ad3e200 ; * lisp/server.el (server-process-filter): Simplify last change 2015-11-18 14:16:40 -05:00
Ken Brown
ce7ef5b5e0 Silence byte-compiler warning
* lisp/server.el (server-process-filter): Silence byte-compiler
warning.
2015-11-18 13:34:47 -05:00
Paul Eggert
bb4303c536 Quote symbols in docstrings using `'
Be more systematic about quoting symbols `like-this' rather than
`like-this or 'like-this' in docstrings.  This follows up Artur
Malabarba's email in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01647.html
2015-11-18 09:17:55 -08:00
Peder O. Klingenberg
3e309ad86c Fix savegames in dunnet
* lisp/play/dunnet.el (dun-rot13): Use the standard rot13-region instead
  of separate implementation.
2015-11-18 13:25:08 +01:00
Artur Malabarba
2e6d7d1e34 * lisp/emacs-lisp/package.el (package--with-response-buffer):
Ensure we're at the start of the buffer before searching for
the end of headers.
2015-11-18 10:28:33 +00:00
Xue Fuqiao
35d490fd32 * admin/release-process: Improve wording. 2015-11-18 08:56:50 +08:00
Xue Fuqiao
883a4d2aa0 Backport: * CONTRIBUTE: Remove information about feature freeze.
(cherry picked from commit ae0653b5ab)
2015-11-18 08:42:35 +08:00
Xue Fuqiao
0b7d791d27 Backport: Document the release process
* admin/notes/versioning: Add information about RC releases.
* admin/release-process: Document the release process.
* admin/authors.el (authors-ignored-files):
* admin/README: Change FOR-RELEASE to release-process.
* CONTRIBUTE:
* admin/notes/bugtracker: Don't mention FOR-RELEASE.

(cherry picked from commit 9a4aa0f594)
2015-11-18 08:42:02 +08:00
Xue Fuqiao
20b043f97c Backport: * admin/release-process: Rename from admin/FOR-RELEASE.
(cherry picked from commit f8cc14b597)
2015-11-18 08:41:15 +08:00
Xue Fuqiao
cfedd55820 Backport: Mention CONTRIBUTE in README
Mention CONTRIBUTE in README, since it was moved from etc/ to root.
* etc/TODO: Remove the reference to `etc/CONTRIBUTE'.
* README: Mention CONTRIBUTE.

(cherry picked from commit ed2e7e20ae)
2015-11-18 08:38:01 +08:00
Paul Eggert
ac16149ba4 Fix docstring quoting problems with ‘ '’
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes.  The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.
2015-11-17 15:29:35 -08:00
Eli Zaretskii
abf673af29 Improve configure --help text for wide ints
* configure.ac (wide-int): Clarify user-level advantages and
disadvantages.
2015-11-17 21:07:37 +02:00
Stephen Leake
ce4eeca8d4 Improve doc string
* lisp/progmodes/xref.el (xref-backend-references): Improve doc string.
2015-11-17 07:49:29 -06:00
Paul Eggert
54beeef118 eval_sub followed dangling pointer when debugging
Problem reported by Pip Cet (Bug#21245).
This bug could occur in eval_sub if the C compiler reused
storage associated with the ‘argvals’ local after ‘argvals’
went out of scope, and if the Elisp debugger stopped on Elisp
function exit and accessed ‘argvals’.  It could also occur if
a variadic function was called with so many arguments (over
2048 args on x86-64) that SAFE_ALLOCA_LISP called malloc, then
SAFE_FREE freed the arguments, then the memory manager used
the storage for other purposes, then the debugger accessed the
arguments.
* src/eval.c (eval_sub): Declare ‘argvals’ at top level of
function body.	Simplify local decls.
When allocating args via SAFE_ALLOCA, call
debugger before invoking SAFE_FREE, as the debugger needs
access to the args.
(eval_sub, apply_lambda): Rework to avoid need for
set_backtrace_debug_on_exit hack.  This is cleaner,
and should work better with buggy custom debuggers.
2015-11-16 23:09:28 -08:00
Daiki Ueno
1721600d24 * lisp/image-mode.el: Support encrypted file
(image-toggle-display-image): Read content from the buffer instead
of the file, if the buffer holds a decrypted data.  (Bug#21870)
2015-11-17 11:49:40 +09:00
Paul Eggert
c9fd597a4c ELF unexec: align section header
This ports the recent unexelf.c changes to Fedora x86-64
when configured with GCC’s -fsanitize=undefined option.
* src/unexelf.c (unexec): Align new_data2_size to a multiple
of ElfW (Shdr)’s alignment, so that NEW_SECTION_H returns a
pointer aligned appropriately for its type.
2015-11-16 17:48:52 -08:00
Juanma Barranquero
1cdddc1db6 ; lisp/window.el (display-buffer-at-bottom): Fix indentation 2015-11-17 02:02:07 +01:00
Andreas Schwab
d443710169 Do more checks on bytecode objects (Bug#21929)
* src/eval.c (funcall_lambda): Check size of compiled function
object.
(Ffetch_bytecode): Likewise.
2015-11-17 00:18:50 +01:00
Johan Bockgård
c4b20fc936 pcase.el: Fix edebugging of backquoted cons patterns
* lisp/emacs-lisp/pcase.el (pcase-QPAT): Fix edebugging of backquoted
cons patterns. (Bug#21920)
2015-11-16 23:48:25 +01:00
Paul Eggert
8ff888a07d Improve fix for regex reentrancy abort
Suggested by Stefan Monnier (Bug#21688).
* src/syntax.c (update_syntax_table_forward):
Remove recently-added PROPERTIZE arg, and assume it is true.
All callers changed.
* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
Invoke update_syntax_table directly.
2015-11-16 13:10:17 -08:00
Dmitry Gutov
1f07a61ee3 ; Fix breakage in elisp-mode-tests.el 2015-11-16 19:15:58 +02:00
Artur Malabarba
26b6952277 * lisp/faces.el (faces--attribute-at-point): Use `face-list-p' 2015-11-16 14:35:31 +00:00
Artur Malabarba
31fc056791 * lisp/emacs-lisp/package.el (package--with-response-buffer): Missing require 2015-11-16 13:53:45 +00:00
Artur Malabarba
63acb2e868 * lisp/emacs-lisp/nadvice.el (add-function): Escape quote 2015-11-16 09:49:00 +00:00
Vasily Korytov
dbc090aeab Recognize .rbw and .pyw files (bug#18753)
* lisp/progmodes/python.el (auto-mode-alist):
Recognize .pyw files.

* lisp/progmodes/ruby-mode.el (auto-mode-alist):
Recognize .rbw files.
2015-11-16 01:32:35 +02:00
Dmitry Gutov
2edfc40a72 Fix ruby-mode auto-mode-alist entry
* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add grouping
around the extensions (bug#21257).
2015-11-16 01:14:54 +02:00
Dmitry Gutov
f60a3b086c Fix etags completion near eob
* lisp/progmodes/etags.el (tags-completion-at-point-function):
Use `goto-char', to avoid the end-of-buffer error (bug#20061).
2015-11-16 00:30:30 +02:00
Alan Mackenzie
4765d24e18 De-pessimize detection of C++ member initialization lists.
list/progmodes/cc-engine.el (c-back-over-list-of-member-inits): New macro.
(c-back-over-member-initializers): Reformulate such that c-at-toplevel-p
is only called when a construct "looks right" rather than continually.
(c-guess-basic-syntax, CASE 5R): Add a check for the mode being C++ Mode.
2015-11-15 21:59:40 +00:00
Artur Malabarba
d99ccd6dd1 Backport: * lisp/emacs-lisp/package.el: Fix a decoding issue.
* lisp/url/url-handlers.el (url-insert-file-contents): Move some code to
`url-insert-buffer-contents'.
(url-insert-buffer-contents): New function

(package--with-response-buffer): Use `url-insert-buffer-contents'.
The previous code had some issues with decoding. Refactoring that
function allows us to use the decoding from url-handlers while still
treating both sync and async requests the same.
2015-11-15 21:32:47 +00:00
Stephen Leake
a6843cce90 Improve a few doc strings, comments
* lisp/cedet/cedet-global.el (cedet-gnu-global-expand-filename):
* lisp/cedet/ede/locate.el (ede-locate-base):
* lisp/cedet/semantic/symref.el (semantic-symref-calculate-rootdir):
* src/fns.c (Fdelq): Improve doc string.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Add FIXME.
2015-11-15 13:44:41 -06:00