]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoSet x_gtk_use_window_move by default for fixing bug#25851 and bug#25943
Martin Rudalics [Tue, 11 Apr 2017 06:29:41 +0000 (08:29 +0200)]
Set x_gtk_use_window_move by default for fixing bug#25851 and bug#25943

This activates a change that was installed a few weeks ago but whose
ChangeLog was inadvertently dropped during its commit.  The proper
ChangeLog is included below as part of the present commit.

* src/gtkutil.c (xg_set_geometry): When x_gtk_use_window_move
is set avoid calling x_gtk_parse_geometry (Bug#25851).
(x_wm_set_size_hint): When x_gtk_use_window_move is set, set
PPosition, USPosition and USSize flags if requested.
* src/xterm.c (x_set_offset): With GTK when
x_gtk_use_window_move is set, leave it entirely to
gtk_window_move to position the window and skip any
post-adjustments (Bug#25851 and Bug#25943).
(x_gtk_use_window_move): New variable.

7 years agoFix a loop in C Mode caused by inadequate analysis of comments.
Alan Mackenzie [Mon, 10 Apr 2017 21:01:38 +0000 (21:01 +0000)]
Fix a loop in C Mode caused by inadequate analysis of comments.

After M-;, and the insertion of the opening "/*", the CC Mode after-change
function got confused, since the new comment opener matched the end of a
subsequent comment, but moving back over that comment did not come back to the
starting point.  Fix this.

* lisp/progmodes/cc-engine.el (c-end-of-macro): Add a limit parameter, wherer
point is left if no end-of-macro is found before it.
(c-forward-sws): Change the `safe-start' mechanism.  Now `safe-start' is
non-nil except where we have an unclosed block comment at the end of a macro.
This enables us to populate the cache more fully, at the cost of some run
time.

7 years agoAdd PVSIZE function to return the size of a pseudovector.
Lars Brinkhoff [Mon, 3 Apr 2017 06:42:18 +0000 (08:42 +0200)]
Add PVSIZE function to return the size of a pseudovector.

* src/lisp.h (PVSIZE): New function.

* src/chartab.c (copy_char_table):
* src/data.c (Ftype_of, Finteractive_form, Faref, Faset):
* src/doc.c (Fdocumentation, store_function_docstring):
* src/eval.c (Fcommandp, funcall_lambda, lambda_arity, Ffetch_bytecode):
* src/fns.c (Flength, Fcopy_sequence):
* src/font.h (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P):
* src/lread.c (substitute_object_recurse):
* src/src/print.c (print_object):
  Use it.

7 years agoAdd Tramp tests
Michael Albinus [Mon, 10 Apr 2017 15:22:13 +0000 (17:22 +0200)]
Add Tramp tests

* lisp/net/tramp.el (tramp-syntax): Adapt docstring.

* test/lisp/net/tramp-tests.el
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): New tests.

7 years agoMake sure that `shell' makes BUFFER current
Martin Rudalics [Mon, 10 Apr 2017 08:21:44 +0000 (10:21 +0200)]
Make sure that `shell' makes BUFFER current

* lisp/shell.el (shell): Restrict scope of recently added
`with-current-buffer' to make sure that BUFFER is current when
`shell' returns.

7 years ago; Add a FIXME about handing a missing find or grep program
Dmitry Gutov [Mon, 10 Apr 2017 03:22:55 +0000 (06:22 +0300)]
; Add a FIXME about handing a missing find or grep program

7 years agoDefault to PCRE syntax when reading .hgignore
Jim Blandy [Mon, 10 Apr 2017 02:52:09 +0000 (05:52 +0300)]
Default to PCRE syntax when reading .hgignore

* lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1):
Default to the PCRE syntax (bug#26249).

7 years agoDocument Tramp changes
Michael Albinus [Sun, 9 Apr 2017 11:28:24 +0000 (13:28 +0200)]
Document Tramp changes

* doc/misc/tramp.texi (Change file name syntax): New node.

* etc/NEWS: Mention `tramp-change-syntax'.

* lisp/net/tramp.el (tramp-file-name-regexp): Reinsert it.
External packages uses it.
(tramp-syntax): Set also `tramp-file-name-regexp'.

7 years agoMerge from gnulib (Bug#26398)
Paul Eggert [Sun, 9 Apr 2017 07:53:27 +0000 (00:53 -0700)]
Merge from gnulib (Bug#26398)

This incorporates:
2017-04-08 getopt: prefer - to _ in new file names
2017-04-08 getopt: port recent getopt changes to macOS
* .gitignore: Add lib/getopt-cdefs.h.
* lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
* lib/getopt-core.h: Rename from lib/getopt_core.h.
* lib/getopt-ext.h: Rename from lib/getopt_ext.h.
* lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
* lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
* lib/getopt.in.h, lib/unistd.in.h, m4/getopt.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

7 years agoWrite updated loaddefs to a temporary file and rename into place.
Ken Raeburn [Sun, 9 Apr 2017 06:13:43 +0000 (02:13 -0400)]
Write updated loaddefs to a temporary file and rename into place.

In a parallel build, byte compilation can be running at the same times
as loaddefs.el is being regenerated.  However, in a CANNOT_DUMP build,
loaddefs.el is read at startup and must always be in a usable state.

* lisp/Makefile.in ($(lisp)/loaddefs.el): Write generated output to
loaddefs.el.new and then rename it to loaddefs.el.

7 years agoIn the manual, mention pops and imaps
Glenn Morris [Sun, 9 Apr 2017 02:35:38 +0000 (19:35 -0700)]
In the manual, mention pops and imaps

* doc/emacs/rmail.texi (Movemail, Remote Mailboxes):
Mention pops and imaps protocols.

7 years ago* doc/emacs/rmail.texi: Prefer @command to @code for movemail.
Glenn Morris [Sun, 9 Apr 2017 02:24:13 +0000 (19:24 -0700)]
* doc/emacs/rmail.texi: Prefer @command to @code for movemail.

7 years agoFix rmail handling of movemail protocols (bug#18278)
Sergey Poznyakoff [Sun, 9 Apr 2017 01:40:53 +0000 (18:40 -0700)]
Fix rmail handling of movemail protocols (bug#18278)

* lisp/mail/rmail.el (rmail-remote-proto-p): New function.
(rmail-parse-url): Return protocol in second list element.
Only use passwords with remote mailboxes.
(rmail-insert-inbox-text): Handle non-simple local
mailboxes (maildir, MH, etc.).

7 years agoFix typos in manual re movemail local mailboxes
Glenn Morris [Sun, 9 Apr 2017 01:10:10 +0000 (18:10 -0700)]
Fix typos in manual re movemail local mailboxes

* doc/emacs/rmail.texi (Movemail, Other Mailbox Formats):
Fix examples of local mailbox urls.

7 years ago* lisp/gnus/nnmail.el (nnmail-crosspost-link-function): Simplify.
Glenn Morris [Sat, 8 Apr 2017 20:45:55 +0000 (13:45 -0700)]
* lisp/gnus/nnmail.el (nnmail-crosspost-link-function): Simplify.

7 years agoRemove references to OS/2 in code, doc, and comments
Glenn Morris [Sat, 8 Apr 2017 20:16:08 +0000 (13:16 -0700)]
Remove references to OS/2 in code, doc, and comments

* lisp/gnus/nnheader.el (nnheader-read-timeout)
(nnheader-file-name-translation-alist): Remove OS/2 case, and simplify.
* lisp/emulation/viper-util.el (viper-color-defined-p):
* lisp/net/pop3.el (pop3-read-timeout):
* lisp/net/imap.el (imap-read-timeout):
* lisp/url/url-privacy.el (url-setup-privacy-info): Remove OS/2 case.
* lisp/emulation/viper-ex.el (viper-glob-function):
* lisp/vc/ediff-util.el (ediff-submit-report): Doc fix.
* lisp/cus-edit.el (custom-display): Remove "pm" (OS/2).
* doc/emacs/msdos-xtra.texi (MS-DOS):
* doc/misc/gnus.texi (Various Various):
* doc/misc/viper.texi (Rudimentary Changes): Remove mentions of OS/2.
; * lisp/url/url.el, lisp/url/url-vars.el:
; * lisp/progmodes/cperl-mode.el: Remove old comments.

7 years agoTune Tramp syntax
Michael Albinus [Sat, 8 Apr 2017 16:35:06 +0000 (18:35 +0200)]
Tune Tramp syntax

* lisp/net/tramp-cmds.el (tramp-change-syntax):
Use `tramp-syntax-values'.

* lisp/net/tramp-compat.el (tramp-compat-tramp-syntax): New defsubst.

* lisp/net/tramp.el (tramp-syntax): Rename possible values.
(tramp-syntax-values): New defun.
(tramp-prefix-format, tramp-method-regexp)
(tramp-postfix-method-format, tramp-prefix-ipv6-format)
(tramp-postfix-ipv6-format, tramp-postfix-host-format)
(tramp-completion-file-name-regexp): Use `tramp-compat-tramp-syntax'
and changed values.
(tramp-completion-file-name-regexp-default): Rename from
`tramp-completion-file-name-regexp-unified'.  Adapt docstring.
(tramp-completion-file-name-regexp-simplified): Rename from
`tramp-completion-file-name-regexp-old-style'.  Adapt docstring.
(tramp-initial-completion-file-name-regexp):
Use `tramp-completion-file-name-regexp-default'.
(tramp-run-real-handler): Do not autoload any longer.

7 years agoReplace more nested ifs with cond
Mark Oteiza [Sat, 8 Apr 2017 15:34:17 +0000 (11:34 -0400)]
Replace more nested ifs with cond

This is a continuation of d526047 "Replace more nested ifs with cond".
* lisp/play/dunnet.el (dun-firstword, dun-firstwordl, dun-cat): Use
when and cond where appropriate.

7 years agoAdjust the edebug spec of if-let*
Mark Oteiza [Sat, 8 Apr 2017 15:30:36 +0000 (11:30 -0400)]
Adjust the edebug spec of if-let*

This was fixed in Bug#24748, but now looking more closely, using gate in
the spec seems correct.  See (info "(elisp) Backtracking").
* lisp/emacs-lisp/subr-x.el (if-let*): Use gate in edebug spec.

7 years agoReplace some uses of cl-member-if with apply
Mark Oteiza [Sat, 8 Apr 2017 15:27:17 +0000 (11:27 -0400)]
Replace some uses of cl-member-if with apply

From the mhtml-mode series.  Some of the uses of cl-lib are not
necessary.
* lisp/align.el: Don't require cl-lib.
(align-region): Use apply instead of cl-member-if.
* lisp/emulation/viper.el: Don't require cl-lib.
(viper-mode, this-major-mode-requires-vi-state): Use apply instead of
cl-member-if.

7 years agoValidate SPEC of `dolist', cf. Bug#25477.
Philipp Stephani [Sun, 26 Mar 2017 18:53:43 +0000 (20:53 +0200)]
Validate SPEC of `dolist', cf. Bug#25477.

* lisp/subr.el (dolist): Test type and length of SPEC.
* test/lisp/subr-tests.el (subr-tests--dolist--wrong-number-of-args):
Add unit test.

7 years agoAdd unit test for Bug#26378
Philipp Stephani [Sat, 8 Apr 2017 14:55:56 +0000 (16:55 +0200)]
Add unit test for Bug#26378

* test/lisp/vc/ediff-diff-tests.el
(ediff-diff-tests--ediff-exec-process--nil): New unit test.

7 years agoFix circular read syntax for records.
Lars Brinkhoff [Sat, 8 Apr 2017 05:07:32 +0000 (07:07 +0200)]
Fix circular read syntax for records.

* lread.c (substitute_object_recurse): Work with records.

* lread-tests.el (lread-record-1): New test.

7 years agoDeprecate copy-record in favor of copy-sequence
Paul Eggert [Sat, 8 Apr 2017 01:54:40 +0000 (18:54 -0700)]
Deprecate copy-record in favor of copy-sequence

Since copy-sequence seems to be needed anyway for records, have it
work on records, and remove copy-record as being superfluous.
* doc/lispref/records.texi (Records, Record Functions):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emacs-lisp/eieio.el (make-instance, clone):
* test/src/alloc-tests.el (record-3):
Use copy-sequence, not copy-record, to copy records.
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions): Document that aref and copy-sequence
work on records.
* etc/NEWS: Omit copy-record.
* src/alloc.c (Fcopy_record): Remove.
* src/data.c (Faref): Document that arg can be a record.
* src/fns.c (Fcopy_sequence): Copy records, too.

7 years agoFix dependency checking in src/Makefile.in
Paul Eggert [Sat, 8 Apr 2017 01:54:40 +0000 (18:54 -0700)]
Fix dependency checking in src/Makefile.in

* src/Makefile.in (AUTO_DEPEND, DEPDIR, DEPFLAGS): Move includes of
dependency files until after ALLOBJS is defined, since it uses ALLOBJS.
Otherwise, some dependencies will be missed.

7 years agoMinor tuneup of write-region change
Paul Eggert [Sat, 8 Apr 2017 01:54:39 +0000 (18:54 -0700)]
Minor tuneup of write-region change

* src/fileio.c (write_region): Use SCHARS, not Flength,
on a value known to be a string.

7 years agoAdjust write-region so file name is at the beginning again
Noam Postavsky [Fri, 7 Apr 2017 23:54:11 +0000 (19:54 -0400)]
Adjust write-region so file name is at the beginning again

* 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-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* src/fileio.c (write_region): Put file name at the beginning and move
number of characters to the end of the message.

7 years agoCheck that file argument is a string
Kaushal Modi [Wed, 5 Apr 2017 21:16:33 +0000 (17:16 -0400)]
Check that file argument is a string

* lisp/vc/ediff-diff.el (ediff-exec-process): Check that the argument
  passed to `file-local-copy' is a string (Bug#26378).  Also fix
  the existing comment for this function, and convert it to its
  doc-string.

7 years agoFix handling of non-integer START param to write-region
Noam Postavsky [Fri, 7 Apr 2017 22:24:35 +0000 (18:24 -0400)]
Fix handling of non-integer START param to write-region

The previous patch for Bug#354 incorrectly assumed that START would
always be an integer.

* lisp/epa-file.el (epa-file-write-region):
* lisp/jka-compr.el (jka-compr-write-region):
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* src/fileio.c (write_region): Handle nil and string values of START.

7 years ago* lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fixes.
Glenn Morris [Fri, 7 Apr 2017 17:42:58 +0000 (13:42 -0400)]
* lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fixes.

7 years agoAdd Tramp versions to `customize-package-emacs-version-alist'
Michael Albinus [Fri, 7 Apr 2017 16:43:25 +0000 (18:43 +0200)]
Add Tramp versions to `customize-package-emacs-version-alist'

* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp versions to `customize-package-emacs-version-alist'.

7 years ago* lisp/textmodes/rst.el (rst-toc-link-keymap): Move before first use.
Tom Tromey [Fri, 7 Apr 2017 15:43:42 +0000 (09:43 -0600)]
* lisp/textmodes/rst.el (rst-toc-link-keymap): Move before first use.

7 years ago* records.texi (Record Functions): fix typo.
Lars Brinkhoff [Fri, 7 Apr 2017 04:56:52 +0000 (06:56 +0200)]
* records.texi (Record Functions): fix typo.

7 years agoMore casefiddle minor fixes
Paul Eggert [Fri, 7 Apr 2017 03:02:15 +0000 (20:02 -0700)]
More casefiddle minor fixes

* src/casefiddle.c (case_character_impl): Omit unnecessary casts.
(case_character_impl): Avoid reevaluation of CHAR_TABLE_REF.
(GREEK_CAPITAL_LETTER_SIGMA): Fix typo in my previous change.

7 years ago; Spelling and punctuation fixes
Paul Eggert [Fri, 7 Apr 2017 02:26:28 +0000 (19:26 -0700)]
; Spelling and punctuation fixes

7 years agoOutput number of characters added to file (Bug#354)
Jeff Clough [Fri, 27 Feb 2015 13:52:12 +0000 (08:52 -0500)]
Output number of characters added to file (Bug#354)

* fileio.c (write_region):
* epa-file.el (epa-file-write-region):
* jka-compr.el (jka-compr-write-region):
* ange-ftp.el (ange-ftp-write-region):
* tramp-gvfs.el (tramp-gvfs-handle-write-region):
* tramp-sh.el (tramp-sh-handle-write-region):
* mm-util.el (mm-append-to-file): Functions now output
characters written in addition to file name.
* files.texi: Added documentation to write-region and
append-to-file describing their output.

7 years agoFix ‘!NILP (Vpurify_flag)’ assertion failure during temacs bootstrap
Noam Postavsky [Fri, 7 Apr 2017 01:45:27 +0000 (03:45 +0200)]
Fix ‘!NILP (Vpurify_flag)’ assertion failure during temacs bootstrap

The recent changes to src/casefiddle.c cause build failure as seen
below:

    Starting program: /home/npostavs/src/emacs/emacs-bootstrapping/src/temacs
--batch --load loadup bootstrap
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Loading loadup.el (source)...
    Using load-path (/home/npostavs/src/emacs/emacs-bootstrapping/lisp
/home/npostavs/src/emacs/emacs-bootstrapping/lisp/emacs-lisp
/home/npostavs/src/emacs/emacs-bootstrapping/lisp/language
/home/npostavs/src/emacs/emacs-bootstrapping/lisp/international
/home/npostavs/src/emacs/emacs-bootstrapping/lisp/textmodes
/home/npostavs/src/emacs/emacs-bootstrapping/lisp/vc)
    Loading emacs-lisp/byte-run (source)...
    Loading emacs-lisp/backquote (source)...
    Loading subr (source)...
    Loading version (source)...
    Loading widget (source)...
    Loading custom (source)...
    Loading emacs-lisp/map-ynp (source)...
    Loading international/mule (source)...
    Loading international/mule-conf (source)...

    lread.c:3914: Emacs fatal error: assertion failed: !NILP (Vpurify_flag)

    Breakpoint 1, terminate_due_to_signal at emacs.c:363
    363   signal (sig, SIG_DFL);
    (gdb) bt
    #0  0x0000000000579826 in terminate_due_to_signal at emacs.c:363
    #1  0x000000000060ec33 in die at alloc.c:7352
    #2  0x000000000066db40 in intern_c_string_1 at lread.c:3914
    #3  0x0000000000576884 in intern_c_string at lisp.h:3790
    #4  0x00000000005dc84f in prepare_casing_context at casefiddle.c:69
    #5  0x00000000005dd37f in casify_object at casefiddle.c:311
    #6  0x00000000005dd47f in Fcapitalize at casefiddle.c:356
    #7  0x00000000006325ac in eval_sub at eval.c:2219
    #8  0x0000000000632368 in eval_sub at eval.c:2184
    #9  0x000000000063446c in apply_lambda at eval.c:2875
    #10 0x00000000006329af in eval_sub at eval.c:2294
    #11 0x000000000062d462 in Fprogn at eval.c:449
    #12 0x000000000062d4cf in prog_ignore at eval.c:461
    #13 0x000000000062f19c in Fwhile at eval.c:982
    #14 0x00000000006321f4 in eval_sub at eval.c:2172
    #15 0x000000000062d462 in Fprogn at eval.c:449
    #16 0x000000000062f0c4 in Flet at eval.c:963
    #17 0x00000000006321f4 in eval_sub at eval.c:2172
    #18 0x0000000000632963 in eval_sub at eval.c:2290
    #19 0x000000000062d462 in Fprogn at eval.c:449
    #20 0x000000000062f0c4 in Flet at eval.c:963
    #21 0x00000000006321f4 in eval_sub at eval.c:2172
    #22 0x0000000000668caa in readevalloop at lread.c:1927
    #23 0x0000000000667253 in Fload at lread.c:1332
    #24 0x0000000000632683 in eval_sub at eval.c:2233
    #25 0x0000000000668caa in readevalloop at lread.c:1927
    #26 0x0000000000667253 in Fload at lread.c:1332
    #27 0x0000000000632683 in eval_sub at eval.c:2233
    #28 0x0000000000631be5 in Feval at eval.c:2041
    #29 0x000000000057e1af in top_level_2 at keyboard.c:1121
    #30 0x000000000062ffc7 in internal_condition_case at eval.c:1324
    #31 0x000000000057e1f0 in top_level_1 at keyboard.c:1129
    #32 0x000000000062f51e in internal_catch at eval.c:1091
    #33 0x000000000057e0ea in command_loop at keyboard.c:1090
    #34 0x000000000057d6d5 in recursive_edit_1 at keyboard.c:697
    #35 0x000000000057d8b4 in Frecursive_edit at keyboard.c:768
    #36 0x000000000057b55b in main at emacs.c:1687

    Lisp Backtrace:
    "capitalize" (0xffffcf70)
    "format" (0xffffd130)
    "define-charset" (0xffffd370)
    "while" (0xffffd560)
    "let" (0xffffd7c0)
    "dolist" (0xffffd910)
    "let" (0xffffdb70)
    "load" (0xffffdfe0)
    "load" (0xffffe4a0)

* src/casefiddle.c (syms_of_casefiddle): Declare four new symbols:
Qtitlecase, Qspecial_uppercase, Qspecial_lowercase and
Qspecial_titlecase.
(prepare_casing_context): Use aforementioned symbols.

7 years agoMerge from gnulib
Paul Eggert [Thu, 6 Apr 2017 23:29:36 +0000 (16:29 -0700)]
Merge from gnulib

This merges some getopt fixes from Zack Weinberg, and affects only
non-GNUish platforms.  It incorporates:
2017-04-06 getopt-gnu: omit some duplicate code
2017-04-06 getopt-posix: use angle-bracket include
2017-04-06 getopt: annotate files with relationship to glibc
2017-04-06 getopt: split up getopt.in.h and eliminate __need_getopt
2017-04-06 getopt: better handling of ambiguous options
2017-04-06 getopt: refactor long-option handling
2017-04-06 getopt: tidy up _getopt_initialize a bit
2017-04-06 getopt: merge from glibc: repetition reduction
2017-04-06 getopt: clean up error reporting
2017-04-06 getopt: fix fencepost error in ambiguous-W-option handling
2017-04-06 getopt: clean up getopt.c and getopt1.c file headers
2017-04-06 getopt: harmonize comments with glibc
2017-04-06 getopt: remove USE_NONOPTION_FLAGS
2017-04-06 getopt: tabify, in preparation for merge with glibc
2017-04-06 md5, sha1, sha256, sha512: Add comments re correctness
* build-aux/config.sub, doc/misc/texinfo.tex, lib/getopt.c:
* lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h, lib/md5.c:
* lib/md5.h, lib/sha1.c, lib/sha1.h, lib/sha256.c, lib/sha256.h:
* lib/sha512.c, lib/sha512.h, lib/unistd.in.h, m4/getopt.m4:
Copy from gnulib.
* lib/getopt_cdefs.in.h, lib/getopt_core.h, lib/getopt_ext.h:
* lib/getopt_pfx_core.h, lib/getopt_pfx_ext.h:
New files, taken from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate.

7 years agoMinor casefiddle.c cleanups
Paul Eggert [Thu, 6 Apr 2017 22:05:13 +0000 (15:05 -0700)]
Minor casefiddle.c cleanups

* src/casefiddle.c: Redo recent changes to match GNU style,
and prefer C99-style decls within blocks.
(GREEK_CAPITAL_LETTER_SIGMA): Rename from CAPITAL_SIGMA, so that
we are merely using the Unicode name, and make it a constant
rather than a macro.  All uses changed.
(SMALL_SIGMA): Remove; unused.
(GREEK_SMALL_LETTER_FINAL_SIGMA): Rename from SMALL_FINAL_SIGMA,
and make it a constant rather than a macro.  All uses changed.
(do_casify_multibyte_string): Use ‘verify’ rather than an
unportable static_assertion local.

7 years ago* lisp/international/README: Update to match current list.
Paul Eggert [Thu, 6 Apr 2017 21:59:37 +0000 (14:59 -0700)]
* lisp/international/README: Update to match current list.

7 years agoFix 'make clean' in lib subdirectory
Paul Eggert [Thu, 6 Apr 2017 20:41:30 +0000 (13:41 -0700)]
Fix 'make clean' in lib subdirectory

* lib/Makefile.in (clean): Remove *-t files.
(mostlyclean): Remove MOSTLYCLEANFILES that are not *-t files.
This removes files like lib/getopt.h that should be removed
even if this configuration did not need to build them.
(maintainer-clean): Remove TAGS here, not in distclean,
to be consistent with ../src/Makefile.in.

7 years agoAdd new Tramp syntax
Michael Albinus [Thu, 6 Apr 2017 19:00:29 +0000 (21:00 +0200)]
Add new Tramp syntax

* lisp/net/tramp-cmds.el (tramp-change-syntax): New defun.

* lisp/net/tramp.el (tramp-syntax): Change default to `def'.
Add :set function.
(tramp-prefix-port-format): Simplify.
(tramp-file-name-regexp-separate): Remove.
(tramp-initial-file-name-regexp)
(tramp-completion-file-name-regexp-old-style)
(tramp-initial-completion-file-name-regexp): New defconst.
(tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp)
(tramp-postfix-host-format, tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-file-name-regexp)
(tramp-rfn-eshadow-update-overlay-regexp): Change them to be defuns.
(tramp-tramp-file-p, tramp-find-method)
(tramp-dissect-file-name, tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay)
(tramp-register-autoload-file-name-handlers)
(tramp-register-file-name-handlers)
(tramp-unload-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use them.

7 years agoImplement special sigma casing rule (bug#24603)
Michal Nazarewicz [Sun, 18 Sep 2016 22:52:47 +0000 (00:52 +0200)]
Implement special sigma casing rule  (bug#24603)

In Greek, a sigma character has two lower case forms which depend on
their position in the word.  Implement logic determining it.

* src/casefiddle.c (struct casing_context, case_character_impl): Don’t
assume inword is true when flag is CASE_UP and false when flag is
CASE_DOWN.  For final sigma detection we need this information tracked
reliably;.
(CAPITAL_SIGMA, SMALL_SIGMA, SMALL_FINAL_SIGMA): New macros defining
Unicode code point of different forms of sigma letter.
(case_character): Implement support for final sigma casing.
(do_casify_multibyte_string, do_casify_multibyte_region): Update after
changes to case_character.

* test/src/casefiddle-tests.el (casefiddle-tests-casing): Add test
cases for final sigma.

7 years agoSupport casing characters which map into multiple code points (bug#24603)
Michal Nazarewicz [Tue, 4 Oct 2016 22:06:01 +0000 (00:06 +0200)]
Support casing characters which map into multiple code points  (bug#24603)

Implement unconditional special casing rules defined in Unicode standard.

Among other things, they deal with cases when a single code point is
replaced by multiple ones because single character does not exist (e.g.
‘fi’ ligature turning into ‘FL’) or is not commonly used (e.g. ß turning
into SS).

* admin/unidata/SpecialCasing.txt: New data file pulled from Unicode
standard distribution.
* admin/unidata/README: Mention SpecialCasing.txt.

* admin/unidata/unidata-get.el (unidata-gen-table-special-casing,
unidata-gen-table-special-casing--do-load): New functions generating
‘special-uppercase’, ‘special-lowercase’ and ‘special-titlecase’
character Unicode properties built from the SpecialCasing.txt Unicode
data file.

* src/casefiddle.c (struct casing_str_buf): New structure for
representing short strings used to handle one-to-many character
mappings.

(case_character_imlp): New function which can handle one-to-many
character mappings.
(case_character, case_single_character): Wrappers for the above
functions.  The former may map one character to multiple (or no)
code points while the latter does what the former used to do (i.e.
handles one-to-one mappings only).

(do_casify_natnum, do_casify_unibyte_string,
do_casify_unibyte_region): Use case_single_character.
(do_casify_multibyte_string, do_casify_multibyte_region): Support new
features of case_character.
* (do_casify_region): Updated to reflact do_casify_multibyte_string
changes.

(casify_word): Handle situation when one character-length of a word
can change affecting where end of the word is.

(upcase, capitalize, upcase-initials): Update documentation to mention
limitations when working on characters.

* test/src/casefiddle-tests.el (casefiddle-tests-char-properties):
Add test cases for the newly introduced character properties.
(casefiddle-tests-casing): Update test cases which are now passing.

* test/lisp/char-fold-tests.el (char-fold--ascii-upcase,
char-fold--ascii-downcase): New functions which behave like old ‘upcase’
and ‘downcase’.
(char-fold--test-match-exactly): Use the new functions.  This is needed
because otherwise fi and similar characters are turned into their multi-
-character representation.

* doc/lispref/strings.texi: Describe issue with casing characters versus
strings.
* doc/lispref/nonascii.texi: Describe the new character properties.

7 years agoSplit up casify_region function (bug#24603)
Michal Nazarewicz [Sun, 18 Sep 2016 23:47:34 +0000 (01:47 +0200)]
Split up casify_region function  (bug#24603)

No functional changes at this time but splitting casify_region into
a function dealing with multibyte and another dealing with unibyte
buffers will make future code changes slightly easier.

* src/casefiddle.c (casify_region): Move most of the code into two
new functions:
(do_casify_multibyte_region, do_casify_unibyte_region): new functions.

7 years agoAdd support for title-casing letters (bug#24603)
Michal Nazarewicz [Thu, 11 Aug 2016 23:38:49 +0000 (01:38 +0200)]
Add support for title-casing letters  (bug#24603)

* src/casefiddle.c (struct casing_context, prepare_casing_context): Add
titlecase_char_table member.  It’s set to the ‘titlecase’ Unicode
property table if capitalisation has been requested.
(case_character): Make use of the titlecase_char_table to title-case
initial characters when capitalising.

* test/src/casefiddle-tests.el (casefiddle-tests--characters,
casefiddle-tests-casing): Update test cases which are now passing.

7 years agoIntroduce case_character function
Michal Nazarewicz [Wed, 7 Sep 2016 14:38:18 +0000 (16:38 +0200)]
Introduce case_character function

Move single-character casing logic into a separate function so that
it is collected in a single place.  This will make future changes to
the logic easier.  This commit introduces no functionality changes.

* src/casefiddle.c (struct casing_context, prepare_casing_context): New
sturcture for saving casing context and function to initialise it.
(case_character): New function which cases character base on provided
context.
(do_casify_integer, do_casify_multibyte_string,
do_casify_unibyte_string, casify_object, casify_region): Convert to
use casing_context and case_character.

7 years agoSplit casify_object into multiple functions
Michal Nazarewicz [Wed, 7 Sep 2016 13:26:42 +0000 (15:26 +0200)]
Split casify_object into multiple functions

casify_object had three major cases to cover and those were mostly
independent of each other.  Move those branches to separate function
so it’s easier to comprehend each individual case.

While at it, use somewhat more descriptive ch and cased variable names
rather than c and c1.

This commit introduces no functional changes.

* src/casefiddle.c (casify_object): Split into…
(do_casify_integer, do_casify_multibyte_string,
do_casify_unibyte_string): …new functions.

7 years agoUpdate documentation for type semantics of records.
Lars Brinkhoff [Wed, 5 Apr 2017 06:42:25 +0000 (08:42 +0200)]
Update documentation for type semantics of records.

* objects.texi (Record Type): improve description of what
`type-of' returns for records.
(Type Descriptors): new section.
* elisp.texi: reference it.
* records.texi (Records): reference it.  Document behaviour when type
slot is a record.

* alloc.c (Fmake_record, Frecord): mention type desciptors.

7 years ago* lisp/help-fns.el (describe-symbol): `nil' is not an interesting default.
Stefan Monnier [Thu, 6 Apr 2017 13:55:05 +0000 (09:55 -0400)]
* lisp/help-fns.el (describe-symbol): `nil' is not an interesting default.

7 years agorequire cl-lib to fix fallout from mhtml series
Tom Tromey [Thu, 6 Apr 2017 13:36:36 +0000 (07:36 -0600)]
require cl-lib to fix fallout from mhtml series

* lisp/align.el, lisp/calc/calc-embed.el, lisp/cedet/semantic.el,
lisp/emulation/viper.el: Require cl-lib.

7 years agoIn CANNOT_DUMP builds, allow editing of files named "dump".
Ken Raeburn [Thu, 6 Apr 2017 03:16:10 +0000 (23:16 -0400)]
In CANNOT_DUMP builds, allow editing of files named "dump".

* lisp/loadup.el: Perform the "dump" or "bootstrap" actions like
calling dump-emacs only if dump-emacs is defined; otherwise, don't
treat those command-line argument specially.

7 years agoIn CANNOT_DUMP builds, don't prepare for unexec.
Ken Raeburn [Wed, 5 Apr 2017 06:48:49 +0000 (02:48 -0400)]
In CANNOT_DUMP builds, don't prepare for unexec.

Having a command-line argument of "dump" or "bootstrap" would trigger
behavior like not installing signal handlers.  In CANNOT_DUMP modes,
we should get signal handlers installed regardless of whatever funny
file names we decide to edit.

src/emacs.c (main) [CANNOT_DUMP]: Don't enable the "dumping"
alterations to initialization that prepares the process for unexec.

7 years agoAllow a CANNOT_DUMP build to use exec-path during bootstrap.
Ken Raeburn [Thu, 9 Mar 2017 06:15:53 +0000 (01:15 -0500)]
Allow a CANNOT_DUMP build to use exec-path during bootstrap.

During a bootstrap, loading rmail.el invokes movemail to determine its
flavor, but call-process doesn't work if exec-path is nil.

* lisp/loadup.el: Only clear exec-path if dumping.

7 years agoFix CANNOT_DUMP build on Darwin/macOS.
Ken Raeburn [Wed, 8 Mar 2017 11:28:45 +0000 (06:28 -0500)]
Fix CANNOT_DUMP build on Darwin/macOS.

* src/conf_post.h (malloc, realloc, free) [DARWIN_OS && emacs &&
CANNOT_DUMP]: Don't define as unexec_malloc, etc.
* src/emacs.c (main): Don't call unexec_init_emacs_zone.

7 years agoadd two more mhtml tests
Tom Tromey [Wed, 5 Apr 2017 21:55:22 +0000 (15:55 -0600)]
add two more mhtml tests

* test/manual/indent/html-multi-2.html: New file.
* test/manual/indent/html-multi-3.html: New file.

7 years agoenable mhtml-mode by default
Tom Tromey [Thu, 23 Mar 2017 17:34:27 +0000 (11:34 -0600)]
enable mhtml-mode by default

* lisp/files.el (auto-mode-alist): Reference mhtml-mode, not
html-mode.
(magic-fallback-mode-alist): Likewise.
* lisp/net/eww.el (eww-view-source): Use mthml-mode.

7 years agoadd mhtml-mode.el
Tom Tromey [Thu, 23 Mar 2017 17:34:18 +0000 (11:34 -0600)]
add mhtml-mode.el

* etc/NEWS: Update.
* lisp/textmodes/mhtml-mode.el: New file.
* test/manual/indent/html-multi.html: New file.
* test/lisp/textmodes/mhtml-mode-tests.el: New file.
* doc/emacs/text.texi (HTML Mode): Mention mhtml-mode.

7 years agochange sgml-mode to help multi-html mode
Tom Tromey [Thu, 23 Mar 2017 17:33:47 +0000 (11:33 -0600)]
change sgml-mode to help multi-html mode

* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): New
defconst.
(sgml-syntax-propertize): Use it.
(sgml--find-<>-backward): New function.
(sgml-parse-tag-backward): Use it.

7 years agomake js.el respect prog-first-column
Tom Tromey [Thu, 23 Mar 2017 17:33:22 +0000 (11:33 -0600)]
make js.el respect prog-first-column

* lisp/progmodes/js.el (js--proper-indentation): Call prog-first-column.

7 years agomake smie.el respect prog-first-column
Tom Tromey [Thu, 23 Mar 2017 17:32:59 +0000 (11:32 -0600)]
make smie.el respect prog-first-column

* lisp/emacs-lisp/smie.el (smie-indent-bob): Call prog-first-column.

7 years agochange viper to use derived-mode-p
Tom Tromey [Sun, 19 Mar 2017 16:52:28 +0000 (10:52 -0600)]
change viper to use derived-mode-p

* lisp/subr.el (provided-mode-derived-p): New function.
(derived-mode-p): Use it.
* lisp/emulation/viper.el (viper-mode): Use derived-mode-p.
(this-major-mode-requires-vi-state): Use provided-mode-derived-p.
(set-viper-state-in-major-mode): Use derived-mode-p.

7 years agochange align to use derived-mode-p
Tom Tromey [Sat, 18 Mar 2017 22:06:05 +0000 (23:06 +0100)]
change align to use derived-mode-p

* lisp/align.el (align-region): Use derived-mode-p.

7 years agochange org to use derived-mode-p
Tom Tromey [Sat, 18 Mar 2017 22:03:15 +0000 (23:03 +0100)]
change org to use derived-mode-p

* lisp/org/org-list.el (org-list-insert-radio-list): Use
derived-mode-p.
* lisp/org/org-table.el (orgtbl-setup, orgtbl-toggle-comment): Use
derived-mode-p.

7 years agochange semantic to use derived-mode-p
Tom Tromey [Sat, 18 Mar 2017 22:01:16 +0000 (23:01 +0100)]
change semantic to use derived-mode-p

* lisp/cedet/semantic.el (semantic-new-buffer-fcn): Use derived-mode-p.

7 years agochange calc to use derived-mode-p
Tom Tromey [Sat, 18 Mar 2017 22:00:13 +0000 (23:00 +0100)]
change calc to use derived-mode-p

* lisp/calc/calc-embed.el (calc-embedded-find-modes)
(calc-embedded-make-info): Use derived-mode-p.

7 years agochange auto-insert to use derived-mode-p
Tom Tromey [Sat, 18 Mar 2017 21:53:56 +0000 (22:53 +0100)]
change auto-insert to use derived-mode-p

* lisp/autoinsert.el (auto-insert): Use derived-mode-p.

7 years ago* lisp/info.el (Info-search): Fix typo in April 1 change.
Paul Eggert [Wed, 5 Apr 2017 16:43:14 +0000 (09:43 -0700)]
* lisp/info.el (Info-search): Fix typo in April 1 change.

7 years agoMinor cleanups related to type-of
Paul Eggert [Wed, 5 Apr 2017 01:39:43 +0000 (18:39 -0700)]
Minor cleanups related to type-of

* src/data.c (Frecordp): Rename from Frecordp_p, for consistency.
* src/data.c (syms_of_data):
* src/frame.c (syms_of_frame): Put all the primitive type names
together, under the "Types that type-of returns" comment.

7 years ago; * lisp/emacs-lisp/package.el (describe-package-1): Tweak recent.
Glenn Morris [Wed, 5 Apr 2017 00:19:24 +0000 (20:19 -0400)]
; * lisp/emacs-lisp/package.el (describe-package-1): Tweak recent.

7 years ago* doc/lispref/package.texi (Package Archives): Mention https.
Glenn Morris [Wed, 5 Apr 2017 00:17:54 +0000 (20:17 -0400)]
* doc/lispref/package.texi (Package Archives): Mention https.

7 years agoAdvertise https for homepage of gnu.org packages
Glenn Morris [Tue, 4 Apr 2017 23:39:57 +0000 (19:39 -0400)]
Advertise https for homepage of gnu.org packages

* lisp/emacs-lisp/package.el (describe-package-1):
Use https, if supported, for the homepage of packages on gnu.org.

7 years agoDefault to https for elpa.gnu.org if gnutls available
Glenn Morris [Tue, 4 Apr 2017 23:04:52 +0000 (19:04 -0400)]
Default to https for elpa.gnu.org if gnutls available

* lisp/emacs-lisp/package.el (package-archives):
Default to https for elpa.gnu.org if gnutls is available.  Ref:
http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00130.html

7 years agoMinor simplifications and doc for records
Paul Eggert [Tue, 4 Apr 2017 21:06:25 +0000 (14:06 -0700)]
Minor simplifications and doc for records

* doc/lispref/records.texi (Records): Mention size limit.
* etc/NEWS: Mention records.
* src/alloc.c (allocate_pseudovector, allocate_record):
Prefer 'PSEUDOVECTOR_SIZE_MASK' to its definiens.
(allocate_record): Check arg range here, not in callers, as this
simplifies the code.  Use allocate_vectorlike instead of
allocate_vector, to avoid duplicate runtime tests.
(Fmake_record, record): Don't mention PSEUDOVECTOR_SIZE_BITS in
the doc string, as it is not visible to the user.
(Fmake_record, record, Fcopy_record):
Prefer make_lisp_ptr to XSETVECTOR.
(record): Broaden memcpy to copy the type, too.

7 years agoFix recent changes in record data type
Eli Zaretskii [Tue, 4 Apr 2017 14:56:10 +0000 (17:56 +0300)]
Fix recent changes in record data type

* src/alloc.c (Fmake_record, Frecord, Fcopy_record): Avoid
compiler warnings when 'ptrdiff_t' is narrower than 'long int'.

7 years agoMake subprocess functions resolve the default directory
Philipp Stephani [Fri, 3 Mar 2017 16:56:01 +0000 (17:56 +0100)]
Make subprocess functions resolve the default directory

`call-process' doesn't respect file name handlers in
`default-directory', so `file-name-non-special' has to resolve them
for `process-file', `start-file-process', and
`shell-command' (Bug#25949).

* lisp/files.el (file-name-non-special): Also resolve default
directory for 'process-file', 'start-file-process', and
'shell-command'.
* test/lisp/files-tests.el
(files-tests--file-name-non-special--subprocess): Add unit test.

7 years agoMake ediff handle remote and quoted file names
Philipp Stephani [Fri, 3 Mar 2017 17:36:08 +0000 (18:36 +0100)]
Make ediff handle remote and quoted file names

Quoted file names need to be unquoted before passed to
subprocesses (Bug#25950).

* lisp/vc/ediff-diff.el (ediff-exec-process): Handle remote and quoted
file names.
* test/lisp/vc/ediff-diff-tests.el
(ediff-diff-tests--ediff-exec-process--quoted-file): Add unit test.

7 years agoBackward compatibility with pre-existing struct instances.
Stefan Monnier [Fri, 24 Mar 2017 13:21:52 +0000 (09:21 -0400)]
Backward compatibility with pre-existing struct instances.

* lisp/emacs-lisp/cl-lib.el (cl--old-struct-type-of): New function.
(cl-old-struct-compat-mode): New minor mode.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Pass `record' to
cl-struct-define to signal use of record objects.

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class,
cl-struct-define): Enable legacy defstruct compatibility.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-old-struct,
old-struct): New tests.

* doc/lispref/elisp.texi, doc/lispref/records.texi: Document
`old-struct-compat'.

7 years agoMake the URL library use records.
Lars Brinkhoff [Tue, 21 Mar 2017 19:48:52 +0000 (20:48 +0100)]
Make the URL library use records.

* lisp/url/url.el, lisp/url/url-cache.el, lisp/url/url-dav.el,
lisp/url/url-expand.el, lisp/url/url-file.el, lisp/url/url-imap.el,
lisp/url/url-ldap.el: Use `url-p' instead of `vectorp'.

* lisp/url/url-http.el (url-http): Check for type `url' instead of
`vector'.

7 years agoMake EIEIO use records.
Stefan Monnier [Thu, 16 Mar 2017 02:48:28 +0000 (22:48 -0400)]
Make EIEIO use records.

* lisp/emacs-lisp/eieio-compat.el
(eieio--generic-static-object-generalizer): Adjust to new tags.

* lisp/emacs-lisp/eieio-core.el: Use records, and place the class object
directly as tag.
(eieio--object-class): Adjust to new tag representation.
(eieio-object-p): Rewrite, and adapt to new `type-of' behavior.
(eieio-defclass-internal): Use `make-record'.
(eieio--generic-generalizer): Adjust generalizer code accordingly.

* lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add `recordp'.

* doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.

7 years agoMake cl-defstruct use records.
Lars Brinkhoff [Tue, 14 Mar 2017 12:52:40 +0000 (13:52 +0100)]
Make cl-defstruct use records.

* lisp/emacs-lisp/cl-extra.el (cl--describe-class)
(cl--describe-class-slots): Use the new `type-of'.

* lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Use type-of.
(cl--generic-struct-specializers): Adjust to new tag.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): When type is nil, use records.
Use the type symbol as the tag.  Use copy-record to copy structs.
(cl--defstruct-predicate): New function.
(cl--pcase-mutually-exclusive-p): Use it.
(cl-struct-sequence-type): Can now return `record'.

* lisp/emacs-lisp/cl-preloaded.el (cl--make-slot-desc): Adjust ad-hoc
code to new format.
(cl--struct-register-child): Work with records.
(cl-struct-define): Don't touch the tag's symbol-value and
symbol-function slots when we use the type as tag.

* lisp/emacs-lisp/cl-print.el (cl-print-object): Adjust to new tag.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record):
New test.

* doc/lispref/records.texi, doc/misc/cl.texi: Update for records.

7 years agoAdd record objects with user-defined types.
Lars Brinkhoff [Sun, 6 Jan 2013 13:27:44 +0000 (14:27 +0100)]
Add record objects with user-defined types.

* src/alloc.c (allocate_record): New function.
(Fmake_record, Frecord, Fcopy_record): New functions.
(syms_of_alloc): defsubr them.
(purecopy): Work with records.

* src/data.c (Ftype_of): Return slot 0 for record objects, or type
name if record's type holds class.
(Frecordp): New function.
(syms_of_data): defsubr it.  Define `Qrecordp'.
(Faref, Faset): Work with records.

* src/fns.c (Flength): Work with records.

* src/lisp.h (prec_type): Add PVEC_RECORD.
(RECORDP, CHECK_RECORD, CHECK_RECORD_TYPE): New functions.

* src/lread.c (read1): Add syntax for records.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Add RECORDP.
(print_object): Add syntax for records.

* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-2):
New test.

* test/src/alloc-tests.el (record-1, record-2, record-3):
New tests.

* doc/lispref/elisp.texi, doc/lispref/objects.texi,
doc/lispref/records.texi: Add documentation for records.

7 years agoFix a test in python-test.el
Tino Calancha [Tue, 4 Apr 2017 06:16:15 +0000 (15:16 +0900)]
Fix a test in python-test.el

Fix a test that breaks the test suite when it is run within a
virtual environment.
See following link for details:
https://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00857.html
* test/lisp/progmodes/python-tests.el
(python-shell-calculate-process-environment-7): Bind
python-shell-virtualenv-root to VIRTUAL_ENV when this var is set; otherwise
bind it to '/env'.

7 years agoThrow a `search-failed' derived error in Info search
Noam Postavsky [Sat, 1 Apr 2017 13:34:04 +0000 (09:34 -0400)]
Throw a `search-failed' derived error in Info search

The original fix for Bug#6106 switched from signalling `search-failed'
to `user-error'.  However, this breaks incremental searching over
multiple nodes because the isearch code doesn't expect a `user-error'.

* src/search.c (syms_of_search): New error, `user-search-failed',
with `user-error' and `search-failed' as parents.
* doc/lispref/errors.texi (Standard Errors): Document it.
* etc/NEWS: Announce it.
* lisp/info.el (Info-search): Use it instead of `user-error' so that
isearch will handle failed searches correctly.

7 years agoAdd Tramp test
Michael Albinus [Mon, 3 Apr 2017 12:04:06 +0000 (14:04 +0200)]
Add Tramp test

* doc/misc/tramp.texi (Remote processes): Fix typo.

* lisp/shell.el (shell): Fix typo.

* lisp/net/tramp.el (tramp-set-connection-local-variables): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test30-explicit-shell-file-name):
New test.
(tramp--test-special-characters, tramp--test-utf8): Adapt docstring.
(tramp-test31-vc-registered)
(tramp-test32-make-auto-save-file-name)
(tramp-test33-make-nearby-temp-file)
(tramp-test34-special-characters)
(tramp-test34-special-characters-with-stat)
(tramp-test34-special-characters-with-perl)
(tramp-test34-special-characters-with-ls, tramp-test35-utf8)
(tramp-test35-utf8-with-stat, tramp-test35-utf8-with-perl)
(tramp-test35-utf8-with-ls)
(tramp-test36-asynchronous-requests)
(tramp-test37-recursive-load, tramp-test38-unload): Rename.

7 years ago* lisp/ses.el: Silence byte-compiler warnings.
Stefan Monnier [Mon, 3 Apr 2017 03:09:53 +0000 (23:09 -0400)]
* lisp/ses.el: Silence byte-compiler warnings.

(ses-jump, ses-recalculate-cell, ses-define-local-printer): Silence
byte-compiler warnings.

7 years agoFix bugs in simplified test dependencies
Paul Eggert [Sun, 2 Apr 2017 20:09:56 +0000 (13:09 -0700)]
Fix bugs in simplified test dependencies

Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00017.html
* test/Makefile.in (LOGFILES, TESTS): Omit leading "./".
(TESTS): Omit unnecessary patsubst.
(test_template): Redo dependency heuristic, hopefully
correctly this time.  It's the .log file that depends,
not the phony test target.  Declare the phonies to be PHONY.
Resurrect the exception for the *-tests subdirectory.
Adjust to the fact that leading "./" is omitted now.

7 years agoFix typo in docstring
Wilfred Hughes [Sun, 2 Apr 2017 18:29:14 +0000 (19:29 +0100)]
Fix typo in docstring

* lisp/help.el: Fix typo.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 2 Apr 2017 16:11:26 +0000 (12:11 -0400)]
; Auto-commit of loaddefs files.

7 years ago; * lisp/replace.el (how-many, flush-lines, keep-lines): Remove empty line.
Tino Calancha [Sun, 2 Apr 2017 12:16:37 +0000 (21:16 +0900)]
; * lisp/replace.el (how-many, flush-lines, keep-lines): Remove empty line.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sun, 2 Apr 2017 09:03:14 +0000 (11:03 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoApply connecion-local variables for shells
Michael Albinus [Sun, 2 Apr 2017 09:02:54 +0000 (11:02 +0200)]
Apply connecion-local variables for shells

* doc/misc/tramp.texi (Remote processes): Show use of connection-local
variables.  Don't mention Emacs 23 anymore.
(Frequently Asked Questions): Precise Emacs and MS Windows version.

* lisp/files-x.el (connection-local-normalize-criteria):
Suppress nil properties.
(connection-local-set-profiles, with-connection-local-profiles):
Adapt docstring.

* lisp/shell.el (shell): Apply connecion-local variables.

7 years agoPropertize only perl prototype chars `][$%&*;+@\' as punctuation
Evgeni Kolev [Mon, 27 Mar 2017 06:30:10 +0000 (09:30 +0300)]
Propertize only perl prototype chars `][$%&*;+@\' as punctuation

This prevents variables in signatures such as `sub add ($a, $b)' from
being treated as punctuation.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Strictly match only prototype characters as punctuation.  (Bug#26037)

Copyright-paperwork-exempt: yes

7 years agofix two js-mode syntax propertization bugs
Tom Tromey [Mon, 13 Mar 2017 20:53:59 +0000 (21:53 +0100)]
fix two js-mode syntax propertization bugs

Bug#26070:
* lisp/progmodes/js.el (js--syntax-propertize-regexp-regexp): Add
zero-or-one to regular expression.
(js-syntax-propertize-regexp): Update.  Propertize body of regexp
literal up to END.
* test/lisp/progmodes/js-tests.el (js-mode-propertize-bug-1)
(js-mode-propertize-bug-2): New tests.

7 years agoSimplify test dependency generation
Paul Eggert [Sat, 1 Apr 2017 19:15:03 +0000 (12:15 -0700)]
Simplify test dependency generation

Generate default dependencies by using GNU extensions to ‘make’
rather than via a hacky auxiliary program and script.
* .gitignore: Remove test/make-test-deps.mk.
* test/Makefile.in (ELFILES, LOGFILES, TESTS):
Use :=, not =, to avoid multiple redundant invocations of ‘find’.
(test_template): Infer dependency directly instead of via
make-test-deps.mk.
(check-doit): Prepend ‘@’ to avoid excessively long ‘make’ output.
(clean): No need to clean make-test-deps.mk.
(make-test-deps.mk): Remove rule.
* test/make-test-deps.emacs-lisp: Remove.

7 years ago; Spelling fixes
Paul Eggert [Sat, 1 Apr 2017 17:46:48 +0000 (10:46 -0700)]
; Spelling fixes

7 years ago* test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests
Stefan Monnier [Sat, 1 Apr 2017 16:11:07 +0000 (12:11 -0400)]
* test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests

(cl-lib-symbol-macrolet): Fix last test so it doesn't break the whole
test suite.
(cl-lib-symbol-macrolet-2): New test.

7 years agoUse only posix options in a ediff-ptch test
Tino Calancha [Sat, 1 Apr 2017 08:02:49 +0000 (17:02 +0900)]
Use only posix options in a ediff-ptch test

* test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
Use just "-b" patch option.  Don't assume a particular suffix for
the backup files.

7 years agoInitial implementation of HTTP Digest qop for url
Jarno Malmari [Sat, 1 Apr 2017 06:19:46 +0000 (09:19 +0300)]
Initial implementation of HTTP Digest qop for url

This also refactors digest authentication functions in url-auth.el.

* lisp/url/url-auth.el (url-digest-auth, url-digest-auth-create-key):
(url-digest-auth-build-response, url-digest-auth-directory-id-assoc):
(url-digest-auth-name-value-string, url-digest-auth-source-creds):
(url-digest-cached-key, url-digest-cache-key, url-digest-find-creds):
(url-digest-find-new-key, url-digest-prompt-creds): Add new functions
to simplify code and aid in unit testing.
(url-digest-auth-build-response): Hook up new functionality, or fall
back to previous.
(url-digest-auth-make-request-digest-qop):
(url-digest-auth-make-cnonce, url-digest-auth-nonce-count):
(url-digest-auth-name-value-string): Add new helper functions.
* test/lisp/url/url-auth-tests.el (url-auth-test-colonjoin):
(url-auth-test-digest-ha1, url-auth-test-digest-ha2):
(url-auth-test-digest-request-digest): Add a few tests as now more
features are testable via intermediate functions.
(url-auth-test-challenges, url-auth-test-digest-request-digest): Test
the new implementation.  Parts of these were accidentally already
merged in the past.

7 years agoTweak ediff-ptch test in previous commit a bit more
Tino Calancha [Sat, 1 Apr 2017 03:28:54 +0000 (12:28 +0900)]
Tweak ediff-ptch test in previous commit a bit more

* test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
Apply patches without requiring a shell.  Add some comments.