1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00
Commit Graph

127803 Commits

Author SHA1 Message Date
Philipp Stephani
c0cfe9bc14 Clean up compile-tests.el
Switch to lexical binding.  Make checkdoc happy.

* test/lisp/progmodes/compile-tests.el (compile--test-error-line)
(compile-test-error-regexps): Instead of checking a single Boolean
value, use `should' for each attribute of the message to be compared.
(compile-tests--test-regexps-data): Document sixth list element
TYPE.
2016-12-11 16:34:32 +01:00
Glenn Morris
595a4d6bfd ; Change maintainer comment
Ref http://debbugs.gnu.org/10934#23
2016-12-10 19:40:34 -08:00
Glenn Morris
4aa6d4b188 Improve previous cperl-mode change
* lisp/progmodes/cperl-mode.el (cperl-mode-abbrev-table):
Improve previous change.
2016-12-10 19:37:59 -08:00
Glenn Morris
3aa3f73b96 Mark default cperl abbrevs as system ones
* lisp/progmodes/cperl-mode.el (cperl-mode):
Mark our abbrevs as system ones.  (Bug#10934)
2016-12-10 19:26:25 -08:00
Glenn Morris
3fd44333e9 Revert earlier Ffset change
* src/data.c (Ffset): Allow nil again, since it caused
eager macro-expansion failures.
2016-12-10 19:18:24 -08:00
Glenn Morris
f37f93f364 Tweaks for message bogus address detection
* lisp/gnus/message.el (message-bogus-recipient-p):
Do not require "@", since some mailers deliver to local addresses
without one.  (Bug#23054)
Move "@.*@" from here...
(message-bogus-addresses): ...to here, so it can be customized.
2016-12-10 19:03:28 -08:00
Glenn Morris
ba8e883fa3 Do not allow nil to be defined as a function
* lisp/emacs-lisp/byte-run.el (defun):
* src/data.c (Ffset): Do not allow "nil".  (Bug#25110)
2016-12-10 18:58:24 -08:00
Nicolas Richard
0107336165 Add some sanity checking of defun arglist
* lisp/emacs-lisp/byte-run.el (defun):
Check for malformed argument lists.  (Bug#15715)
2016-12-10 17:48:10 -08:00
Matt Armstrong
8d1b753d52 Minor shell-mode fix for zsh
* lisp/shell.el (shell-mode): Prevent shell-dirstack-query
becoming confused by zsh abbreviations.  (Bug#24632)

Copyright-paperwork-exempt: yes
2016-12-10 17:29:51 -08:00
Andreas Schwab
2335b9100b * Makefile.in (install-etc): Don't prepend $(DESTDIR) to commands in
system unit file.
2016-12-10 21:14:18 +01:00
Glenn Morris
25a52ca6b2 ; Fix copyright years in new files 2016-12-10 10:19:06 -08:00
Philipp Stephani
759415df2e ; Update file name in comment 2016-12-10 18:23:55 +01:00
Eli Zaretskii
2412a1fc05 Support concurrency in Emacs Lisp
Merge branch 'test-concurrency'

* src/thread.c:
* src/thread.h:
* src/systhread.c:
* src/systhread.h: New files.
* src/xgselect.c (xg_select): Avoid using SAFE_NALLOCA and use
xnmalloc unconditionally.
* src/window.c (struct save_window_data): Rename current_buffer to
f_current_buffer.
* src/w32proc.c (sys_select): Change the function signature to
closer fit 'pselect' on Posix hosts.
* src/search.c:
* src/regex.h: Convert some globals to macros that reference
thread-specific values.
* src/process.c (pset_thread, add_non_keyboard_read_fd)
(add_process_read_fd, add_non_blocking_write_fd)
(recompute_input_desc, compute_input_wait_mask)
(compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
(compute_write_mask, clear_waiting_thread_info)
(update_processes_for_thread_death, Fset_process_thread)
(Fprocess_thread): New functions.
(enum fd_bits): New enumeration.
(fd_callback_data): Add 'thread' and 'waiting_thread', rename
'condition' to 'flags'.
(set_process_filter_masks, create_process, create_pty)
(Fmake_serial_process, finish_after_tls_connection)
(connect_network_socket, deactivate_process)
(server_accept_connection, wait_reading_process_output)
(Fcontinue_process, Fstop_process, keyboard_bit_set)
(add_timer_wait_descriptor, add_keyboard_wait_descriptor)
(delete_keyboard_wait_descriptor): Use the new functions instead
of manipulating fd flags and masks directly.
(syms_of_process): Defsubr the new primitives.
* src/print.c (print_object): Print threads, mutexes, and
conditional variables.
* src/lisp.h (enum pvec_type): New values PVEC_THREAD, PVEC_MUTEX,
and PVEC_CONDVAR.
(XTHREAD, XMUTEX, XCONDVAR, THREADP, MUTEXP, CONDVARP)
(CHECK_THREAD, CHECK_MUTEX, CHECK_CONDVAR): New inline functions.
(XSETTHREAD, XSETMUTEX, XSETCONDVAR): New macros.
(struct handler): Add back byte_stack.  Rename lisp_eval_depth to
f_lisp_eval_depth.
* src/eval.c (specpdl_kind, specpdl_arg, do_specbind)
(rebind_for_thread_switch, do_one_unbind)
(unbind_for_thread_switch): New functions.
(init_eval): 'handlerlist' is not malloc'ed.
(specbind): Call do_specbind.
(unbind_to): Call do_one_unbind.
(mark_specpdl): Accept 2 arguments.
(mark_specpdl): Mark the saved value in a let-binding.
* src/emacs.c (main): Call init_threads_once, init_threads, and
syms_of_threads.
* src/data.c (Ftype_of): Support thread, mutex, and condvar
objects.
(Fthreadp, Fmutexp, Fcondition_variable_p): New functions.
(syms_of_data): DEFSYM and defsubr new symbols and primitives.
* src/bytecode.c (struct byte_stack, FETCH, CHECK_RANGE)
(BYTE_CODE_QUIT): Add back.
(exec_byte_code): Add back byte stack manipulation.
* src/alloc.c (cleanup_vector): Handle threads, mutexes, and
conditional variables.
(mark_stack): Now extern; accept additional argument 'bottom'.
(flush_stack_call_func): New function.
(garbage_collect_1): Call mark_threads and unmark_threads.  Don't
mark handlers.
* src/.gdbinit (xbytecode): Add back.

* test/src/thread-tests.el: New tests.
* test/src/data-tests.el (binding-test-manual)
(binding-test-setq-default, binding-test-makunbound)
(binding-test-defvar-bool, binding-test-defvar-int)
(binding-test-set-constant-t, binding-test-set-constant-nil)
(binding-test-set-constant-keyword)
(binding-test-set-constant-nil): New tests.

* doc/lispref/processes.texi (Processes and Threads): New
subsection.
* doc/lispref/threads.texi: New file
* doc/lispref/elisp.texi (Top): Include it.
* doc/lispref/objects.texi (Thread Type, Mutex Type)
(Condition Variable Type): New subsections.
(Type Predicates): Add thread-related predicates.
* doc/lispref/objects.texi (Editing Types):
* doc/lispref/elisp.texi (Top): Update higher-level menus.

* etc/NEWS: Mention concurrency features.
2016-12-10 18:54:43 +02:00
Eli Zaretskii
828b4560cd Fix error messages in thread.c
* src/thread.c (lisp_mutex_unlock, Fcondition_wait)
(Fcondition_notify, Fthread_join): Fix error messages.
2016-12-10 11:42:48 +02:00
Eli Zaretskii
c364d62f89 Improve doc strings in thread.c
* src/thread.c (Fmake_condition_variable, Fcondition_wait)
(Fcondition_notify, Fcondition_mutex, Fcondition_name, Fmake_thread)
(Fthread_join, Fall_threads): Doc fixes.
2016-12-10 11:31:11 +02:00
Eli Zaretskii
e4df093e60 Fix building with check-lisp-object-type
* src/thread.c (mark_one_thread): Use NILP to compare with
m_saved_last_thing_searched, which is a Lisp object.  Reported by
Andreas Politz <politza@hochschule-trier.de>.
2016-12-10 11:06:23 +02:00
Eli Zaretskii
19bc43020d Documentation and commentary improvements
* src/lisp.h:
* src/regex.c:
* src/xgselect.c (xg_select): Improve commentary and formatting.

* doc/lispref/objects.texi (Thread Type, Mutex Type)
(Condition Variable Type): New subsections.
(Type Predicates): Add thread-related predicates.
* doc/lispref/objects.texi (Editing Types):
* doc/lispref/elisp.texi (Top): Update higher-level menus.
2016-12-10 10:49:39 +02:00
Michael Albinus
fc0fd24c10 Fix further problems with quoted file names in Tramp
* lisp/net/tramp.el (tramp-quoted-name-p, tramp-quote-name)
(tramp-unquote-name): Move defsubst ...
* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
(tramp-compat-file-name-quote)
(tramp-compat-file-name-unquote): ... here. Adapt callees.

* lisp/net/tramp-cache.el (tramp-flush-file-property)
(tramp-flush-directory-property):
* lisp/net/tramp-gvfs.el (tramp-gvfs-url-file-name):
* lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-substitute-in-file-name)
(tramp-smb-get-share, tramp-smb-get-localname): Handle quoted files.
2016-12-09 19:54:20 +01:00
Eli Zaretskii
ad03e7af8b *src/sysdep.c: Fix a comment. 2016-12-09 19:04:36 +02:00
Eli Zaretskii
a708a5c6bd Fix compilation error on Fedora 24
* src/sysdep.c [HAVE_H_ERRNO]: Remove declaration of h_errno.
Reported by Paul Eggert <eggert@cs.ucla.edu>.
2016-12-09 18:51:59 +02:00
Eli Zaretskii
7399f53a37 Fix compilation warnings due to prototype of thread_select
* src/thread.h <int select_func>: Make the 5th and 6th arguments
be 'const'.
* src/process.c [WINDOWSNT]:
* src/w32proc.c: Make the 5th and 6th argument to sys_select be
'const'.
2016-12-09 18:23:04 +02:00
Eli Zaretskii
ae490069ea Fix compilation on Debian GNU/Linux
* src/thread.h: Include sys/types.h, for ssize_t that regex.h
uses.  Reported by Robert Marshall <robert.marshall@codethink.co.uk>.
2016-12-09 18:04:27 +02:00
Eli Zaretskii
3ef50c1ff6 Fix subtle errors with let-binding of localized variables
* src/eval.c (do_specbind): Don't require a "symbol" that is
actually a cons cell, in order to call set-default, as there are
no longer such bindings.  This makes do_specbind work like the
pre-concurrency implementation in specbind for bindings of
forwarded symbols.  Use specpdl_kind to access the type of the
binding.
(specpdl_kind): New function.
2016-12-09 16:03:08 +02:00
Michael Albinus
57a77f833e Document file-name-quote, file-name-unquote and file-name-quoted-p
* doc/lispref/files.texi (File Name Expansion):
* etc/NEWS: Mention file-name-quote, file-name-unquote and
file-name-quoted-p.

* lisp/files.el (file-name-non-special): Revert using
file-name-quote, file-name-unquote and file-name-quoted-p.
2016-12-09 10:03:05 +01:00
Noam Postavsky
8f611e5e23 Fix bad quoting of python-shell-interpreter
`python-shell-calculate-command' was using `shell-quote-argument' as if
it was generating a shell command, but its callers don't pass the result
to a shell, and they expect to parse it with `split-string-and-unquote'.
This caused problems depending on the flavor of shell quoting in
effect (Bug#25025).

* lisp/progmodes/python.el (python-shell-calculate-command): Use
`combine-and-quote-strings' to quote the interpreter, so that it can be
parsed by `python-shell-make-comint' successfully using
`split-string-and-unquote'.
2016-12-09 00:14:48 -05:00
Paul Eggert
7f106f48e9 * src/lisp.h (struct terminal): Remove unnecessary forward decl. 2016-12-08 18:17:32 -08:00
Paul Eggert
f0a1e9ec3f Make read1 more reentrant
This is needed if ‘read’ is called soon after startup, before the
Unicode tables have been set up, and it reads a \N escape and
needs to look up a value the Unicode tables, a lookup that in turn
calls read1 recursively.  Although this change doesn’t make ‘read’
fully reentrant, it’s good enough to handle this case.
* src/lread.c (read_buffer_size, read_buffer): Remove static vars.
(grow_read_buffer): Revamp to use locals, not statics, and to
record memory allocation un the specpdl.  All callers changed.
(read1): Start with a stack-based buffer, and use the heap
only if the stack buffer is too small.  Use unbind_to to
free any heap buffer allocated.  Use bool for boolean.
Redo symbol loop so that only one call to grow_read_buffer
is needed.
(init_obarray): Remove no-longer-needed initialization.
2016-12-08 13:00:32 -08:00
Eli Zaretskii
54f52a1390 Fix compilation warnings
* src/thread.c (Fmake_thread): Call emacs_abort, to avoid
compilation warning.
2016-12-08 20:47:27 +02:00
Paul Eggert
162ba405ac Fix unlikely substitute-command-keys memory leak
* src/doc.c (Fsubstitute_command_keys):
Free buffer when unwinding.
2016-12-08 10:43:58 -08:00
Michael Albinus
c685e4c929 ; Fix last patch 2016-12-08 18:33:26 +01:00
Michael Albinus
b67fdee18b Add file-name-quoted-p, file-name-quote, file-name-unquote
* lisp/files.el (file-name-quoted-p, file-name-quote)
(file-name-unquote): New defsubst.
(find-file--read-only, find-file-noselect)
(file-name-non-special): Use them.
2016-12-08 18:00:10 +01:00
Eli Zaretskii
128cacda1c Add a NEWS entry. 2016-12-08 18:35:40 +02:00
Glenn Morris
e63c489dd4 Minor fix for symbol-file
* lisp/subr.el (symbol-file): Avoid false matches with "require"
elements in load-history.  (Bug#25109)
2016-12-07 23:18:36 -08:00
Tino Calancha
af96803459 Fix Bug#24962
* lisp/buff-menu.el (list-buffers--refresh):
List buffers with name starting with " " if they visit a file.
* test/lisp/buff-menu-tests.el (buff-menu-24962):
Update test result as pass.
2016-12-08 13:46:25 +09:00
Tino Calancha
2766c607b0 ediff-fixup-patch-map: Improve prompt
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map):
Make clear in the prompt when we are applying a multi patch.
2016-12-08 11:32:02 +09:00
Glenn Morris
a6776f0823 Retain message logging in map-y-or-n-p
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
Stop disabling logging to Messages buffer.  (Bug#13326)
2016-12-07 20:25:36 -05:00
Glenn Morris
5415c8be60 Doc fix for recent change
* lisp/simple.el (region-modifiable-p): Doc fix.
2016-12-07 20:10:54 -05:00
Glenn Morris
75c9314cbf Quieten make-dist default operation
* make-dist: Add --verbose option.  Default to quieter operation.
2016-12-07 19:59:14 -05:00
Tino Calancha
55c1937e52 Fix regression introduced by commit 7b1e97f
* lisp/ibuf-ext.el (ibuffer-decompose-filter): Use cdr instead
of cadr; required after commit 20f5a5b.
2016-12-08 07:27:36 +09:00
Paul Eggert
aed629d61c Put post-25 ChangeLog entries into ChangeLog.3
* ChangeLog.2: Copy from emacs-25 branch.
* ChangeLog.3: New file, with changes only in master.
* Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump from 2 to 3.
2016-12-07 12:53:56 -08:00
Paul Eggert
f15f6b5307 Merge from origin/emacs-25
eeecac7 Fix minor quoting problems in doc strings
2016-12-07 12:43:16 -08:00
Paul Eggert
fe6131b724 ; Merge from origin/emacs-25
The following commit was skipped:

da71c89 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix docs...
2016-12-07 12:41:06 -08:00
Paul Eggert
c102a84a48 Merge from origin/emacs-25
35ce3fb Don't assume window-point and point are the same
2016-12-07 12:41:05 -08:00
Paul Eggert
33a2f93aad ; Merge from origin/emacs-25
The following commit was skipped:

a3487a8 Fix bug#25087
2016-12-07 12:41:05 -08:00
Paul Eggert
99e20f105a Merge from origin/emacs-25
ba2847f ; * lisp/vc/ediff-util.el (ediff-janitor): Fix last change.  ...
8b43f97 * lisp/vc/ediff-util.el (ediff-janitor): Doc fix.  (Bug#25046)
c20035c ; * doc/emacs/programs.texi (Man Page): Fix last change.
93d8346 Improve indexing of 'man'
2016-12-07 12:41:05 -08:00
Paul Eggert
e22eabd5bc ; Merge from origin/emacs-25
The following commits were skipped:

c491989 Port to Sun C 5.14
95eb641 Fix mail-combine-fields
2016-12-07 12:41:05 -08:00
Paul Eggert
e676b7b80b Merge from origin/emacs-25
d31298d Fix documentation of `window-combination-resize'
2086f4c Typo fixes in elisp manual
2016-12-07 12:41:04 -08:00
Paul Eggert
8cd0d5df81 ; Merge from origin/emacs-25
The following commit was skipped:

f6da597 ; Revert "Guard terminal par. in XTerm mouse mode"
2016-12-07 12:41:04 -08:00
Paul Eggert
c5532f5a5c Merge from origin/emacs-25
3980903 ; Update ChangeLog.2, etc/AUTHORS and ldef-boot.el for Emacs ...
5878abf Fix 'expand-file-name' during startup on MS-Windows
2016-12-07 12:40:43 -08:00
Paul Eggert
32b46fc82f ; Merge from origin/emacs-25
The following commit was skipped:

4606529 ; ChangeLog.2 update
2016-12-07 12:39:08 -08:00