aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge from origin/emacs-25Paul Eggert2017-01-01209-209/+209
|\ \ | |/ | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31209-209/+209
| | | | | | | | Run admin/update-copyright.
| * Backport: Remove an ambiguity from defvar's doc string. Fixes bug #25292.Alan Mackenzie2016-12-301-4/+5
| | | | | | | | | | | | | | | | | | The ambiguity was whether INITVALUE is evaluated when it's not going to be used to set SYMBOL's value. * src/eval.c (defvar): Rewrite a paragraph of the doc string. (cherry picked from commit 8295e97f18490a535d1188a3daf0b0fd1bf4fa0d)
* | Merge from origin/emacs-25Paul Eggert2017-01-012-7/+22
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 697167b ; Improve wording of previous change in variables.texi d7973e8 Document 'default-toplevel-value' and 'set-default-toplevel-v... 8b71826 Don't modify minibuffer variables globally 5b5e036 Revert to pre-25.1 behavior in ffap 19994a1 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug. 3ace730 Attempt to fix 64-bit AIX build f69bd79 Clarify usage of 'ediff-cleanup-hook' (Bug#24675) c04ac8a Document that variable binding order is unspecified 272554a * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix. 08de101 Fix M-x hints on Mac port 86a297a Work around reporting a dpi change in apply_xft_settings cf1f985 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change 9e1209d Amend the version number of CC Mode 5.33 -> 5.32.99. Don't m... 88cdf14 Improve skeleton docstrings
| * Attempt to fix 64-bit AIX buildEli Zaretskii2016-12-231-5/+5
| | | | | | | | | | * src/unexaix.c (make_hdr, copy_text_and_data, write_segment): Fix type-casts that assumed 32-bit pointers. (Bug#25141)
| * Work around reporting a dpi change in apply_xft_settingsMartin Rudalics2016-12-221-2/+17
| | | | | | | | | | * src/xsettings.c (apply_xft_settings): Don't report a change when dpi settings do not differ substantially.
* | Merge from origin/emacs-25Paul Eggert2017-01-011-1/+2
|\ \ | |/ | | | | 4179238 Improve documentation of 'w32-scroll-lock-modifier'
| * Improve documentation of 'w32-scroll-lock-modifier'Eli Zaretskii2016-12-191-1/+2
| | | | | | | | | | | | | | | | * doc/emacs/msdos.texi (Windows Keyboard): Document how to set up w32-scroll-lock-modifier so that Scroll Lock toggles the LED. * src/w32fns.c (syms_of_w32fns) <w32-scroll-lock-modifier>: Doc fix. (Bug#25204)
| * Port to Sun C 5.14Paul Eggert2016-12-011-4/+4
| | | | | | | | | | | | | | Backport from master. Sun C 5.14 supports C11 but not GCC extensions, and so refuses to compile Emacs without this patch. * src/alloc.c (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in general this macro is restricted to signed types.
* | Clarify internal_catch etc.Paul Eggert2016-12-311-48/+43
| | | | | | | | | | | | | | | | | | | | | | | | The recent change to internal_catch and friends relied on some confusion I introduced to the code in 2013. Attempt to fix the confusion by clarifying the code instead. This saves an instruction and a load dependency in the typical case. * src/eval.c (internal_catch, internal_condition_case) (internal_condition_case_1, internal_condition_case_2) (internal_condition_case_n): Undo the previous change. Instead, use use ‘c’ rather than ‘handlerlist’ in the typical case. Also, use ‘eassert’ rather than ‘clobbered_eassert’ when possible.
* | * src/xdisp.c (string_from_display_spec): Simplify.Paul Eggert2016-12-311-16/+8
| |
* | Rework NS event handling (bug#25265)Alan Third2016-12-312-313/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsterm.m (unwind_apploopnr): Remove. (ns_read_socket): Remove references to apploopnr. Make processing the NS event loop conditional on being in the main thread. (ns_select): Remove references to apploopnr. Remove all fd_handler related stuff. Check if there are events waiting on the NS event queue rather than running the event loop. Remove unused variables and code. (fd_handler): Remove. (ns_term_init): Remove creation of fd_handler thread. (hold_event, EmacsApp:sendEvent, EmacsView:mouseMoved, EmacsView:windowDidExpose): Remove send_appdefined. (ns_send_appdefined): Always check the event queue for applicationDefined events rather than relying on send_appdefined var. * src/nsterm.h: Remove reference to fd_handler method.
* | Don't define NOMINMAX on MS-WindowsEli Zaretskii2016-12-311-1/+0
| | | | | | | | | | | | * src/callproc.c (NOMINMAX) [WINDOWSNT]: Don't define. This is no longer needed with the current sources and MinGW headers, while defining NOMINMAX causes an annoying compiler warning.
* | Simplify code in eval.c that calls 'setjmp'Chris Gregory2016-12-311-43/+48
| | | | | | | | | | | | | | | | | | * src/eval.c (internal_catch, internal_condition_case) (internal_condition_case_1, internal_condition_case_2) (internal_condition_case_n): Factor out the common tail of the functions. Copyright-paperwork-exempt: yes
* | Simplify code in 'string_from_display_spec'Chris Gregory2016-12-311-6/+5
| | | | | | | | | | | | | | * src/xdisp.c (string_from_display_spec): Eliminate a redundant test before the loop. Copyright-paperwork-exempt: yes
* | Serialize random number generation on MS-WindowsEli Zaretskii2016-12-311-2/+25
| | | | | | | | | | | | | | | | * src/w32.c (rand_as183): New function. (random): Use it instead of MS runtime's 'rand'. This avoids producing separate and identical random series in each Lisp thread. (srandom): Modify to supply 3 seed values to 'rand_as183'.
* | * src/gfilenotify.c (Fgfile_monitor_name): Return interned symbol.Michael Albinus2016-12-311-1/+1
| |
* | Don't call xg_select for a NextStep build.Ken Raeburn2016-12-301-2/+2
| | | | | | | | | | | | | | NextStep builds use glib but don't use xg_select. * src/process.c (wait_reading_process_output): Don't call xg_select for a NextStep build.
* | Increase the obarray size.Ken Raeburn2016-12-301-1/+1
| | | | | | | | | | | | | | | | In a typical GNU/Linux/X11 build, we wind up with over 15k symbols by the time we've started. The old obarray size ensured an average chain length of 10 or more. * src/lread.c (OBARRAY_SIZE): Increase to 15121.
* | Initialize thread support for Xlib.Ken Raeburn2016-12-301-0/+7
| | | | | | | | | | * src/xterm.c (x_initialize) [THREADS_ENABLED]: Call XInitThreads before doing anything else with X.
* | Rename primary_thread to main_threadPaul Eggert2016-12-304-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | This avoids the confusion of using two different phrases "main thread" and "primary thread" internally to mean the same thing. See: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01142.html * src/thread.c (main_thread): Rename from primary_thread, since the new name no longer clashes with main_thread_id and Emacs internals normally call this the "main thread". (init_main_thread): Rename from init_primary_thread. (main_thread_p): Rename from primary_thread_p. All uses changed.
* | Rename main_thread to main_thread_id and simplifyPaul Eggert2016-12-305-40/+12
| | | | | | | | | | | | | | | | | | | | | | | | * src/emacs-module.c: Include syssignal.h, for main_thread_id. [HAVE_PTHREAD]: Do not include pthread.h. (main_thread): Remove. All uses replaced by main_thread_id, or by dwMainThreadId on NT. Since the HAVE_PTHREAD code is now using the main_thread_id established by sysdep.c, there is no need for a separate copy of the main thread ID here. (module_init): Remove. All uses removed. * src/sysdep.c (main_thread_id) [HAVE_PTHREAD]: Rename from main_thread. All uses changed. Now extern.
* | * src/gfilenotify.c (Fgfile_monitor_name): Return a symbol.Michael Albinus2016-12-301-4/+3
| |
* | * src/sysdep.c (deliver_process_signal): Improve comment.Paul Eggert2016-12-301-3/+6
| |
* | Attempt to fix crashes with threads in GTK buildsEli Zaretskii2016-12-303-12/+17
| | | | | | | | | | | | | | | | | | | | * src/xgselect.c (xg_select): Call pselect via thread_select, not directly, to avoid running Lisp (via unblock_input) when more than one thread could be running. (Bug#25247) * src/process.c (wait_reading_process_output) [HAVE_GLIB]: Call xg_select directly instead of through thread_select. * src/xgselect.h (xg_select): Last 2 arguments are no longer 'const', for consistency with thread_select.
* | Remove an ambiguity from defvar's doc string. Fixes bug #25292.Alan Mackenzie2016-12-291-4/+5
| | | | | | | | | | | | | | The ambiguity was whether INITVALUE is evaluated when it's not going to be used to set SYMBOL's value. * src/eval.c (defvar): Rewrite a paragraph of the doc string.
* | Improve filenotify-tests.elMichael Albinus2016-12-294-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/inotify.c (Finotify_valid_p): * src/kqueue.c (Fkqueue_valid_p): * src/w32notify.c (Fw32notify_valid_p): * src/gfilenotify.c (Fgfile_valid_p): Fix typo in docstring. (Fgfile_monitor_name): New defun. (syms_of_gfilenotify): Declare Sgfile_monitor_name. * test/lisp/filenotify-tests.el (file-notify--test-read-event): New defun, derived from `file-notify--test-read-event-timeout'. Replace all calls of `read-event' by this. (file-notify--test-timeout): Fix docstring. (file-notify--test-monitor): New defun. (file-notify--deftest-remote): Do not bind `file-notify--test-read-event-timeout' anymore. (file-notify-test00-availability): Print also monitor, if existent. (file-notify--test-with-events): Add an additional `file-notify--test-read-event' call, in order to get it work after `file-notify-add-watch'. Remove special timeout for cygwin. (file-notify-test02-events): Make a better check for cygwin. (file-notify-test06-many-events): Improve event list for cygwin. (file-notify-test08-watched-file-in-watched-dir): Add cygwin case.
* | ; fix indentingPaul Eggert2016-12-271-2/+2
| | | | | | | | | | | | Problem reported by Chris Gregory in: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00968.html * src/keyboard.c (read_event_from_main_queue): Fix indenting.
* | Simplify prog1 implementationPaul Eggert2016-12-273-17/+8
| | | | | | | | | | | | | | | | | | | | Inspired by a suggestion from Chris Gregory in: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00965.html On my platform, this generates exactly the same machine insns. * src/eval.c (prog_ignore): Rename from unwind_body, since it’s more general than that. All callers changed. (Fprog1): Simplify by using prog_ignore. (Fwhile): Clarify by using prog_ignore.
* | Fix expand-file-name on DOS_NT systems when /: escaping is usedEli Zaretskii2016-12-271-1/+10
| | | | | | | | | | | | | | * src/fileio.c (Fexpand_file_name) [DOS_NT]: Don't expand "~" in file names escaped by "/:". Don't recursively expand default-directory escaped with "/:" which is not followed by a drive spec. (Bug#25183)
* | Fix typo in lisp.h reordering patchPaul Eggert2016-12-251-8/+0
| | | | | | | | | | * src/lisp.h (XUNTAG) [!USE_LSB_TAG]: Remove duplicate defn. Reported by Eli Zaretskii (Bug#25128#19).
* | regex.h now includes sys/types.hPaul Eggert2016-12-256-14/+6
| | | | | | | | | | | | | | * src/dired.c, src/emacs.c, src/search.c, src/syntax.c, src/thread.h: Do not include sys/types.h; no longer needed. * src/regex.h: Include <sys/types.h>, as that's what Gnulib and glibc regex.h does, and POSIX has blessed this since 2008.
* | Reorder lisp.h to declare types before using themPaul Eggert2016-12-2510-514/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This puts basic functions for types to be after the corresponding type definitions. This is a more-common programming style in C, and will make it easier to port Emacs to gcc -fcheck-pointer-bounds, since the functions now have access to the corresponding types' sizes. This patch does not change the code; it just moves declarations and definitions and removes no-longer-needed forward declarations (Bug#25128). * src/buffer.c, src/data.c, src/image.c: Include process.h, for PROCESSP. * src/buffer.h (BUFFERP, CHECK_BUFFER, XBUFFER): * src/process.h (PROCESSP, CHECK_PROCESS, XPROCESS): * src/termhooks.h (TERMINALP, XTERMINAL): * src/window.h (WINDOWP, CHECK_WINDOW, XWINDOW): * src/thread.h (THREADP, CHECK_THREAD, XTHREAD, MUTEXP, CHECK_MUTEX) (XMUTEX, CONDVARP, CHECK_CONDVAR, XCONDVAR): Move here from lisp.h. * src/intervals.h: Include buffer.h, for BUFFERP. Include lisp.h, for Lisp_Object. * src/lisp.h: Reorder declarations and definitions as described above. Move thread includes to be later, so that they can use the reordered definitions. Move some symbols to other headers (noted elsewhere). Remove forward decls that are no longer needed. * src/thread.h: Include systhread.h here, not in lisp.h, since lisp.h itself does not need systhread.h.
* | Fix timezone detection of parse-iso8601-time-stringHong Xu2016-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | * parse-time.el (parse-iso8601-time-string): Fix timezone parsing. Add a doc string. (Bug#25086) * editfns.c (Fdecode-time): Doc fix. * emacs-mime.texi (time-date): Add an example for parse-iso8601-time-string. * parse-time-tests.el (parse-time-tests): Add tests for parse-iso8601-time-string.
* | Simplify exec_byte_code via moving decls etc.Paul Eggert2016-12-231-25/+15
| | | | | | | | | | | | * src/bytecode.c (exec_byte_code): Simplify, mostly by moving initializers into decls, and by omitting some unnecessary changes to ‘top’.
* | Remove interpreter’s byte stackPaul Eggert2016-12-237-189/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves performance overall on my benchmark on x86-64, since the interpreted program-counter resides in a machine register rather than in RAM. * etc/DEBUG, src/.gdbinit: Remove xbytecode GDB command, as there is no longer a byte stack to decode. * src/bytecode.c (struct byte_stack, byte_stack_list) (relocate_byte_stack): Remove. All uses removed. (FETCH): Simplify now that pc is now local (typically, in a register) and no longer needs to be relocated. (CHECK_RANGE): Remove. All uses now done inline, in a different way. (BYTE_CODE_QUIT): Remove; now done by op_relative_branch. (exec_byte_code): Allocate a copy of the function’s bytecode, so that there is no problem if GC moves it. * src/lisp.h (struct handler): Remove byte_stack member. All uses removed. * src/thread.c (unmark_threads): Remove. All uses removed. * src/thread.h (struct thread_state): Remove m_byte_stack_list member. All uses removed. m_stack_bottom is now the first non-Lisp field.
* | BYTE_CODE_SAFE typo fixPaul Eggert2016-12-231-1/+1
| | | | | | | | | | * src/bytecode.c (FETCH): Depend on the value of BYTE_CODE_SAFE, not on whether it is defined.
* | BYTE_CODE_SAFE cleanupsPaul Eggert2016-12-231-18/+11
| | | | | | | | | | | | | | | | * src/bytecode.c (BYTE_MAINTAIN_TOP): Remove; no longer needed. (struct byte_stack) [BYTE_MAINTAIN_TOP]: Remove unused members ‘top’ and ‘bottom’. (exec_byte_code): Nest inside { } to avoid GCC warning about jumping over declaration when compiled with -DBYTE_CODE_SAFE.
* | Use max_align_t instead of void *Paul Eggert2016-12-231-7/+2
| | | | | | | | * src/thread.c (run_thread): Don’t assume void * is aligned enough.
* | Prevent infloops in redisplay due to truncate-lines and overlaysEli Zaretskii2016-12-231-0/+11
| | | | | | | | | | | | * src/xdisp.c (hscroll_window_tree): Avoid inflooping in redisplay_window when a screen line ends in an overlay string with a newline. (Bug#25246)
* | Treat incomplete integer literals as errorsPhilipp Stephani2016-12-231-1/+1
| | | | | | | | | | | | | | | | See Bug#25120. * src/lread.c (read_integer): Treat incomplete integer literals as errors. * test/src/lread-tests.el (lread-empty-int-literal): New unit test for incomplete integer literals.
* | Avoid aborts due to unaligned byte stack of threadsEli Zaretskii2016-12-231-3/+10
| | | | | | | | | | * src/thread.c (run_thread): Make sure the pointers to thread byte stack are properly aligned. (Bug#25247)
* | ; Spelling fixesPaul Eggert2016-12-226-17/+15
| |
* | Pacify --enable-gcc-warningsPaul Eggert2016-12-225-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/charset.c (load_charset_map): * src/coding.c (decode_coding_object): * src/frame.c (make_frame): * src/window.c (Frecenter): Mark locals with UNINIT to silence false alarms from -Wmaybe-uninitialized. * src/lisp.h (SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD) (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): Check and assume that values are nonnull. This pacifies -Wmaybe-uninitialized in Fmake_variable_buffer_local and Fmake_local_variable.
* | Fix last change with thread marking under GC_CHECK_MARKED_OBJECTSEli Zaretskii2016-12-223-2/+9
| | | | | | | | | | | | | | * src/thread.c (primary_thread_p): New function. * src/alloc.c (mark_object): Use 'primary_thread_p' to bypass tests meant for thread objects allocated dynamically. * src/thread.h (primary_thread_p): Add prototype.
* | Fix aborts in GC under GC_CHECK_MARKED_OBJECTSEli Zaretskii2016-12-211-2/+4
| | | | | | | | | | | | | | | | | | * src/alloc.c (mark_object) [GC_CHECK_MARKED_OBJECTS]: Don't abort for thread objects. They are marked via the all_threads list, and therefore don't need to be inserted into the red-black tree, so mem_find will never find them. Reported by Daniel Colascione <dancol@dancol.org> in http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00817.html.
* | * src/data.c (Fmake_variable_frame_local): RemoveStefan Monnier2016-12-215-170/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'. * src/data.c (swap_in_symval_forwarding, set_internal) (set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local) (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p): Don't pay attention to ->frame_local any more. (syms_of_data): Remove Qtrapping_frame_local and don't defsubr Smake_variable_frame_local. * etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal of make-variable-frame-local. * lisp/help-fns.el (describe-variable): Don't handle the now impossible frame-local case. * lisp/subr.el (make-variable-frame-local): Remove obsolescence data. * src/frame.c (store_frame_param): * src/eval.c (specbind): Don't pay attention to ->frame_local any more. * src/widget.c (first_frame_p): Remove, unused.
* | Port dumping better to WSLPaul Eggert2016-12-211-4/+9
| | | | | | | | | | | | | | Problem reported by Angelo Graziosi in: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00822.html * src/sysdep.c (disable_address_randomization): Detect buggy platforms where 'personality' always returns 0.
* | Protect change of window's buffer in vertical-motion against unwinds (bug#25209)Andreas Schwab2016-12-191-12/+20
| | | | | | | | | | * indent.c (restore_window_buffer): New function. (Fvertical_motion): Use it to restore window's buffer.
* | Improve default load-path for uninstalled CANNOT_DUMP buildsGlenn Morris2016-12-191-1/+5
| | | | | | | | | | | | | | | | * src/lread.c (load_path_default) [CANNOT_DUMP]: Use build load-path if we seem to be running uninstalled. (Bug#24974) I think this became an issue several years ago when we stopped using EMACSLOADPATH in the Makefiles; however this change should improve the CANNOT_DUMP uninstalled case in general.