summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* WIP: Webkit add zoom.rekado2016-09-201-0/+20
|
* WIP: WebKit widget can scroll by itself.rekado2016-09-202-63/+4
|
* WIP: Use WebKit2 API.rekado2016-09-191-106/+80
| | | | | * configure.ac: Check for webkit2gtk-4.0. * src/xwidget.c: Adjust to use WebKit2 API.
* * src/casefiddle.c (casify_word): Simplify.Paul Eggert2016-09-121-17/+5
|
* * src/casefiddle.c (casify_word): Return Qnil.Paul Eggert2016-09-121-6/+4
|
* Refactor common code in {upcase,downcase,capitalize}-word functionsMichal Nazarewicz2016-09-121-27/+17
| | | | | | | | | * src/casefiddle.c (operate_on_word): Removed in favour of… (casify_word) …new function which does what operate_on_word did plus what all of the common code from *-word functions. (upcase-word, downcase-word, capitalize-word): Move code common between those functions (pretty much the whole body of those functions) into casify_word and use that instead of now deleted operate_on_word.
* copy-file now uses GNU/Linux file cloningPaul Eggert2016-09-101-8/+25
| | | | | | | | From a suggestion by Kieran Colford (see Bug#23904). * configure.ac: Check for linux/fs.h. * src/fileio.c [HAVE_LINUX_FS_H]: Include sys/ioctl.h and linux/fs.h. (clone_file): New function. (Fcopy_file): Use it.
* Invert y coord of NS image files (bug#7847)Alan Third2016-09-101-1/+2
| | | | | * src/nsterm.m (ns_dumpglyphs_image): Invert y co-ordinate of the image when compositing.
* Remove dead loop iterations in regex.cMichal Nazarewicz2016-09-091-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | RE_CHAR_TO_MULTIBYTE(c) yields c for ASCII characters and a byte8 character for c ≥ 0x80. Furthermore, CHAR_BYTE8_P(c) is true only for byte8 characters. This means that c = RE_CHAR_TO_MULTIBYTE (ch); if (! CHAR_BYTE8_P (c) && re_iswctype (c, cc)) is equivalent to: c = c; if (! false && re_iswctype (c, cc)) for 0 ⪬ c < 0x80, and c = BYTE8_TO_CHAR (c); if (! true && re_iswctype (c, cc)) for 0x80 ⪬ c < 0x100. In other words, the loop never executes for c ≥ 0x80 and RE_CHAR_TO_MULTIBYTE call is unnecessary for c < 0x80. * src/regex.c (regex_compile): Simplyfy a for loop by eliminating dead iterations and unnecessary macro calls.
* Replace decimalnump with alphanumericpMichal Nazarewicz2016-09-093-6/+15
| | | | | | | | | | | | | decimalnump was used in regex.c only in ISALNUM macro which ored it with alphabeticp. Because both of those functions require Unicode general category lookup, this resulted in unnecessary lookups (if alphabeticp return false decimalp had to perform another lookup). Drop decimalnump in favour of alphanumericp which combines decimelnump with alphabeticp. * src/character.c (decimalnump): Remove in favour of… (alphanumericp): …new function. * src/regex.c (ISALNUM): Use alphanumericp.
* Remove inaccurate comment in regex.cMichal Nazarewicz2016-09-091-2/+1
| | | | | | * src/regex.c (regex_compile): Remove comment indicating that wctype of some character classes may be negative. All wctypes are in fact non-negative.
* STRING_CHAR does not unify characters; update documentationMichal Nazarewicz2016-09-092-17/+3
| | | | | | * src/character.h (STRING_CHAR): Update doc. * src/buffer.h (FETCH_MULTIBYTE_CHAR): Update doc. While at it, change the function to use BYTE_POS_ADDR instead of open-coding it.
* Port flexible array members to GCC + valgrindPaul Eggert2016-09-074-27/+20
| | | | | | | | | | | | | | | | | | | | | | | | | These changes are needed to conform to the C standard's rule for allocating structs containing flexible array members. C11 says that malloc (offsetof (struct s, m) + n) does not suffice to allocate a struct with an n-byte tail; instead, malloc’s arg should be rounded up to the nearest multiple of alignof (struct s). Although this is arguably a defect in C11, gcc -O2 + valgrind sometimes complains when this rule is violated, and when debugging it’s better to keep valgrind happy. For details please see the thread containing the message at: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html * lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c: Include flexmember.h. * lib-src/ebrowse.c (add_sym, add_member, make_namespace) (register_namespace_alias): * src/alloc.c (SDATA_SIZE, allocate_string_data): * src/image.c (xpm_cache_color, imagemagick_create_cache): * src/process.c (Fmake_network_process): Use FLEXSIZEOF instead of offsetof and addition. * src/alloc.c (SDATA_SIZE, vector_alignment): Use FLEXALIGNOF instead of sizeof (ptrdiff_t). * src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR): Remove, as alloc.c can now calculate this on its own.
* Use DEV_TTY more consistentlyPaul Eggert2016-09-065-13/+12
| | | | | | | | * src/conf_post.h (DEV_TTY): Move from here ... * src/keyboard.c, src/keyboard.h: ... to here, as it doesn’t need to be visible everywhere. Make it a constant. * src/keyboard.c (handle_interrupt, Fset_quit_char): * src/process.c (create_process): Prefer DEV_TTY to "/dev/tty".
* Avoid assertion violations when using marker positionsEli Zaretskii2016-09-062-5/+14
| | | | | | | | | * src/intervals.c (set_point_from_marker): If MARKER comes from another buffer, recalculate its byte position before using it to set point. * src/marker.c (set_marker_internal): If POSITION is a marker from another buffer, recalculate its byte position before using it. (Bug#24368)
* Avoid assertion violations when scrolling narrowed bufferEli Zaretskii2016-09-052-4/+6
| | | | | | | | * src/window.c (window_scroll_pixel_based): * src/xdisp.c (pos_visible_p): Don't allow simulated redisplay to start outside the accessible portion of the buffer. This avoids assertion violations when some Lisp narrows the buffer to less than the current window, and then attempts to scroll the buffer.
* Treat SIGINT correctly in GUI sessions on MS-WindowsEli Zaretskii2016-09-054-6/+12
| | | | | | | | | | | | * src/w32proc.c (sys_signal): Don't reject SIGINT, as it is supported by MS runtime. * src/term.c (DEV_TTY): Move from here ... * src/conf_post.h (DEV_TTY): ... to here. Separate definitions for WINDOWSNT and for the rest. * src/keyboard.c (handle_interrupt_signal): Use DEV_TTY instead of a literal "/dev/tty". * etc/NEWS: Mention the behavior change.
* Fix synthetic bold on macOS retina displaysAlan Third2016-09-041-0/+12
| | | | | * src/macfont.m (macfont_draw): Multiply the synthetic bold scaling factor by the OS window backing scale factor.
* Check actual contents before promting about changed fileStefan Monnier2016-09-021-1/+1
| | | | | | | | * lisp/userlock.el (userlock--check-content-unchanged) (userlock--ask-user-about-supersession-threat): New functions. * src/filelock.c (lock_file): Use them to avoid spurious prompting. * doc/lispref/buffers.texi (Modification Time): Update doc of ask-user-about-supersession-threat.
* Don’t create fd >= FD_SETSIZEPaul Eggert2016-09-011-0/+14
| | | | | | | This avoids a potential crash if too many subprocesses (Bug#24325). * src/process.c [HAVE_SETRLIMIT]: Include <sys/resource.h>. (init_process_emacs): If ulimit -n is greater than FD_SETSIZE, set it to FD_SETSIZE.
* Fix over-substitution of quotes on errorPaul Eggert2016-08-311-2/+2
| | | | | | | Problem reported by Tino Calancha in: http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00000.html * src/print.c (print_error_message): Substitute quotes in errmsg only when gotten from a property.
* * src/editfns.c (Fformat_message): Fix doc to match current behavior.Paul Eggert2016-08-301-4/+3
|
* Minor doc quoting fixesPaul Eggert2016-08-302-3/+3
| | | | | | | | | | | | * doc/misc/htmlfontify.texi (Interactive): * lisp/htmlfontify.el (htmlfontify-buffer): Spell out character names, for clarity. The old doc string generated the *Help* text ‘^L ([FF]) or ¤ (244)’, where ‘[FF]’ stands for a form feed character; this was confusing. * lisp/electric.el (electric-quote-mode): * src/doc.c (syms_of_doc): * src/editfns.c (Fformat_message): Remove no-longer-necessary ‘\=’s in doc strings.
* Clarify docstringsAlan Third2016-08-291-7/+14
| | | | * src/nsterm.m: Clarified that ns-x-modifier variables require a symbol.
* Avoid crashes for invalid value of key modifiersEli Zaretskii2016-08-291-1/+6
| | | | | | | | | | * src/keyboard.c (parse_solitary_modifier): If the argument SYMBOL is not a symbol, don't try to recognize it. See http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00502.html for the details. * test/src/keymap-tests.el (keymap-where-is-internal-test): New test, for testing the above fix.
* Memory allocator alignment fixesPaul Eggert2016-08-281-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | These changes remove some assumptions about heap allocator alignment that may not be true on unusual platforms. * src/alloc.c (POWER_OF_2): New macro. (ROUNDUP): Use it. (BLOCK_ALIGN): Verify that it is a power of 2. (aligned_alloc): Check that alignment passed to posix_memalign satisfies POSIX restrictions. (lisp_align_malloc): Check that size passed to aligned_alloc satisfies C11 restrictions. (MALLOC_IS_GC_ALIGNED): Check that GCALIGNMENT is 8, since the code has not been verified to work with other GCALIGNMENT values and the ice is thin here. On GNU/Linux, malloc can return a value that is a multiple of 8 but not 16, even though __alignof__ (max_align_t) is 16. See: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01902.html (lmalloc) [USE_ALIGNED_ALLOC]: Use aligned_alloc only if size is a multiple of alignment, since C11 says the behavior is undefined otherwise. (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in general this macro is restricted to signed types. Remove assertion that the result is a multiple of GCALIGNMENT, as that need not be true.
* Some fixes around `delete-other-frames' and `next-frame'Martin Rudalics2016-08-251-1/+1
| | | | | | | | | | | | * src/frame.c (Fdelete_frame): Clarify doc-string. * lisp/frame.el (delete-other-frames): Delete other frames on FRAME's terminal instead of the current terminal. Delete non-minibuffer-only surrogate frames too. See http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00467.html * doc/lispref/frames.texi (Deleting Frames): Minor fixes for docs of `delete-frame' and `frame-live-p'. Add entry for `delete-other-frames'. (Finding All Frames): Fix doc of `next-frame'.
* Fix macOS 12 deprecation noticesAlan Third2016-08-244-88/+127
| | | | | | | | | | | * src/nsterm.h: Add #defines to allow older versions of macOS to use the new constant names. * src/nsmenu.m: Replace old constant names with new. (fillWithWidgetValue): Remove calls to deprecated setMenuChangedMessagesEnabled. * src/nsterm.m: Replace old constant names with new. * src/nsfns.m: Replace old constant names with new.
* * src/xfns.c (Fx_change_window_property): Modify previous change.Noah Friedman2016-08-231-5/+27
| | | | | | | Instead of forcing format to 8 for strings, check that the length of the string is appropriate for whatever format given. (Fx_window_property_attributes): If prop isn't found on frame's inner window, try its outer window. This mimics the behavior of Fx_window_property.
* Merge from origin/emacs-25Paul Eggert2016-08-225-15/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 927afa1 ; Update ChangeLog.2 and ldef-boot.el for Emacs 25.1 RC2 6bf83b5 * etc/AUTHORS: Update the AUTHORS file 73cbb81 ; ChangeLog spelling fixes 9b99772 Some assorted documentation clarifications 37d4723 Improve commentary in src/character.h 5ccd593 ; Fix typo in /etc/NEWS 96e3d16 * etc/NEWS: Mention the change in json-encode-string. 2e524034 ; * etc/NEWS: Mention incompatible change in url-http-create... 2e4e74e Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac... 66dea65 ; * doc/lispref/windows.texi (Window Parameters): Grammar twe... # Conflicts: # ChangeLog.2 # lisp/ldefs-boot.el
| * ; ChangeLog spelling fixesPaul Eggert2016-08-211-1/+1
| |
| * Some assorted documentation clarificationsPhilipp Stephani2016-08-203-2/+17
| | | | | | | | | | | | | | | | | | * src/fileio.c (Fwrite_region): Clarify that END is ignored if START is nil. * src/editfns.c (Fbuffer_size): Add short discussion about narrowing. * src/callproc.c (Fcall_process_region): Discuss behavior when START and END are not buffer positions.
| * Improve commentary in src/character.hEli Zaretskii2016-08-181-12/+8
| | | | | | | | | | | | * src/character.h (BYTES_BY_CHAR_HEAD, MULTIBYTE_LENGTH) (MULTIBYTE_LENGTH_NO_CHECK, STRING_CHAR_AND_LENGTH): Remove stale info from commentary and improve it.
| * * src/doc.c (Fsubstitute_command_keys): Another fix for smart quotes.Eli Zaretskii2016-08-161-1/+1
| | | | | | | | (Bug#24206)
| * Avoid segfaults due to quoting in 'substitute-command-keys'Eli Zaretskii2016-08-161-4/+16
| | | | | | | | | | * src/doc.c (Fsubstitute_command_keys): Correct character counts when the input string is unibyte. (Bug#24206)
* | Merge from origin/emacs-25Paul Eggert2016-08-221-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c2946e In NEWS describe new handling of window margins (Bug#24193) 0cee66c Facultatively ignore margins when splitting and resizing wind... 8d68147 Document CATEGORY arg to modify-category-entry 8342e74 Document char-script-table's effect on word motion e9ff485 Further fix for 'url-http-create-request' and multibyte strings 0695235 Fix docstring of eval-expression 98b01dd Clarify when 'cursor' property is in effect 75f1882 Convert the remaining strings to unibyte before concatenating d2db5dd Fix bug with handling the bidi cache ccd0e92 * doc/lispref/text.texi (Change Hooks): Minor copyedits. f785ff4 Clarify documentation of before/after-change-functions 3c9cb57 Document use of vectors in keymaps # Conflicts: # src/xdisp.c
| * Document CATEGORY arg to modify-category-entryNoam Postavsky2016-08-131-0/+2
| | | | | | | | * src/category.c (Fmodify_category_entry): Document CATEGORY argument.
| * Fix bug with handling the bidi cacheEli Zaretskii2016-08-111-0/+8
| | | | | | | | | | | | * src/xdisp.c (redisplay_window): Save and restore the state of the bidi cache before reusing the iterator after calls to try_window and try_window_reusing_current_matrix.
* | Display mini-window resized even when there are several framesEli Zaretskii2016-08-221-9/+6
| | | | | | | | | | | | | | * src/xdisp.c (x_consider_frame_title): Bind inhibit-redisplay to t to avoid resizing back the mini-window as result of considering the title of other frames. (Bug#24285) (redisplay_window): No need to bind inhibit-redisplay here.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMartin Rudalics2016-08-224-18/+111
|\ \
| * | Fix interpretation of signed vs unsigned values when retrieving XNoah Friedman2016-08-212-13/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Window properties, and make sure the full value is returned when not parsed. New subr to export type and format information about X Window properties to lisp. * src/xselect.c (selection_data_to_lisp_data): Treat any data as unsigned unless its actual type is INTEGER. CARDINALs, in particular, are unsigned. * src/xfns.c (Fx_change_window_property): If value is a string, ignore any provided format and force to 8. (x_window_property_intern): If returning value as a string, the length is actual_size times the actual format of each element, which is not necessarily bytes. (Fx_window_property_attributes): New subr. (syms_of_xfns): Declare it.
| * | Minor text-quoting-style fixesPaul Eggert2016-08-213-5/+5
| | | | | | | | | | | | | | | | | | | | | * src/charset.c (check_iso_charset_parameter): * src/frame.c (store_frame_param): * src/xselect.c (x_fill_property_data): Use grave accent for left single quote in ‘error’ format strings.
* | | Fix (next-frame nil t) crash (Bug#24281)Martin Rudalics2016-08-221-1/+1
|/ / | | | | | | | | * src/frame.c (candidate_frame): Check minibuf argument before comparing it to zero (Bug#24281).
* | Fix semantics of 'minibuffer' frame parameterMartin Rudalics2016-08-211-17/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'minibuffer' frame parameter is now t for a normal frame (a frame with a root window plus a minibuffer window) and the frame's minibuffer window for a minibuffer-less frame (a frame whose minibuffer window is on another frame). See also: https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01259.html * src/frame.c (make_frame, make_frame_without_minibuffer) (make_minibuffer_frame): When assigning the frame's minibuffer window also store corresponding 'minibuffer' frame parameter. (store_frame_param): Move the 'minibuffer' parameter checks to the beginning so we can silently override the value before it gets stored in the parameter alist. Fix error handling. (Fframe_parameters): Return value of 'minibuffer' parameter unmodified. * lisp/frameset.el (frameset-filter-minibuffer): When the cdr of the parameter is a minibuffer window, save (minibuffer . nil) instead of (minibuffer . t). (frameset--reuse-frame): To find a non-minibuffer-only frame look out for a frame whose 'minibuffer' parameter is t instead of that frame's minibuffer window. (frameset-minibufferless-first-p): To find a minibuffer-less frame look out for a frame whose 'minibuffer' parameter is a window instead of nil.
* | * src/doc.c (Fsubstitute_command_keys): Clarify GC comments.Paul Eggert2016-08-171-2/+4
| |
* | Improve doc string.Karl Fogel2016-08-161-1/+2
| | | | | | | | | | * src/fileio.c (Ffile_name_as_directory): Be precise about the conditions under which a slash is appended.
* | Omit substitute-command-keys code no longer neededPaul Eggert2016-08-161-3/+7
| | | | | | | | | | * src/doc.c (Fsubstitute_command_keys): Remove duplicate initializations.
* | Another fix for scroll-conservatively and overlay stringsEli Zaretskii2016-08-141-2/+3
| | | | | | | | | | | | * src/xdisp.c (redisplay_window): Handle also the case where the calculated window-start point has an overlay string touching it. (Bug#24179)
* | Minor text-quoting-style fixesPaul Eggert2016-08-131-4/+4
| | | | | | | | | | | | | | | | * lisp/cus-edit.el (custom-buffer-create-internal): * lisp/recentf.el (recentf-edit-list): Follow text-quoting-style preference when quoting in UI strings. * src/doc.c (Fsubstitute_command_keys): Don’t say that curved quotes are substituted for, as this is no longer true.
* | Fix substitute-command-keys unibyte, alloc bugsPaul Eggert2016-08-131-92/+77
| | | | | | | | | | | | | | | | | | | | * src/doc.c (Fsubstitute_command_keys): Fix some problems with unibyte strings and with buffer allocation. Make strings multibyte, to avoid problems with unibyte strings that are not valid UTF-8 (Bug#24206). Redo buffer allocation so that it is O(N), not O(N**2). Avoid going past the end of the input string when given invalid input. Avoid some unlikely problems in accessing the wrong storage after a GC.