1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

129203 Commits

Author SHA1 Message Date
Glenn Morris
4ce6e94c99 Add oldxmenu to system-configuration-features
* configure.ac (HAVE_OLDXMENU): New.
(emacs_config_features): Add oldxmenu.
2017-05-15 20:56:46 -04:00
Ted Zlatanov
e782761a7d
* .gitlab-ci.yml: Adjust disclaimer as per RMS. 2017-05-15 16:06:08 -04:00
Eli Zaretskii
3241c84fd8 Remove unneeded stuff from nt/inc/sys/time.h
* nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset)
(timercmp, timerclear): Don't define.  Instead, include the system
header sys/time.h, and add only the interval timers stuff.  This
avoids compiler warnings about 'gettimeofday's prototype, and also
avoids redefinition of macros from system headers.
2017-05-15 22:45:57 +03:00
Paul Eggert
d23a486ba2 Fix address violation found by AddressSanitizer
* src/process.c (connect_network_socket):
Use struct sockaddr_storage, not struct sockaddr_in, to store info
about a socket address.  Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00314.html
This fix is based on a patch by Philipp in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00357.html
2017-05-14 18:48:59 -07:00
Gemini Lasswell
e6f64df9c2 Make edebug-step-in work on generic methods (Bug#22294)
* lisp/emacs-lisp/edebug.el (edebug-match-cl-generic-method-args):
New function to implement the edebug-form-spec property of
the symbol cl-generic-method-args.
(edebug-instrument-function): If the function is a generic
function, find and instrument all of its methods. Return a list
instead of a single symbol.
(edebug-instrument-callee): Now returns a list. Update docstring.
(edebug-step-in): Handle the list returned by edebug-instrument-callee.
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use name and
cl-generic-method-args in its Edebug spec.
* lisp/emacs-lisp/eieio-compat.el (defmethod): Use name and
cl-generic-method-args in its Edebug spec.
* lisp/subr.el (method-files): New function.
* test/lisp/subr-tests.el (subr-tests--method-files--finds-methods)
(subr-tests--method-files--nonexistent-methods): New tests.
2017-05-14 23:32:27 +03:00
Paul Eggert
10037e4be2 Merge from gnulib
This incorporates:
2017-05-14 same-inode: Adapt for windows-stat-inodes
2017-05-14 windows-stat-inodes: New module
2017-05-14 stat-time: Adapt for windows-stat-timespec
* lib/gnulib.mk.in: Regenerate.
* lib/stat-time.h, lib/sys_types.in.h, m4/sys_types_h.m4:
Copy from gnulib.
2017-05-14 12:40:03 -07:00
Eli Zaretskii
792ffa0223 Remove gettimeofday from w32 sources
* lib-src/ntlib.c (gettimeofday):
* nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
function 'gettimeofday' and all of its supporting code.
2017-05-14 19:02:50 +03:00
Eli Zaretskii
3af6909f32 Fix the MS-Windows build
* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.
2017-05-14 17:53:39 +03:00
Paul Eggert
4132bd74e9 Merge from gnulib
This incorporates:
2017-05-13 largefile: Simplify
2017-05-13 largefile: Improve and document
2017-05-13 truncate: New module
2017-05-13 windows-stat-timespec: New module
2017-05-13 windows-stat-override: New module
2017-05-11 getopt-posix: port to mingw
2017-05-11 gettimeofday: Increase precision on mingw
2017-05-10 time: Fix missing initialization of HAVE_TIMEZONE_T
2017-05-10 Implement a way to opt out from MSVC support
2017-05-09 tzset: Expand comment about TZ problem on native Windows
* build-aux/config.guess, lib/dup2.c, lib/fcntl.c, lib/fsync.c:
* lib/getdtablesize.c, lib/getopt.c, lib/gettimeofday.c:
* lib/mktime.c, lib/stat-time.h, lib/sys_stat.in.h, lib/unistd.in.h:
* lib/utimens.c, m4/gettimeofday.m4, m4/largefile.m4:
* m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/time_h.m4, m4/time_rz.m4:
* m4/unistd_h.m4: Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-05-14 01:29:29 -07:00
Marcin Borkowski
9a5e864de7 Merge branch 'fix/bug-21072' 2017-05-14 07:09:54 +02:00
Ted Zlatanov
91ccb2661e
* .gitlab-ci.yml: Add setup for GitLab CI builds. 2017-05-13 22:20:08 -04:00
Mark Oteiza
4e08875567 ; Revert "Adjust the edebug spec of if-let*"
This reverts commit fd4b83ca7c.
2017-05-13 21:40:23 -04:00
Tak Kunihiro
78fe5abc11 New minor mode 'pixel-scroll-mode'
* lisp/pixel-scroll.el: New file.

* etc/NEWS: Mention pixel-scroll-mode.
2017-05-13 20:25:39 +03:00
Philipp
a1d4615921 Make `old-style-backquotes' variable internal
* src/lread.c (load_warn_old_style_backquotes, Fload, read1)
(syms_of_lread): Rename `old-style-backquotes' to
`lread--old-style-backquotes', and clarify that it's for internal
use only.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
variable.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
unit test.
* emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Add unit test.
2017-05-13 12:32:29 +02:00
Philipp Stephani
16004397f4 Improve unescaped character literal warnings
* src/lread.c (load_warn_unescaped_character_literals)
(syms_of_lread):
lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve
formatting of unescaped character literal warnings.

* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Adapt unit tests.
2017-05-13 12:28:48 +02:00
Alan Mackenzie
0e09d00f29 Fontify C++ for loop variable as variable, even when followed by parentheses
In the following: "for (auto *Friend : Class->friends()) {", "Friend" was
getting fontified as a function, due to insufficient checking of the tokens
between it and "()".

* lisp/progmodes/cc-langs.el (c-:-op-cont-tokens, c-:-op-cont-regexp): New
lang-consts/vars.

* lisp/progmodes/cc-engine.el (c-forward-declarator): After finding a putative
declarator's identifier, check for a ":" token inside a for's parentheses, and
abort the search for "(" if this is found.
2017-05-12 21:11:49 +00:00
Michael Albinus
afd8c762b7 Make Tramp backward compatible
* lisp/net/tramp-cmds.el (tramp-change-syntax):
Set tramp-autoload cookie.

* lisp/net/tramp-compat.el: Run `tramp-change-syntax' at
startup, if necessary.

* lisp/net/tramp.el (tramp-syntax): Use `tramp-compat-user-error'.
(tramp-register-autoload-file-name-handlers): Do not mark
`operations' for `tramp-file-name-handler'.
(tramp-register-file-name-handlers): Remove also
`tramp-autoload-file-name-handler' for backward compatibility.
(tramp-register-foreign-file-name-handler): Use `delete-dups'.

* test/lisp/net/tramp-tests.el (tramp-change-syntax): Declare.
2017-05-12 18:36:41 +02:00
Noam Postavsky
aa779b0f15 Modify `beginning-of-defun-comments'
* lisp/emacs-lisp/lisp.el (beginning-of-defun-comments): Try not to stop
in the middle of a multiline comment.
2017-05-12 11:40:57 +02:00
Noam Postavsky
cb8fcbc3cb Fix elisp-tests-with-temp-buffer compilation
* test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer):
Don't refer to the =!NAME= as "markers" since they produce variables
with just plain positions, not marker objects.  Explicitly specify
that CONTENTS is evaluated at compile time.  Don't re-evaluate
CONTENTS at runtime.  Fix debug specification.  Suppress warnings due
to BODY not using =!NAME= variables.
(elisp-test-point-position-regex): Rename from
`elisp-test-point-marker-regex'.
(mark-defun-test-buffer): Wrap in `eval-and-compile'.
2017-05-12 11:40:48 +02:00
Noam Postavsky
0397f85c6f * lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point. 2017-05-12 11:36:45 +02:00
Marcin Borkowski
22fc91704b Fix Bug#21072 and rework `mark-defun'
* test/lisp/progmodes/elisp-mode-tests.el (mark-defun-test-buffer):
  New variable
(mark-defun-no-arg-region-inactive)
(mark-defun-no-arg-region-active)
(mark-defun-arg-region-active)
(mark-defun-pos-arg-region-inactive)
(mark-defun-neg-arg-region-inactive, mark-defun-bob): Add tests for
the new `mark-defun'.

* lisp/emacs-lisp/lisp.el (beginning-of-defun--in-emptyish-line-p):
  New function.
(beginning-of-defun-comments): New function.
(mark-defun): Fix bug#21072, also rewrite large parts of `mark-defun'
to accept a numerical prefix argument.
2017-05-12 11:36:27 +02:00
Alfred M. Szmidt
e5c71dcaf7 * lisp/mail/rmail.el (rmail-ignored-headers): Add 3 headers to ignore.
Copyright-paperwork-exempt: yes.
2017-05-12 11:44:07 +03:00
Eli Zaretskii
27cef30c2b Improve doc strings in net-utils.el
* lisp/net/net-utils.el (ifconfig, iwconfig, netstat, arp)
(route, traceroute, nslookup, ftp, smbclient)
(smbclient-list-shares, finger, whois)
(network-connection-to-service, network-service-connection)
(network-connection-reconnect): Improve doc strings.
2017-05-12 11:38:04 +03:00
Andrew Robbins
a1b6981514 Extend DNS lookup commands to allow specifying the name server
* lisp/net/net-utils.el (ffap-string-at-point): Removed due to
'net-utils-machine-at-point' obviating this autoloaded
function (Bug#25426).
(dig-program-options): New customization variable.
(nslookup-host, dns-lookup-host, run-dig): Can now specify
optional name server argument interactively (by prefix arg) and
non-interactively.

* etc/NEWS: Mention the extension of DNS lookup commands.
2017-05-12 11:19:46 +03:00
Glenn Morris
d9592104c8 Don't hard-code loaddefs files in lisp/Makefile
* lisp/Makefile.in (loaddefs): New variable.
(AUTOGENEL): Use $loaddefs, and include directory.
(bootstrap-clean): Update for AUTOGENEL change.
2017-05-11 21:22:13 -04:00
Katsumi Yamaoka
4b35dd653d Kill modified buffers silently when quitting (bug#26862)
* lisp/gnus/gnus-start.el (gnus-clear-system): Run do-auto-save to make
sure that latest drafts are saved, and kill modified buffers silently.
2017-05-11 05:49:45 +00:00
Perry E. Metzger
7df0777945 Implement 1-based column numbering in mode line
* src/xdisp.c (decode_mode_spec): Implement the %C construct.

* lisp/bindings.el (column-number-indicator-zero-based): New
defcustom.
(mode-line-position): Use %C when
column-number-indicator-zero-based is nil.

* src/xdisp.c (syms_of_xdisp) <frame-title-format>:
* src/buffer.c (syms_of_buffer) <mode-line-format>:
* doc/lispref/modes.texi (%-Constructs):
* doc/lispref/frames.texi (Frame Titles): Document the %C
construct.

* doc/emacs/display.texi (Optional Mode Line): Document
'column-number-indicator-zero-based'.

* etc/NEWS: Mention 'column-number-indicator-zero-based' and the
%C construct.
2017-05-10 20:57:21 +03:00
Eli Zaretskii
e124e07fae Ensure cursor's foreground color is in sync with 'default' face
* src/w32term.c (x_set_cursor_gc): Don't reuse cursor GC if its
foreground color is different from the background of the glyph
string's face.  (Bug#26851)
2017-05-10 20:06:15 +03:00
Eli Zaretskii
de53dfcea3 Fix vertical cursor motion when columns are of unequal size
* lisp/simple.el (line-move-finish): In line-move-visual mode, use
vertical-motion to move to the goal column, as the goal column
should in that case be interpreted in units of frame's canonical
character width.  (Bug#26852)
2017-05-10 19:58:06 +03:00
Glenn Morris
48e6e9a939 Fix finding test .el files
* test/Makefile.in (ELFILES): Exclude the data/ directory.
* test/src/lread-tests.el (lread-test-bug26837): Revert previous.
2017-05-09 23:20:52 -07:00
Tino Calancha
4f391b9d6d Tweak a recent test
This test fails in my local machine because the data files
are compiled, and the test doesn't expect that.
* test/src/lread-tests.el (lread-test-bug26837): Match a suffix
ending with '.elc' when the data files are compiled.
2017-05-10 11:53:20 +09:00
Glenn Morris
8452db0409 Put license information in each generated uni-*.el
* admin/unidata/unidata-gen.el (unidata-gen-file):
Get Copyright line from copyright.html.
Put information in file header, not separate README.
(unidata-gen-charprop): Mention the source location.
* lisp/international/README: Remove file.
2017-05-09 21:31:46 -04:00
Noam Postavsky
e7b6751c0a Fix lisp-indent-region and indent-sexp (Bug#26619)
The new lisp-indent-region introduced in 2017-04-22 "Add new
`lisp-indent-region' that doesn't reparse the code." is broken because
it doesn't save the calculated indent amounts for already seen sexp
depths.  Fix this by unifying the indent-sexp and lisp-indent-region
code.  Furthermore, only preserve position 2 of the running parse
when the depth doesn't change.
* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): Use an OLDSTATE that
corresponds with the start point when calling parse-partial-sexp.
(lisp-indent-state): New struct.
(lisp-indent-calc-next): New function, extracted from indent-sexp.
(indent-sexp, lisp-indent-region): Use it.
(lisp-indent-line): Take indentation, instead of parse state.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-mode-tests--correctly-indented-sexp): New constant.
(lisp-indent-region, lisp-indent-region-defun-with-docstring):
(lisp-indent-region-open-paren, lisp-indent-region-in-sexp): New
tests.
2017-05-09 20:50:19 -04:00
Dmitry Gutov
17e540aa42 Simplify url-encode-url and add a test
* lisp/url/url-util.el (url-encode-url): Simplify.
url-generic-parse-url copes with multibyte strings just fine
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24117#185).

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/multibyte-host-and-path): New test.
2017-05-10 03:34:58 +03:00
Glenn Morris
58326f0f11 More informative error when required feature missing
* src/fns.c (Frequire): Include file name in missing feature error.
* doc/lispref/loading.texi (Named Features): Don't quote actual error.
2017-05-09 19:47:16 -04:00
Glenn Morris
db30296bae Put re-loaded file back at start of load-history (bug#26837)
* src/lread.c (readevalloop): Fix the "whole buffer" check to
operate in the correct buffer.
(Feval_buffer): Move point back to the start after checking
for lexical binding.
* test/src/lread-tests.el (lread-test-bug26837): New test.
* test/data/somelib.el, test/data/somelib2.el: New test data files.
2017-05-09 19:44:09 -04:00
Glenn Morris
d6d5020c25 Don't duplicate autoload code in package.el
* lisp/emacs-lisp/autoload.el (autoload-rubric): Add a package option.
* lisp/emacs-lisp/package.el (autoload-rubric): Declare.
(package-autoload-ensure-default-file): Use autoload-rubric.
2017-05-09 13:03:04 -04:00
Michael Albinus
4c08509b3a * test/lisp/net/tramp-tests.el: Keep additional test. 2017-05-09 14:35:56 +02:00
Marcin Borkowski
6d58dda40a Add elisp-tests-with-temp-buffer, a new testing macro
* test/lisp/emacs-lisp/lisp-tests.el
(elisp-test-point-marker-regex) New variable.
(elisp-tests-with-temp-buffer): New macro to help test functions
moving the point and/or mark.
2017-05-09 14:26:08 +02:00
Noam Postavsky
daaec72a82 Revert "Output number of characters added to file (Bug#354)"
The extra message text turned out to be quite annoying in practice,
and is generally more trouble than it's worth.  Also revert several
related changes.

Partially revert "Handle `write-region' messages in Tramp properly"
Revert "New var write-region-verbose, default nil"
Revert "* src/fileio.c (write_region): Don't say "1 characters".  (Bug#26796)"
Revert "Minor tuneup of write-region change"
Revert "Adjust write-region so file name is at the beginning again"
Revert "Fix handling of non-integer START param to write-region"
Revert "Output number of characters added to file (Bug#354)"

* doc/emacs/files.texi (Misc File Ops):
* etc/NEWS:
* lisp/epa-file.el (epa-file-write-region):
* lisp/gnus/mm-util.el (mm-append-to-file):
* lisp/jka-compr.el (jka-compr-write-region):
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp.el (tramp-handle-write-region-message):
* src/fileio.c (write_region, syms_of_fileio):
* test/lisp/net/tramp-tests.el (tramp-test10-write-region): Remove
extra characters from file writing messages.
2017-05-08 23:28:32 -04:00
Ken Brown
5e2cf8c804 Skip a test from filenotify-tests.el on Cygwin
* test/lisp/filenotify-tests.el (file-notify-test02-rm-watch):
Skip the last part of the test on Cygwin; it fails due to timing
issues.
(file-notify--test-read-event):  Remove `sit-for' that was added
for Cygwin.
2017-05-08 15:11:23 -04:00
Paul Eggert
7ff7624a7a Merge from gnulib
This incorporates:
2017-05-08 intprops: don’t depend on ‘verify’
2017-05-07 utimens: on native Windows, improve resolution if fd < 0
2017-05-07 utimens: Improve error code on native Windows
* lib/intprops.h, lib/utimens.c: Copy from gnulib.
2017-05-08 10:49:12 -07:00
Wilson Snyder
e93f39d2e6 Fix various verilog-mode.el issues.
* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix SystemVerilog
2012 import breaking AUTOINST.  Reported by Johannes Schaefer.
(verilog-auto-wire-type, verilog-insert-definition): Fix AUTOWIRE using
logic in top-level non-SystemVerilog module, bug1142.  Reported by Marcin K.
(verilog-define-abbrev-table) (verilog-mode-abbrev-table): Don't expand
abbrev inside comment/strings, bug1102. Reported by Slava Yuzhaninov.
(verilog-auto): Fix AUTORESET widths pulling from AUTOREGINPUT,
msg2143. Reported by Galen Seitz.
(verilog-modify-compile-command): Fix expansion of __FLAGS__ when
compile-command is globally set, bug1119.  Reported by Galen Seitz.
2017-05-08 13:44:47 -04:00
Michael Albinus
73e3ed48e2 Handle `write-region' messages in Tramp properly
* lisp/net/tramp.el (tramp-handle-write-region-message): New defsubst.
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use it.

* lisp/net/tramp.el (tramp-password-prompt-regexp)
(tramp-completion-mode-p):
* lisp/net/tramp-cmds.el (tramp-reporter-dump-variable)
(tramp-append-tramp-buffers):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
Use `bound-and-true-p'.

* lisp/net/tramp-compat.el (tramp-compat-delete-file):
Don't check for `boundp' anymore.

* test/lisp/net/tramp-tests.el (ert-x): Require it.
(tramp--test-messages): New defvar.
(tramp-test10-write-region): Extend test.
2017-05-08 17:27:50 +02:00
YAMAMOTO Mitsuharu
52f7440b8e Fix glyph string generation for multi-font compositions (Bug#26742)
* src/xdisp.c (glyph_string_containing_background_width): New function.
(draw_glyphs): Use it to get correct background width.
(compute_overhangs_and_x): Don't change x in the middle of composite
characters.
2017-05-08 08:20:53 +09:00
Philipp Stephani
3c4c8ca06e Fix all unescaped character literals 2017-05-07 13:22:34 +02:00
Alan Mackenzie
bcbd8f7e4e CC Mode internal cache: Handle a cache pos being inside a two-char construct.
Cache c-state-semi-nonlit-pos-cache was failing when a cache position was,
e.g., between the two characters of an opening comment "/*", and additionally
there were an odd number of quote marks (apostrophes) in the comment.  This
happened in .../src/xdisp.c in the Emacs master branch around 2017-05-02 at
buffer position 615001.

* lisp/progmodes/cc-defs.el (c-emacs-features): Repurpose symbol
pps-extended-state to mean that there are at least 11 elements in the parser
state.

* lisp/progmodes/cc-engine.el (c-cache-to-parse-ps-state)
(c-parse-ps-state-to-cache): Rewrite these to use enhanced cache element list
types which indicate potentially being inside two-char constructs.
(c-parse-ps-state-below): Rewrite to use the new versions of the above two
functions.
2017-05-07 09:27:00 +00:00
Glenn Morris
55b07d3379 ; Update contributor name
; Ref http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00114.html
2017-05-06 18:38:18 -07:00
Paul Eggert
723b16a875 ; Spelling fixes 2017-05-06 18:30:14 -07:00
Glenn Morris
09d750fcb6 Silence an mh-compat compiler warning
* lisp/mh-e/mh-compat.el (mh-url-unreserved-chars): Always define.
2017-05-06 18:21:04 -07:00