aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'Phillip Lord2015-11-124-87/+37
|\ | | | | | | | | | | Conflicts: src/cmds.c src/keyboard.c
| * The heuristic that Emacs uses to add an `undo-boundary' has beenPhillip Lord2015-11-124-80/+30
| | | | | | | | | | | | | | | | | | | | | | | | reworked, as it interacts poorly with functions on `post-command-hook' or `after-change-functions'. * lisp/simple.el: New section added. * src/cmds.c (remove_excessive_undo_boundaries): Now in lisp. (self_insert_command): Calls simple.el to amalgamate. (delete_char): Calls simple.el to amalgamate. * src/keyboard.c (last_undo_boundary): Removed. * src/undo.c (run_undoable_change): New function.
* | Fix the MinGW64 and Cygwin-w32 buildsEli Zaretskii2015-11-121-14/+12
| | | | | | | | | | | | | | | | | | * src/w32fns.c (MYNOTIFYICONDATAW_V1_SIZE) (MYNOTIFYICONDATAW_V2_SIZE, MYNOTIFYICONDATAW_V3_SIZE): Define and use instead of the corresponding NOTIFYICONDATAW_Vn_SIZE macros, which cause trouble with MinGW42 headers. Ifdef away tray notifications code for Cygwin. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
* | Speed up x_real_pos_and_offsets using XCBKen Raeburn2015-11-121-17/+200
| | | | | | | | | | | | * src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Add XCB flavors of all X calls, and pipeline requests when possible, collecting results later. Eliminate use of x_catch_errors (and thus XSync) in XCB case.
* | Enable use of XCB for checking window manager stateKen Raeburn2015-11-121-8/+37
| | | | | | | | | | | | | | * src/xterm.c (get_current_wm_state) [USE_XCB]: Use XCB calls instead of XGetWindowProperty plus error-catching, since we can explicitly check for errors in the XCB version. This eliminates 3 XSync calls on top of the round-trip actually fetching the information.
* | Detect XCB and save a connection handleKen Raeburn2015-11-123-1/+35
| | | | | | | | | | | | | | | | | | | | * configure.ac: If using X11, check for XCB libraries and header. * src/Makefile.in (XCB_LIBS): Define. (LIBX_EXTRA): Include it. * src/xterm.h [USE_XCB]: Include X11/Xlib-xcb.h. (struct x_display_info) [USE_XCB]: Add an XCB connection handle field. * src/xterm.c (x_term_init) [USE_XCB]: Initialize the new field.
* | Reduce some data dependencies between X callsKen Raeburn2015-11-121-19/+27
| | | | | | | | | | | | | | | | | | | | Gains nothing in the traditional-Xlib code, but more closely aligns with how the XCB version will work. * src/xfns.c (x_real_pos_and_offsets): When translating coordinates, send coordinates (0,0) to the X server and add in the real coordinates after getting the response. Move XGetGeometry for outer window inside error-trapping block. Use DPY variable more, since it's available.
* | Use color cache for creating bitmapKen Raeburn2015-11-121-0/+11
| | | | | | | | | | | | * src/image.c (x_create_bitmap_from_xpm_data) [ALLOC_XPM_COLORS]: Set attributes to use the caching color allocator. Initialize and free the cache.
* | Implement tray notifications for MS-WindowsEli Zaretskii2015-11-111-0/+478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32fns.c (MY_NOTIFYICONDATAW): New typedef. (NOTIFYICONDATAW_V1_SIZE, NOTIFYICONDATAW_V2_SIZE) (NOTIFYICONDATAW_V3_SIZE, NIF_INFO, NIIF_NONE, NIIF_INFO) (NIIF_WARNING, NIIF_ERROR, EMACS_TRAY_NOTIFICATION_ID) (EMACS_NOTIFICATION_MSG): New macros. (NI_Severity): New enumeration. (get_dll_version, utf8_mbslen_lim, add_tray_notification) (delete_tray_notification, Fw32_notification_notify) (Fw32_notification_close): New functions. (syms_of_w32fns): Defsubr functions exposed to Lisp. DEFSYM keywords used by w32-notification-notify. * doc/lispref/os.texi (Desktop Notifications): Describe the native w32 tray notifications.
* | Avoid creating notification objects when possibleDavid Reitter2015-11-101-12/+28
| | | | | | | | | | | | | | | | * src/nsterm.m (windowWillEnterFullScreen, windowWillExitFullScreen:, windowDidEnterFullScreen, windowDidExitFullScreen): provide convenience functions that do not require a notification object. When needed, define NSWindowDidEnterFullScreenNotification to allow for compilation on OS X 10.6.8.
* | Move INTEGER_TO_CONS body out of .h filePaul Eggert2015-11-102-11/+30
| | | | | | | | | | | | | | | | | | | | * src/data.c (INTBIG_TO_LISP): New macro, with most of the contents of the old INTEGER_TO_CONS. (intbig_to_lisp, uintbig_to_lisp): New functions. * src/lisp.h (INTEGER_TO_CONS): Simplify by using EXPR_SIGNED and the new functions. This shrinks code size a bit, and makes it easier to put a breakpoint on handling of large integers.
* | Spelling fixesPaul Eggert2015-11-104-11/+11
| | | | | | | | | | * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type): Fix misspelling in output.
* | Fix assertion violation in define-keyEli Zaretskii2015-11-091-1/+3
| | | | | | | | | | | | * src/keymap.c (store_in_keymap): Don't use XFASTINT on non-character objects. Reported by Drew Adams <drew.adams@oracle.com> and Juanma Barranquero <lekktu@gmail.com>.
* | Fix a memory leak in GC of font cacheDima Kogan2015-11-091-3/+27
| | | | | | | | | | | | * src/alloc.c (compact_font_cache_entry): Don't GC unmarked font entities if some of the fonts it references are marked. This plugs a memory leak. (Bug#21556)
* | Use INT_ADD_WRAPV etc. to check integer overflowPaul Eggert2015-11-0821-184/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string): * src/buffer.c (record_overlay_string, overlay_strings): * src/casefiddle.c (casify_object): * src/ccl.c (Fccl_execute_on_string): * src/character.c (char_width, c_string_width, lisp_string_width) (count_size_as_multibyte, string_escape_byte8): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display): * src/editfns.c (styled_format): * src/fns.c (Ffillarray): * src/ftfont.c (ftfont_shape_by_flt): * src/gnutls.c (gnutls_hex_string): * src/gtkutil.c (get_utf8_string): * src/image.c (x_to_xcolors, x_detect_edges, png_load_body): * src/keymap.c (Fkey_description): * src/lisp.h (SAFE_ALLOCA_LISP): * src/term.c (encode_terminal_code): * src/tparam.c (tparam1): * src/xselect.c (x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (x_term_init): When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to more-complicated code involving division and/or INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and subtraction and/or INT_ADD_OVERFLOW. * src/casefiddle.c (casify_object): Simplify multibyte size check. * src/character.c: Remove some obsolete ‘#ifdef emacs’s. * src/data.c (arith_driver): Also check for division overflow, as that’s now possible given that the accumulator can now contain any Emacs integer. * src/lisp.h (lisp_word_count): Remove; no longer used.
* | * src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614).Paul Eggert2015-11-081-3/+1
| |
* | ELF unexec: Don't insert a new sectionAlan Modra2015-11-081-474/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reuse the .bss section instead, making it SHT_PROGBITS. This way we don't need to mess with symbol st_shndx, or section sh_link and sh_info. This does lead to eu-elflint complaints about symbols defined in .bss with a needed version, because normally it is undefined symbols that have needed versions; Defined symbols have version definitions. The exception is symbols defined by the linker in .dynbss for variables copied from a shared library in order to avoid text relocations, with copy relocs to copy their initial values from the shared library. These symbols are both defined and have needed versions, and eu-elflink only expects to see them in SHT_NOBITS sections. Of course there is no real problem with having such symbols in SHT_PROGBITS sections. glibc ld.so handles them fine. * unexelf.c: Delete outdated comments. (PATCH_INDEX): Delete. (find_section): Delete. (unexec): Don't add a new section. Instead reuse the last bss section, extending it to cover dumped data. Make bss sections SHT_PROGBITS. Remove all patching of sh_link, sh_info and st_shndx. Rename bss sections.
* | ELF unexec: Drive from PT_LOAD header rather than sectionsAlan Modra2015-11-081-213/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites bss handling in the ELF unexec code. Finding bss sections by name results in complicated code that - does not account for all names of possible bss sections, - assumes specific ordering of bss sections, - can wrongly choose a SHT_NOBITS section not in the bss segment, - incorrectly calculates bss size (no accounting for alignment gaps), - assumes .data and .bss are in the same segment. All of these problems and more are solved by finding the bss segment in PT_LOAD headers, ie. the address range included in p_memsz but not p_filesz of the last PT_LOAD header, then matching SHT_NOBITS sections in that address range. * unexelf.c: Delete old ppc comment. (OLD_PROGRAM_H): Define. (round_up): Delete. (unexec): Don't search for bss style sections by name. Instead, use the last PT_LOAD header address range covered by p_memsz but not p_filesz and match any SHT_NOBITS section in that address range. Simplify initialisation of section header vars. Don't assume that section headers are above bss segment. Move copying of bss area out of section loop. Align .data2 section to 1, since it now covers the entire bss area. For SHT_NOBITS sections in the bss segment, leave sh_addr and sh_addralign unchanged, but correct sh_offset. Clear memory corresponding to SHT_NOBITS .plt section. Delete comment and hacks for sections partly overlapping bss range now that the full range is properly calculated. Delete now dead .sbss code. (Bug#20614)
* | ELF unexec: R_*_NONE relocsAlan Modra2015-11-081-7/+7
| | | | | | | | | | | | | | These should be ignored on all targets. * unexelf.c (unexec): Ignore R_*_NONE relocs for any target, not just Alpha. Comment on reloc size assumption.
* | ELF unexec: _OBJC_ symbols in bss sectionsAlan Modra2015-11-081-13/+18
| | | | | | | | | | | | | | | | | | | | This code assumed that there was only one bss section. Rather than checking for a particular index, check the section type. Also, handle the possibility that the section was SHT_NOBITS originally and is unchanged, in which case no clearing is needed (and sh_offset isn't necessarily valid, which can lead to a wild memset). * unexelf.c (unexec): Properly handle _OBJC_ symbols in bss sections.
* | ELF unexec: Symbol table patchingAlan Modra2015-11-081-4/+5
| | | | | | | | | | | | No st_shndx value larger than SHN_LORESERVE should be changed. * unexelf.c (unexec): Don't adjust any st_shndx larger than SHN_LORESERVE. Error on SHN_XINDEX.
* | ELF unexec: Merge Alpha and MIPS COFF debug handlingAlan Modra2015-11-081-67/+29
| | | | | | | | | | | | | | | | | | * unexelf.c (unexec): Merge Alpha and MIPS COFF debug handling. Don't find .mdebug section index, find the section in the loop. Allow for unlikely possibility that .mdebug is located at sh_offset before bss segment, by calculating move from difference in sh_offset rather than just assuming new_data2_size. Simplify cbLineOffset handling.
* | ELF unexec: Tidy codeAlan Modra2015-11-081-114/+96
| | | | | | | | | | | | | | | | | | | | Separate out some of the more mechanical changes so following patches are smaller. * unexelf.c (unexec): Rearrange initialisation of program header vars. Use pointer vars in loops rather than indexing section header array via macros. Simplify _OBJC_ sym code and reloc handling code.
* | ELF unexec: Correct section header indexAlan Modra2015-11-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | First a small fix. The code incorrectly uses "NEW_SECTION_H (n)" when it should have been using "NEW_SECTION_H (nn)" to find the name of the section currently being processed. Of course, before the bss sections, n and nn have the same value, so this doesn't matter except in the case of .sbss. For .sbss this probably meant .bss (most likely the next section) was copied from memory. A later patch removes the bogus .sbss handling anyway. * unexelf.c (unexec): Use correct index to look up names.
* | Prefer xpalloc to doubling buffers by handPaul Eggert2015-11-075-38/+24
| | | | | | | | | | | | | | | | | | | | | | * src/lread.c (grow_read_buffer): New function, which uses xpalloc. (read1): Use it for simplicity. * src/macros.c (store_kbd_macro_char): * src/minibuf.c (read_minibuf_noninteractive): * src/term.c (encode_terminal_code): * src/xrdb.c (magic_db): Prefer xpalloc to growing buffers by hand. This doesn’t fix any bugs, but simplifies the code a bit.
* | Provide NS notification objects where required to eliminate warningsDavid Reitter2015-11-071-5/+18
| | | | | | | | | | | | * nsterm.m (windowDidResize:, toggleFullScreen:): Call notification functions with notification objects as per delegate APIs.
* | Ignore fullscreen exit notifications on NS when frame is deadDavid Reitter2015-11-071-3/+15
| | | | | | | | | | | | | | | | | | * nsterm.m (windowDidResize:,windowWillExitFullScreen:) (windowDidExitFullScreen:): Return if frame is dead. These functions may be called when a fullscreen frame is closed; they are called before, not after. May address Bug#21428.
* | Speed up lookup in redisplay--variablesEli Zaretskii2015-11-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (redisplay--variables): Make it a hash-table. * src/xdisp.c (maybe_set_redisplay): Access redisplay--variables as a hash-table. This speeds up this function by an order of magnitude: where previously a setq was slowed down by 100% by introducing the maybe_set_redisplay test, it is now only 5% slower. (syms_of_xdisp) <redisplay--variables>: Doc fix.
* | In x_consider_frame_title don't set title of tooltip framesMartin Rudalics2015-11-071-3/+4
| | | | | | | | | | * src/xdisp.c (x_consider_frame_title): Return immediately for tooltip frames to avoid displaying empty tooltips.
* | Fixed NextStep fullscreen problem (bug#21770).Anders Lindgren2015-11-061-5/+13
| | | | | | | | | | * nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen frames.
* | Ensure redisplay after evaluationEli Zaretskii2015-11-063-0/+16
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert last change. * lisp/frame.el (redisplay--variables): Populate the redisplay--variables list. * src/xdisp.c (maybe_set_redisplay): New function. (syms_of_xdisp) <redisplay--variables>: New variable. * src/window.h (maybe_set_redisplay): Declare prototype. * src/data.c (set_internal): Call maybe_set_redisplay. (Bug#21835)
* | Don't invoke overlay modification hooks in wrong bufferEli Zaretskii2015-11-061-0/+17
| | | | | | | | | | | | | | * src/buffer.c (report_overlay_modification): When called with AFTER non-zero, don't invoke overlay modification hooks if the buffer recorded in last_overlay_modification_hooks is different from the current buffer. (Bug#21824)
* | Avoid division by zero crash observed by Yuan MEI.Martin Rudalics2015-11-062-2/+8
| | | | | | | | | | | | | | | | | | See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html. * src/dispnew.c (required_matrix_height, required_matrix_width): Avoid division by zero. * src/xterm.c (x_term_init): Init dpyinfo->smallest_font_height and dpyinfo->smallest_char_width to 1.
* | Render fringe bitmaps correctly on NextStep (bug#21301).Anders Lindgren2015-11-042-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fringe bitmaps were inverted, the background was not transparent, the image data was horizontally mirrored, and periodic fringe bitmaps were not supported. * nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When both background and foreground colors are 0, set the background alpha channel to 0 (making the background transparent). When copying the image data, do this from the most significant bit (leftmost) to the least (rightmost), to avoid mirroring. * nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add support for periodic images (e.g. the empty line indicator).
* | Fix a stupid error in gfilenotify.c.Michael Albinus2015-11-031-0/+1
| | | | | | | | | | * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only, if we've got a `deleted' signal AND the file name is the watched one.
* | * src/alloc.c: Silence compiler warningsJuanma Barranquero2015-10-311-0/+2
| | | | | | | | (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): #ifdef DOUG_LEA_MALLOC.
* | Fix a typo in a macro nameEli Zaretskii2015-10-301-6/+6
| | | | | | | | | | * src/w32proc.c (_NLSCMPERROR): Fix a typo in the name of this macro. (w32_compare_strings): Adjust for the correction.
* | ; * src/lread.c (syms_of_lread) <load-path>: Improve the doc string.Eli Zaretskii2015-10-291-3/+5
| |
* | Handle negative coordinates in ‘x_calc_absolute_position’Andy Moreton2015-10-291-0/+33
| | | | | | | | | | * src/w32term.c (x_calc_absolute_position): Find display origin to allow for negative coordinates.
* | Don't require default-directory to end with a slashDmitry Gutov2015-10-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Magic File Names): Document the change in unhandled-file-name-directory. * lisp/url/url-handlers.el (url-handler-unhandled-file-name-directory): Update accordingly. * src/buffer.c (default-directory): Update the docsting. * src/fileio.c (unhandled-file-name-directory): Default to calling `file-name-as-directory' (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02294.html).
* | * src/dispnew.c (init_display): Simplify overflow checking.Paul Eggert2015-10-281-2/+2
| |
* | Merge branch 'master' of /Volumes/HD2/build/emacs-git-sshAnders Lindgren2015-10-286-10/+78
|\ \
| * \ Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacsAnders Lindgren2015-10-282-4/+8
| |\ \
| | * | * src/process.c (Fget_buffer_process): Improve docstringArtur Malabarba2015-10-281-2/+4
| | | | | | | | | | | | | | | | Document the fact that it doesn't return dead processes.
| | * | Clarify that load-path contents should be directory file namesStephen Leake2015-10-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Directory Names): Define and use "directory file name". Recommend `expand-file-name'. * src/lread.c (load-path): Fix doc string; elements are directory file names.
| * | | Fix incorrect NextStep tool-bar-mode -- wrong number of rows in frame.Anders Lindgren2015-10-284-6/+70
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nsterm.h (struct ns_output): New flag, in_animation. * nsfns.m (Fx_create_frame): Initialize in_animation flag. * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Set in_animation flag around call to "setVisible". Set new tool bar height before call to setVisible. * nsterm.m (x_set_window_size): Don't call [view setRow: andColumns:] as this fools the subsequent call to updateFrameSize from performing the real resize. (windowDidResize): Don't update anything when in_animation is non-zero. Trace output. * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar) (EmacsToolbar): * nsterm.m (x_set_window_size, updateFrameSize) ([EmacsView setRows: andColumns:])
* | | Fixed OS X startup crash.Anders Lindgren2015-10-281-4/+33
|/ / | | | | | | | | | | | | | | | | | | | | Input events started to arrive before ns_term_init() was finished. Solved by blocking input. This also seems to correct the "You can't open the application "Emacs" because it may be damaged or incomplete" error issued when double-clicking on the Emacs application. * nsterm.m (ns_constrain_all_frames, ns_init_term): Block input. * nsterm.m (ns_send_appdefined, EmacsApp): Trace output.
* | * src/keyboard.c (post-command-hook): Shorten docstringArtur Malabarba2015-10-261-7/+3
| |
* | * src/keyboard.c (post-command-hook): Extend the docstringArtur Malabarba2015-10-251-2/+14
| | | | | | | | | | | | | | Mainly, explain how to use it without hanging Emacs, or giving the impression that it is hanging. Also mention `pre-command-hook'. (pre-command-hook): Mention `post-command-hook'.
* | Port recent inline functions fix to Standard CPaul Eggert2015-10-241-56/+155
| | | | | | | | | | | | | | | | | | | | * src/lisp.h (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): Remove. All uses rewritten to define the function directly rather than to use a macro to define the function. This conforms to Standard C, which does not allow stray semicolons at the top level. I hope it also avoids the problems with TAGS. Those macros, though clever, were pretty confusing anyway, and it wasn’t clear they were worth the aggravation even without the TAGS problem.