aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Clean up and simplify image-type setupPaul Eggert2019-05-174-366/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes an unlikely hang involving a circular image description. * src/dispextern.h (struct image.type): Now pointer-to-const. * src/image.c (struct image_type.init) [!WINDOWSNT]: Omit. (IMAGE_TYPE_INIT): New macro. (image_types): Now a small array-of-const, not a pointer. (CACHE_IMAGE_TYPE): Remove; the code’s simpler without it. (ADD_IMAGE_TYPE): Remove this macro, replacing with ... (add_image_type): ... this equivalent function. All uses changed. (define_image_type): Remove. All uses removed. (valid_image_p): Use FOR_EACH_TAIL_SAFE to avoid Emacs hanging if the user creates a circular description of an image. (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type) (gif_type, imagemagick_type, svg_type, gs_type): Remove; now done by image_types. (init_imagemagick_functions): Remove decl of nonexistent function. (gs_clear_image): Remove; all uses replaced by image_clear_image. (initialize_image_type): New function, which captures a lot of the previously-scattered WINDOWSNT ifdefs. (lookup_image_type): Use it. (reset_image_types): Remove. All uses removed. (syms_of_image): Don’t worry about ignoring image_types for pdumper, since it’s a constant now.
* | | | | Tune reading of radix integersPaul Eggert2019-05-151-74/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the performance of (read "%xFF") by about 25% on my platform. * src/lread.c: Include <vla.h>, so that we can better document buffer sizes of arguments. (invalid_radix_integer_format, stackbufsize): New constants. (free_contents): Remove. All uses removed. (invalid_radix_integer): New function. (read_integer): New arg STACKBUF. Assume radix is in range. All uses changed. Use STACKBUF to avoid calling malloc in the usual case. Use grow_read_buffer to simplify. (read1): Tune. Improve quality of diagnostic when MOST_POSITIVE_FIXNUM < radix <= EMACS_INT_MAX.
* | | | | Merge from origin/emacs-26Glenn Morris2019-05-141-3/+4
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02bee78 Let dir locals for more specific modes override those from less b1235f9 Improve documentation of Hexl mode 32d1813 Fix description of (move-to-column <n> t) when column <n> is ... 0397b7c ; Fix smtpmail-stream-type docstring 7dab3ee Recognize single quote attribute values in nxml and sgml (Bug... e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897) ca14dd1 Fix nxml-get-inside (Bug#32003) e7ab351 Fix positioning client buffer as instructed by emacsclient # Conflicts: # lisp/files.el # lisp/textmodes/sgml-mode.el
| * | | | Fix description of (move-to-column <n> t) when column <n> is inside a tabAlan Mackenzie2019-05-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #35647. State that when indent-tabs-mode is non-nil, spaces are inserted before the tab rather than the tab being replaced by spaces. * doc/lispref/text.texi (columns) * src/indent.c (move-to-column): Make the above documentation amendment.
* | | | | Avoid artifacts in ftx and ftcr font backend driversYAMAMOTO Mitsuharu2019-05-142-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftcrfont.c (ftcrfont_open): * src/ftfont.c (ftfont_open2): Make font->height equal to sum of font->ascent and font->descent. Respect :minspace property. (ftfont_open2): Remove redundant assignment. (syms_of_ftfont) <QCminspace>: New DEFSYM.
* | | | | Fix broken build on m68kPaul Eggert2019-05-131-52/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC + valgrind fix caused the m68k build to fail (Bug#35711). Simplify string allocation a bit to make similar problems less likely in the future. * src/alloc.c (sdata, SDATA_NBYTES, SDATA_DATA) [GC_CHECK_STRING_BYTES]: Use the same implementation as with !GC_CHECK_STRING_BYTES, as the special case is no longer needed. (SDATA_ALIGN): New constant. (SDATA_SIZE): Remove this macro, replacing with ... (sdata_size): ... this new function. All uses changed. Properly account for sizes and alignments even in the m68k case, and even if GC_CHECK_STRING_BYTES is not defined.
* | | | | Convert Free_Pixmap macro into terminal hookAlexander Gramiak2019-05-109-35/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/termhooks.h (terminal) [HAVE_WINDOW_SYSTEM]: New terminal hook free_pixmap. * src/image.c: Replace Free_Pixmap with free_pixmap. * src/msdos.h (FRAME_X_DISPLAY): * src/nsgui.h (Display): * src/nsterm.h (FRAME_NS_DISPLAY, FRAME_X_DISPLAY, FRAME_X_SCREEN) (FRAME_X_VISUAL): * src/w32term.h (FRAME_X_DISPLAY): Remove unused X-compatibility macros and typedefs. * src/nsterm.m: * src/w32term.c: * src/xterm.c: Implement and set free_pixmap hook.
* | | | | Remove display member of glyph_stringAlexander Gramiak2019-05-104-74/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This member has little value even on X, and it leaks internal backend details to the glyph_string struct. * src/dispextern.h (glyph_string): Remove X display member. * src/xdisp.c (init_glyph_string): Remove initialization of display. * src/xfont.c (xfont_draw): * src/xterm.c: Use FRAME_X_DISPLAY (s->f) instead of display member.
* | | | | Port LIBRSVG_CHECK_VERSION fix to picky cppPaul Eggert2019-05-081-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (LIBRSVG_CHECK_VERSION): Define to yield false if it isn’t already defined. (svg_load_image): Port to C preprocessors that check the syntax of the entire preprocessing expression before evaluating any of it.
* | | | | Merge from origin/emacs-26Glenn Morris2019-05-081-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh... 37436fe Fix cloning of eieio-named objects (Bug#22840) fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572) f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment. 3b86e0b Clarify handling of long options (Bug#24949) 04340a8 Improve documentation of the daemon and emacsclient 3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
| * | | | ; * src/lisp.h (DEFSYM): Fix inaccurate comment.Eli Zaretskii2019-05-061-1/+1
| | | | |
* | | | | Fix compilation with old versions of librsvgEli Zaretskii2019-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (svg_load_image): Use LIBRSVG_CHECK_VERSION only if it's defined; it isn't in old versions of librsvg.
* | | | | Add an assertion to xdisp.cEli Zaretskii2019-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (display_mode_element): Add an assertion where we assume that 'string' returned by decode_mode_spec is always either a Lisp string or nil.
* | | | | Pacify GCC 9.1Paul Eggert2019-05-072-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/intervals.c (set_intervals_multibyte_1): Omit unused temps. * src/xdisp.c (display_mode_element): Use !NILP instead of STRINGP. This convinces GCC we’re not dereferencing a possibly-null pointer, and should be a bit faster anyway.
* | | | | * src/marker.c (buf_bytepos_to_charpos): Re-add the CHAR_HEAD_P assertionStefan Monnier2019-05-074-31/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This assertion was removed in 1c349c62305d432abf0fa2b6e3f5d754fe4cab79 because the assumption was invalid during set_intervals_multibyte_1. So we change set_intervals_multibyte_1 to solve the problem in the same way as in the rest of Fset_buffer_multibyte, which actually simplifies the code. * src/buffer.c (advance_to_char_boundary): Not static any more. * src/buffer.h (advance_to_char_boundary): Add prototype. * src/intervals.c (set_intervals_multibyte_1): Use it.
* | | | | Clarify what constitutes an event (bug#35238)Basil L. Contovounesios2019-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Input Events): Specify that events are non-nil and remove vestiges of bug#10190. * doc/lispref/os.texi (Recording Input): Document optional argument of recent-keys. * lisp/subr.el (eventp): Check that the car of conses is non-nil. * etc/NEWS: Announce it as an incompatible change. * src/keyboard.c (Frecent_keys): Clarify that returned "events" are not real events.
* | | | | Fix 'load-average' on MS-WindowsEli Zaretskii2019-05-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (getloadavg): Always return at least one element of the array.
* | | | | Make combine-after-change-calls work in the common case againStefan Monnier2019-05-061-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | * src/insdel.c (signal_after_change): Allow combine_after_change_calls even when syntax-ppss-flush-cache is on before-change-functions.
* | | | | * lisp/custom.el: Avoid adding vars to load-history multiple timesStefan Monnier2019-05-061-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the abuse of (eval `(defvar ...)) which tends to end up adding redundant entries in `load-history`, as discussed in https://lists.gnu.org/r/help-gnu-emacs/2019-03/msg00237.html (custom-initialize-default): Don't add to load-history. (custom-declare-variable): Use internal--define-uninitialized-variable and only add the var to load-history once. Do it before calling `initialize` so the special-variable-p flag is set. * src/eval.c (Finternal__define_uninitialized_variable): New function. (Fdefvar, Fdefconst): Use it. (syms_of_eval): Defsubr' it.
* | | | | Use simpler way to print function pointersPaul Eggert2019-05-052-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The module code can’t possibly work on weird platforms where function pointers are wider than data pointers, so there’s no need to bother with the stackoverflow-like approach that is intended only for portability to such platforms. Besides, the stackoverflow-like approach does not work well on weird platforms where CHAR_BIT is not a multiple of 4. * src/lisp.h (pMx): New macro. * src/print.c (data_from_funcptr) [HAVE_MODULES]: New function. (print_vectorlike) [HAVE_MODULES]: Use it. (print_object): Make sure buf is big enough for this.
* | | | | Fixed fill-column-indicator face removing background.Jimmy Aguilar Mena2019-05-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *lisp/faces.el: Removed background in default fill-column-indicator face. *src/xdisp.c: fill-column-indicator face merged with saved face.
* | | | | ;Corrected display-fill-column-indicator mode.Jimmy Aguilar Mena2019-05-051-45/+48
| | | | | | | | | | | | | | | | | | | | Small corrections in the documentation and code format to merge into master.
* | | | | *src/xdisp.c: Fixed fill column indicator position in terminal mode.Jimmy Aguilar Mena2019-05-051-2/+2
| | | | |
* | | | | display-fill-column-indicator interface correctionsJimmy Aguilar Mena2019-05-051-26/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *lisp/display-fill-column-indicator.el: Fixed character selection for the indicator based in the current faces. Extended condition to set display-fill-column-indicator-character in graphical displays. *src/xdisp.c: Fixed some long lines.
* | | | | ;Small changes in the documentationJimmy Aguilar Mena2019-05-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *src/xdisp.c: Fixed docstring for display-fill-column-indicator-column *etc/NEWS: Concordance fix in the display-fill-column-indicator part. *doc/emacs/display.texi: Name mismatch fix.
* | | | | Fixed fill-column-indicator for continuation linesJimmy Aguilar Mena2019-05-051-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *src/xdisp.c: Grouped the test conditions for display-fill-column-indicator mode in a macro to simplify future modifications.
* | | | | Display-fill-column-indicator NEWS info.Jimmy Aguilar Mena2019-05-051-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | | *etc/NEWS: Added information about the fill-column-indicator mode. *lisp/faces.el: Added a face for the display fill column indicator.
* | | | | Start display-fill-column-indicator-mode.Jimmy Aguilar Mena2019-05-051-9/+170
| | | | |
* | | | | Avoid compiler warning in print.cEli Zaretskii2019-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/print.c (print_vectorlike): Don't use %hh, as that is not portable enough; we don't yet assume a C99-compliant library.
* | | | | Avoid crashes in read_integerEli Zaretskii2019-05-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (read_integer): Always allocate a buffer, since we need to use it even when the radix is invalid. (Bug#35576)
* | | | | Avoid suppressing -Wcast-function-type warning.Philipp Stephani2019-05-052-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC special-cases the type ‘void (*)(void)’ to not emit warnings when cast, see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type. Make use of this to remove a warning suppression. * src/dynlib.h: Use void (*)(void) as generic function pointer type. * src/emacs-module.c: Remove warning suppression.
* | | | | Refactoring: Factor out a function to set an mpz_t from a Lisp int.Philipp Stephani2019-05-042-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/bignum.h (mpz_set_integer): New function. * src/emacs-module.c (module_make_big_integer): Use it.
* | | | | Avoid undefined behavior when printing function pointers.Philipp Stephani2019-05-041-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/print.c (print_vectorlike): Don’t pass a function pointer to ‘snprintf’, as that is undefined behavior. Instead, print the individual bytes making up the function pointer.
* | | | | Fix bytecode optimization typoPaul Eggert2019-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Simon Frankau (Bug#35562). * src/bytecode.c (exec_byte_code): Fix typo when optimizing varset.
* | | | | Minor fix in .gdbinitEli Zaretskii2019-05-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/.gdbinit (xprintsym): Don't attempt to print the symbol's name if it is not yet set. This happens with built-in symbols at the beginning of 'main'.
* | | | | ; * src/minibuf.c (Fread_buffer): Doc fix. (Bug#35361)Eli Zaretskii2019-05-041-1/+2
| | | | |
* | | | | ; * src/xfaces.c (merge_face_ref): Improve commentary.Eli Zaretskii2019-05-041-8/+10
| | | | |
* | | | | Pacify librsvg 2.45.1 and laterPaul Eggert2019-05-031-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (svg_load_image): Pacify librsvg 2.45.1 and later, and add a FIXME comment about the deprecated librsvg functions.
* | | | | Simplify xd_signature to pacify GCC 9Paul Eggert2019-05-031-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * src/dbusbind.c (xd_signature): Use simpler way to set up the subsignature. This also pacifies GCC 9 on Fedora 30 x86-64.
* | | | | Refactor update_window_begin and update_window_end hooksAlexander Gramiak2019-05-026-243/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#35464. * src/dispnew.c (gui_update_window_begin, gui_update_window_end): New procedures implementing common functionality. * src/nsterm.m: (ns_update_window_begin, ns_update_window_end): * src/xterm.c: (x_update_window_begin, x_update_window_end): Remove in favor of only using the new generic versions. * src/w32term.c: (w32_update_window_begin, w32_update_window_end): Remove duplicated and unused code.
* | | | | Fix decode-time/encode-time roundtrip on macOSPaul Eggert2019-04-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/timefns.c (Fencode_time): Ignore DST flag when the zone is numeric or is a cons, as the doc string says it’s ignored in that case, and not ignoring it causes encode-time to not invert decode-time on some platforms (Bug#35502). * test/src/timefns-tests.el (encode-time-dst-numeric-zone): New test.
* | | | | Disable __attribute__ ((cold)) on MinGWPaul Eggert2019-04-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * src/conf_post.h (ATTRIBUTE_COLD) [__MINGW32__]: Define to empty on this platform.
* | | | | Merge from origin/emacs-26Glenn Morris2019-04-292-2/+4
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c26d452 (origin/emacs-26) * src/macfont.m (macfont_shape): Use conven... 140e7f8 Recommend using font-lock-face over face (Bug#35044) 7cb5364 Check if mouse_face_overlay was deleted (Bug#35273) # Conflicts: # src/macfont.m
| * | | | * src/macfont.m (macfont_shape): Use convenient LGLYPH_NEW.YAMAMOTO Mitsuharu2019-04-291-1/+1
| | | | |
| * | | | Check if mouse_face_overlay was deleted (Bug#35273)Noam Postavsky2019-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (note_mouse_highlight): Check if the mouse_face_overlay actually points to a buffer, before calling mouse_face_overlay_overlaps on it.
| * | | | Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)Noam Postavsky2019-04-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than AC_SEARCH_LIBS. * src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure, instead of just LIBLCMS2. (cherry picked from commit cb3863370cbe574810f796726faa39ba0de0a429)
* | | | | Replace ‘/* FALLTHROUGH! */’ with ‘break;’Paul Eggert2019-04-291-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (set_internal, set_default_internal): Replace obsolescent /* FALLTHROUGH! */ comments with ‘break;’, as ‘FALLTHROUGH;’ is not needed here.
* | | | | Avoid compilation warnings in w32.cEli Zaretskii2019-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (unsetenv, readlink): Use memcpy instead of strncpy, to avoid a compiler warning about calculating the bound of the copy.
* | | | | Update from GMPPaul Eggert2019-04-282-227/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/update-copyright (updatable_files): Don’t update copyright year on files copied from GMP, so that they’re identical to upstream. * src/mini-gmp.c, src/mini-gmp.h: Copy from GMP development versions as of 2019-01-01 20:15:39 UTC.
* | | | | Export major version of latest Emacs supported by emacs-module.h.Philipp Stephani2019-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful if module authors want to support multiple versions of emacs-module.h. * configure.ac (emacs_major_version): Define substitution. * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro. * doc/lispref/internals.texi (Module Initialization): Document EMACS_MAJOR_VERSION preprocessor macro. * test/data/emacs-module/mod-test.c (emacs_module_init): Verify behavior of EMACS_MAJOR_VERSION.