summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add tests for ring.elSimen Heggestøyl2016-09-081-0/+204
| | | | * test/lisp/emacs-lisp/ring-tests.el: New file with tests for ring.el.
* New file test/src/marker-tests.elMartin Rudalics2016-09-081-0/+60
|
* Port flexible array members to GCC + valgrindPaul Eggert2016-09-075-32/+26
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update from gnulibPaul Eggert2016-09-079-11/+75
| | | | | | | | | | | | | | | | This incorporates: 2016-09-07 flexmember: new macro FLEXALIGNOF 2016-09-07 flexmember: port better to GCC + valgrind 2016-08-18 Port modules to use getprogname explicitly 2016-09-02 manywarnings: add -fno-common * admin/merge-gnulib (GNULIB_TOOL_FLAGS): Don’t avoid flexmember, since time_rz now uses part of it. Instead, remove m4/flexmember.m4. * configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Define away, since Emacs assumes C99 and therefore removes m4/flexmember.m4. * lib/euidaccess.c, lib/group-member.c, lib/time_rz.c: * m4/manywarnings.m4: Copy from gnulib. * lib/flexmember.h: New file, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* Don't --load directoriesNoam Postavsky2016-09-071-1/+1
| | | | | | * lisp/startup.el (command-line-1): Only pass expanded FILENAME argument of --load when it refers to a normal file, since `load' doesn't handle directories (Bug #16406).
* Avoid error in icalendar--read-elementPeder O. Klingenberg2016-09-071-3/+5
| | | | | | * lisp/calendar/icalendar.el (icalendar--read-element): Avoid a regex stack overflow by not using regex to extract values from calendar events. (Bug#24315)
* Fix back-white <-> black-white typoKaushal Modi2016-09-071-4/+4
| | | | * lisp/ps-print.el (ps-begin-job): back-white -> black-white (Bug#24308)
* Fix cursor at bottom left of rectangle (bug#24364)Alan Third2016-09-071-1/+1
| | | | | * lisp/rect.el (rectangle--col-pos): Don't assume point at EOL doesn't require rectangle--point-crutches to be set.
* Fix documentation of convert-standard-filename on MS-WindowsEli Zaretskii2016-09-072-4/+11
| | | | | | | * lisp/files.el (convert-standard-filename): Doc fix. (Bug#24387) * etc/NEWS: Suggest a way for mirroring slashes where previously 'convert-standard-filename' was used.
* 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)
* * lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): Fix coding bugAlan Mackenzie2016-09-061-5/+6
|
* New options for handling of literals in c-syntactic-re-search-forwardAlan Mackenzie2016-09-061-3/+21
| | | | | | | * lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): `noerror' can be given the values `before-literal' and `after-literal', so that when a search fails, and the `bound' is inside a literal, point is left respectively before or after that literal.
* 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-055-6/+19
| | | | | | | | | | | | * 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.
* image-dired: Report when a necessary executable is not foundTino Calancha2016-09-041-36/+56
| | | | | | | | | | | | | | | | | | | | | | | See discussion on: https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00552.html * lisp/image-dired.el (image-dired-cmd-rotate-original-program) (image-dired-cmd-create-thumbnail-program) (image-dired-cmd-create-temp-image-program) (image-dired-cmd-rotate-thumbnail-program) (image-dired-cmd-write-exif-data-program) (image-dired-cmd-read-exif-data-program): Use executable-find to set the defaut value of this option. (image-dired-cmd-rotate-original-program): Idem. Search for program 'convert' if 'jpegtran' is not available. (image-dired-cmd-rotate-original-options): Set the default value consistent with the executable in image-dired-cmd-rotate-original-program. (image-dired-create-thumb, image-dired-display-image) (image-dired-rotate-thumbnail, image-dired-rotate-original) (image-dired-set-exif-data, image-dired-get-exif-data): Throw and error when the executable used in the function is missing. (image-dired-next-line, image-dired-previous-line): Use 'forward-line'.
* image-type-from-file-name: Perform a case insensitive matchTino Calancha2016-09-042-11/+10
| | | | | | | | | | | Fix Bug#24317 * lisp/image.el (image-type-from-file-name): Bind case-fold-search to a non-nil value to force a case insensitive match. * lisp/image-dired.el (image-dired-rotate-original): Use image-type (Bug#24317). (image-dired-get-exif-file-name): Idem. Set 'no-exif-data-found' and 'data' in same setq call. Use file-attribute-modification-time.
* image-increase-size: Fix non-interactive callsTino Calancha2016-09-041-2/+2
| | | | | | | * lisp/image.el (image-increase-size, image-decrease-size): Compute a floating point division. Problem reported in: https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00067.html
* Fix uses of (call-interactively) in lisp/emacs-lisp/checkdoc.elRobert Cochran2016-09-031-8/+8
| | | | | | | | | | | | | | | | | | | | Passing the prefix argument as the 3rd argument to 'call-interactively' causes the prefix argument to be interpreted as events, which is not only wrong, but also causes a type error, as 'current-prefix-arg' can never be a vector as 'call-interactively' expects. 'call-interactively' automatically passes its prefix argument to the called function, so just do that, eliminating faulty behavior. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell): (checkdoc-ispell-current-buffer): (checkdoc-ispell-interactive): (checkdoc-ispell-message-text): (checkdoc-ispell-start): (checkdoc-ispell-continue): (checkdoc-ispell-comments): (checkdoc-ispell-defun): Do not pass 'current-prefix-arg' to 'call-interactively' as an event vector; merely allow it to propagate forward to the interactive call.
* Fix mail-combine-fieldsRichard Stallman2016-09-031-4/+5
| | | | | * lisp/mail/sendmail.el (mail-combine-fields): Call `save-excursion' to avoid losing our place in the search loop.
* Check actual contents before promting about changed fileStefan Monnier2016-09-024-3/+43
| | | | | | | | * 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.
* Make a reference to fakecygpty in the Tramp manualMichael Albinus2016-09-021-2/+8
| | | | | | * doc/misc/tramp.texi (Windows setup hints): Make a reference to fakecygpty on the Emacs Wiki. (Frequently Asked Questions): Fix url.
* 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 c-declaration-limits to return correct limits in all cases.Alan Mackenzie2016-09-011-112/+140
| | | | | | | | | | | | | | | This function is the guts of c-indent-defun and c-mark-function. In particular, when c-defun-tactic is nil, return a correct value rather than always nil, and when it's 'go-outward, go through an intricate algorithm to determine the requisite narrowing before the "top-level" defuns go to work. * lisp/progmodes/cc-cmds.el (c-narrow-to-most-enclosing-decl-block): Enhance to take additional optional parameter LEVEL, saying how many enclosing levels of decl-block to narrow to. (c-declaration-limits): Introduce algorithm to determine narrowing. Use c-where-wrt-to-brace-block to determine whether to go back to BOD to determine lower bound.
* * nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate.Eli Zaretskii2016-09-011-5/+6
|
* Avoid compiler warnings with MinGW64 GCC 6Eli Zaretskii2016-09-011-0/+9
| | | | | | * nt/inc/ms-w32.h (execve) [MINGW_W64]: Make the prototype match the GCC 6 builtin, to avoid warnings. For more details, see http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00721.html.
* ; Auto-commit of loaddefs files.Glenn Morris2016-09-011-284/+222
|
* 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.
* Improve testing of etagsEli Zaretskii2016-08-319-1070/+88
| | | | | | | | | | | | | * test/manual/etags/y-src/cccp.c: * test/manual/etags/y-src/parse.c: Correct #line directives to allow testing invalidate_nodes in etags.c. * test/manual/etags/ETAGS.good_1: * test/manual/etags/ETAGS.good_2: * test/manual/etags/ETAGS.good_3: * test/manual/etags/ETAGS.good_4: * test/manual/etags/ETAGS.good_5: * test/manual/etags/ETAGS.good_6: * test/manual/etags/CTAGS.good: Adapt to changes in test files.
* * lib-src/etags.c (invalidate_nodes): Fix another thinko.Eli Zaretskii2016-08-311-1/+1
|
* Fix etags problems found by static checkingPaul Eggert2016-08-311-24/+22
| | | | | | | * lib-src/etags.c (invalidate_nodes, put_entry): Remove now-unnecessary tests for null pointers. Simplify. (put_entries): Rewrite to avoid GCC 6.2 warning about dereferencing null pointer.
* Fix a thinko in etags.cEli Zaretskii2016-08-311-1/+1
| | | | | * lib-src/etags.c (invalidate_nodes): Don't try to dereference a null pointer.
* Avoid recursive calls in etagsEli Zaretskii2016-08-311-64/+226
| | | | | | | * lib-src/etags.c (stack_entry): New struct. (push_node, pop_node, put_entry): New functions. (free_tree, add_node, invalidate_nodes, put_entries): Re-implement in a non-recursive way, to avoid stack overflow. (Bug#5847)
* Add 451 to url-http-codesLeo Liu2016-08-311-0/+1
| | | | * lisp/url/url-http.el (url-http-codes): Add 451.
* ; Spelling and quotation fixesPaul Eggert2016-08-306-20/+20
|
* * src/editfns.c (Fformat_message): Fix doc to match current behavior.Paul Eggert2016-08-301-4/+3
|
* Minor doc quoting fixesPaul Eggert2016-08-305-7/+9
| | | | | | | | | | | | * 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.
* Update from gnulibPaul Eggert2016-08-302-26/+29
| | | | | | | | | | | | This incorporates: 2016-08-30 intprops: tune INT_NEGATE_OVERFLOW for GCC 5 and 6 2016-08-29 xalloc-oversized.h: port change to GCC 6.2.0 2016-08-29 intprops.h: port recent changes to GCC 6.2.0 2016-08-29 intprops.h: use __typeof__ with GCC 7 2016-08-29 intprops.h, xalloc-oversized.h: work with gcc 7 2016-08-24 intprops: fix paren typo on old platforms 2016-08-24 intprops: port to OpenVMS * lib/intprops.h, lib/xalloc-oversized.h: Copy from gnulib.
* Fix rules for \phi and \varphi which were reversedTassilo Horn2016-08-301-4/+14
| | | | | | * lisp/leim/quail/latin-ltx.el: Special-case phi/varphi because those are reversed in ucs-names. Also remove FIXME stating sigma/varsigma were reversed which is not true (anymore?).
* Fix prettification of \phi, \varphi, and \varsigmaTassilo Horn2016-08-301-2/+3
| | | | | | | | | * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Fix prettification of \phi, \varphi, and \varsigma. Concretely, \phi's symbol was actually varphi, \varphi was missing, and \varsigma was commented out with a FIXME that it was reversed with \sigma which it was not.
* Use normal double quotes in TeX / LaTeX commentsKarl Fogel2016-08-303-0/+5
| | | | | | | | | | | | | | | | | | | * lisp/textmodes/tex-mode.el (tex-insert-quote): When in a comment, default to inserting a normal double quote (") instead of TeX-style open (``) or close ('') quote marks. * etc/NEWS (TeX mode): Note the change. * test/lisp/electric-tests.el (autowrapping-7): Adjust accordingly. See this thread for discussion: https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00611.html From: Karl Fogel <kfogel {_AT_} red-bean.com> To: Emacs Development <emacs-devel {_AT_} gnu.org> Subject: [PATCH] Have LaTeX mode use normal double quotes in comments. Date: Mon, 29 Aug 2016 14:44:12 -0500 Message-ID: <87twe3icmr.fsf@red-bean.com>
* Correctly analyze C++ list initialization in member init areas.Alan Mackenzie2016-08-303-148/+140
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/cc-engine.el (c-back-over-list-of-member-inits): Remove a superfluous call to c-backward-syntactic-ws. (c-looking-at-or-maybe-in-bracelist): Change calling convention, so that it reports encountering the Java "new" keyword. Add, as an alternative, a check that we can move back over member initializations, and handle this as finding a brace block. (c-looking-at-special-brace-list, c-guess-continued-construct): Adapt to the new calling convention of c-looking-at-or-maybe-in-bracelist. (c-guess-basic-syntax, CASE 5A.3): Replace lots of inline ad-hoc code with calls to c-backward-over-enum-header and c-looking-at-or-maybe-in-bracelist, using the extra info from the value of that function to generate a topmost-into-cont element where needed (in Java). * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to the new calling convention of c-looking-at-or-maybe-in-bracelist. * lisp/progmodes/cc-mode.el (c-fl-decl-start): Adapt to the new calling convention of c-looking-at-or-maybe-in-bracelist.
* Use `file-attribute-*' in TrampMichael Albinus2016-08-306-74/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
* In `pop-to-buffer' handle case where `display-buffer' fails (Bug#24332)Martin Rudalics2016-08-302-24/+29
| | | | | | | | * lisp/window.el (pop-to-buffer): Don't assume that `display-buffer' has supplied a window (Bug#24332). Rename BUFFER argument to BUFFER-OR-NAME. * doc/lispref/windows.texi (Switching Buffers): Fix `pop-to-buffer' documentation.
* Clarify docstringsAlan Third2016-08-291-7/+14
| | | | * src/nsterm.m: Clarified that ns-x-modifier variables require a symbol.
* Use `process-live-p' in TrampMichael Albinus2016-08-298-48/+55
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-process-live-p): New defun. * lisp/net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p) (tramp-handle-file-notify-valid-p) (tramp-action-process-alive, tramp-action-out-of-band) (tramp-wait-for-regexp): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-get-connection-property): * tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * tramp-sh.el (tramp-process-sentinel) (tramp-sh-handle-file-notify-add-watch) (tramp-maybe-open-connection): * lisp/net/lisp/net/lisp/net/tramp-smb.el (tramp-smb-action-with-tar) (tramp-smb-handle-copy-directory, tramp-smb-action-get-acl) (tramp-smb-handle-process-file, tramp-smb-action-set-acl) (tramp-smb-get-cifs-capabilities) (tramp-smb-get-stat-capability) (tramp-smb-maybe-open-connection, tramp-smb-wait-for-output) (tramp-smb-kill-winexe-function): Use it.
* Avoid crashes for invalid value of key modifiersEli Zaretskii2016-08-292-1/+13
| | | | | | | | | | * 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.