Michael Albinus [Sat, 23 Jan 2016 15:20:21 +0000 (16:20 +0100)]
Improve user name completion in Tramp
* lisp/net/tramp.el (tramp-parse-passwd, tramp-parse-etc-group):
Call also "getent passwd" or "getent group", if possible.
(tramp-parse-putty): Cache the result.
Vincent Belaïche [Wed, 20 Jan 2016 07:28:06 +0000 (08:28 +0100)]
Correct a whole bunch of bugs coming with renamed cell relocation.
* lisp/ses.el (ses-localvars): rename variable
`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
and adjust the comment about it.
(ses-plist-delq): new defun.
(ses--ses-buffer-list): new defvar.
(ses--unbind-cell-name): new defun.
(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
(ses-relocate-formula): Undo change of
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
preventing relocation for named cell --- now doing this is delegated
to function `ses-relocate-symbol'.
(ses-relocate-range): In docstring, undo change of
2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
lower case as it is not a variable.
(ses-relocate-all): Cell name relocation : 1) check that cell is a
renamed cell by testing `ses-cell' property to :ses-named, rather than
comparing name to corresponding standard name. Set rowcol of renamed
cell into the hashmap --- `ses-cell' property must not be used for
that as the same name can be used for different locations in different
SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
`local-variable-p' to check if cell name is already in use in this
sheet or needs initialisation.
(ses-relocate-all): Cell value relocation : 1) like for name
relocation use the `ses-cell' property rather than comparing actual
name to corresponding standard name. 2) Correct bug introduced in
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
made the other way round than the intention --- ie value relocation
was disabled for standard cell, not for renamed cell as was the
intention.
(ses-relocate-all): Add loop for unbinding deleted renamed cells
names.
(ses-killbuffer-hook): new defun.
(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
kill buffer hook, plus pushing current buffer if new in list.
(ses-delete-row, ses-delete-column): Collect deleted renamed cells
into `ses--in-killing-named-cell-list'.
(ses-rename-cell): Remove update of variable
`ses--renamed-cell-symb-list', this variable is renamed to
`ses--in-killing-named-cell-list', and its setting is done in
functions `ses-delete-row' and , `ses-delete-column' now.
(ses-rename-cell): Change correction of
2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
computation of the range over which `cursor-intangible' property was
to be updated. This correction was ok for non spilling cells, but not
for cells spilling over following blank cells. Simply use
`next-single-property-change' rather than computing the end column
from column widths.
John Wiegley [Tue, 19 Jan 2016 06:56:34 +0000 (22:56 -0800)]
Merge from origin/emacs-25
3ae7934 ; * etc/NEWS: Mark entries that don't need further treatment. 6165c36 * lisp/files.el (dir-locals--all-files): Respect absolute file-names 2ffdf15 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis 71ecd62 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable f0b82b3 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards 86e4513 Fix incompatbilities with MS-Windows 2000 and older 4e96521 Mention in PROBLEMS an issue with MS-Windows NT4 15c23aa Ensure 8-byte aligned memory allocation on MS-Windows 9X 39afa42 Fix tests for active region in hideif.el 05df666 Fix interactive specs in some hideif.el commands
Paul Eggert [Sun, 3 Jan 2016 23:00:49 +0000 (15:00 -0800)]
Avoid stdio in SIGINT handler
* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/ignore-value.h: New file, from gnulib.
* src/keyboard.c: Include it.
(write_stdout, read_stdin): New functions.
(handle_interrupt): Use them instead of printf and getchar,
and avoid fflush when handling signals.
(Maybe this is the last merge from Gnus git to Emacs git)
Cf. discussion on ding mailing list, messages in
<http://thread.gmane.org/gmane.emacs.gnus.general/86228>.
Common code from the three files mml-smime.el, mml1991.el, and
mml2015.el is moved to mml-sec.el. Auxiliary functions are added
to gnus-util.el.
The code is supported by test cases with necessary test keys.
Documentation in message.texi is updated.
* doc/misc/message.texi (Security, Using S/MIME):
Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.
* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
New functions.
* lisp/gnus/mml-sec.el: Require gnus-util and epg.
(epa--select-keys): Autoload.
(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
(mml-secure-openpgp-signers): New user option;
make mml1991-signers and mml2015-signers obsolete aliases to it.
(mml-secure-smime-signers): New user option;
make mml-smime-signers an obsolete alias to it.
(mml-secure-openpgp-encrypt-to-self): New user option;
make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
aliases to it.
(mml-secure-smime-encrypt-to-self): New user option;
make mml-smime-encrypt-to-self an obsolete alias to it.
(mml-secure-openpgp-sign-with-sender): New user option;
make mml2015-sign-with-sender an obsolete alias to it.
(mml-secure-smime-sign-with-sender): New user option;
make mml-smime-sign-with-sender an obsolete alias to it.
(mml-secure-openpgp-always-trust): New user option;
make mml2015-always-trust an obsolete alias to it.
(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
New user options.
(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
(mml-secure-passphrase-callback, mml-secure-check-user-id)
(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
(mml-secure-fingerprint, mml-secure-filter-keys)
(mml-secure-normalize-cust-name, mml-secure-select-keys)
(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
(mml-secure-self-recipients, mml-secure-recipients)
(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.
* lisp/gnus/mml-smime.el: Require epg;
refactor declaration and autoloading of epg functions.
(mml-smime-use): Doc fix.
(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
Obsolete.
(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
Use format instead of gnus-format-message.
(mml-smime-epg-secret-key-id-list): Remove variable.
(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
(mml-smime-epg-find-usable-secret-key): Remove functions.
(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.
Dmitry Gutov [Tue, 19 Jan 2016 05:03:41 +0000 (08:03 +0300)]
Rename methods in Ruby etags example file
* test/etags/ruby-src/test.rb: Rename the example methods to
correspond to the common terminology used in Ruby.
* test/etags/CTAGS.good:
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6: Adjust accordingly.
Dmitry Gutov [Tue, 19 Jan 2016 04:58:46 +0000 (07:58 +0300)]
Propertize backtick in 'def `(abc)' as symbol constituent
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Propertize backtick in 'def `(abc)' as symbol constituent.
(ruby-syntax-propertize-function):
Rename to ruby-syntax-propertize.
Eli Zaretskii [Mon, 18 Jan 2016 19:53:34 +0000 (21:53 +0200)]
Fix scrolling under scroll-preserve-screen-position on TTY
* src/window.c (window_scroll_line_based): When setting point to
preserve screen coordinates, don't let cursor enter either of the
two scroll margins. (Bug#22395)
Dmitry Gutov [Mon, 18 Jan 2016 19:11:46 +0000 (22:11 +0300)]
Add xref-based replacements for Dired search commands
* lisp/dired-aux.el (dired-do-find-regexp)
(dired-do-find-regexp-and-replace): New commands.
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html
* lisp/dired.el (dired-mode-map): Change bindings for `A' and
`Q' to the new commands.
* lisp/progmodes/xref.el (xref-query-replace)
(xref-collect-matches): Add progress reporters.
(xref--find-ignores-arguments): Return nil for zero ignores.
(xref--show-xrefs): Add an optional argument.
(xref-collect-matches): Drop the assert. 'find' accepts a
regular file in place of directory argument, too.
Eli Zaretskii [Mon, 18 Jan 2016 17:28:49 +0000 (19:28 +0200)]
Improve user documentation of Xref
* doc/emacs/maintaining.texi (Xref, Find Identifiers)
(Looking Up Identifiers, Identifier Search, List Identifiers):
Adjudicate comments by Dmitry Gutov <dgutov@yandex.ru>. See
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00650.html
for the details.
Eli Zaretskii [Mon, 18 Jan 2016 16:19:50 +0000 (18:19 +0200)]
Fix scrolling under scroll-preserve-screen-position and margins
* src/window.c (window_scroll_pixel_based): When setting point to
preserve screen coordinates, don't let cursor enter either of the
two scroll margins. Fix incorrect usage of
WINDOW_WANTS_HEADER_LINE_P and use WINDOW_HEADER_LINE_HEIGHT
instead of CURRENT_HEADER_LINE_HEIGHT. (Bug#22395)
Alan Mackenzie [Mon, 18 Jan 2016 13:32:22 +0000 (13:32 +0000)]
Desktop: protect users against inadvertant upgrading of desktop file.
An upgraded (version 208) desktop file cannot be read in Emacs < 25.
* etc/NEWS: Add an entry about upgrading a desktop file.
* lisp/desktop.el (desktop-file-version): Amend doc string.
(desktop-native-file-version, desktop-io-file-version): new variables.
(desktop-clear): Set desktop-io-file-version to nil.
(desktop-buffer-info): make the presence of the last item on the list
conditional on (>= desktop-io-file-version 208).
(desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u.
Amend the doc string. Add code to determine the output file version.
(desktop-create-buffer): Set desktop-io-file-version to the input file's
version.
Paul Eggert [Mon, 18 Jan 2016 01:16:12 +0000 (17:16 -0800)]
Initialize GnuTLS before calling gnutls_rnd
* src/gnutls.c (emacs_gnutls_global_init): Now extern.
Don’t set gnutls_global_initialized if gnutls_global_init fails.
* src/sysdep.c: Include "gnutls.h", and <gnutls/crypto.h>
if 2.12 or later, which has gnutls_rnd.
(emacs_gnutls_global_init, gnutls_rnd): New fallback
placeholder macros if before 2.12.
(init_random): Initialize gnutls globals before trying to
use gnutls_rnd.
Paul Eggert [Sun, 17 Jan 2016 22:10:26 +0000 (14:10 -0800)]
Port cleanup attribute to OpenBSD
The OpenBSD C compiler issues false alarms about strcpy, strcat, and
sprintf, and this messes up 'configure' when it tests for the cleanup
attribute. Work around the problem by using __has_attribute directly.
Problem reported by Joakim Jalap (Bug#22385).
* configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE.
* m4/ax_gcc_var_attribute.m4: Remove.
* src/conf_post.h (__has_attribute): Provide a substitute, for
non-GCC or older GCC compilers. All uses changed to assume
the substitute. Check for the cleanup attribute.
* src/emacs-module.c (module_has_cleanup): Just use __has_attribute.
Paul Eggert [Sun, 17 Jan 2016 20:12:08 +0000 (12:12 -0800)]
Prefer GnuTLS when acquiring random seed
This attempts to improve on the fix for Bug#22202.
* configure.ac (HAVE_DEV_URANDOM): Remove.
Check /dev/urandom existence at run time, not at build time,
since the device could exist in the former but not the latter.
* src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h.
(gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro.
(random_seed): New typedef.
(set_random_seed): New static function.
(seed_random): Use them.
(init_random): Use random_seed instead of uintmax_t, so as to
not consume more entropy than needed. Prefer gnutls_rnd if it
works; this avoids a redundant open of /dev/urandom on
GNU/Linux with modern GnuTLS.
Stefan Monnier [Sat, 16 Jan 2016 20:03:42 +0000 (15:03 -0500)]
lisp/nxml: Use syntax-tables for comments
* lisp/nxml/nxml-mode.el (nxml-set-face): Prepend.
(nxml-mode): Set syntax-ppss-table.
Use sgml-syntax-propertize-function for syntax-propertize-function.
Let font-lock highlight strings and comments.
(nxml-degrade): Don't touch "nxml-inside" property any more.
(nxml-after-change, nxml-after-change1): Remove functions.
(comment): Don't set fontify rule any more.
(nxml-fontify-attribute): Don't highlight the value any more.
(nxml-namespace-attribute-value-delimiter, nxml-namespace-attribute-value)
(nxml-comment-delimiter, nxml-comment-content): Remove faces.
* lisp/nxml/nxml-rap.el (nxml-scan-end): Remove.
(nxml-get-inside, nxml-inside-start, nxml-inside-end): Use syntax-ppss.
(nxml-clear-inside, nxml-set-inside): Remove.
(nxml-scan-after-change): Remove function.
(nxml-scan-prolog, nxml-tokenize-forward): Simplify.
(nxml-ensure-scan-up-to-date): Use syntax-propertize.
(nxml-move-outside-backwards):
* lisp/nxml/nxml-outln.el (nxml-section-tag-backward): Adjust to new
nxml-inside-start behavior.
Stefan Monnier [Sat, 16 Jan 2016 19:03:29 +0000 (14:03 -0500)]
* lisp/nxml: Use standard completion; it also works for company-mode
* lisp/nxml/nxml-mode.el (nxml-complete): Obsolete.
(nxml-completion-at-point-function): Remove.
(nxml-mode): Don't set completion-at-point-functions.
* lisp/nxml/rng-nxml.el (rng-nxml-mode-init): Set it here instead.
(rng-completion-at-point): Rename from rng-complete and mark it
non-interactive. It is now to be used as completion-at-point-function.
(rng-complete-tag, rng-complete-end-tag, rng-complete-attribute-name)
(rng-complete-attribute-value): Don't perform completion, but return
completion data instead.
(rng-complete-qname-function, rng-generate-qname-list): Add a few
arguments, previously passed via dynamic coping.
(rng-strings-to-completion-table): Rename from
rng-strings-to-completion-alist. Don't return an alist. Don't both
sorting and uniquifying.
* lisp/nxml/rng-valid.el (rng-recover-start-tag-open)
(rng-missing-attributes-message, rng-missing-element-message)
(rng-mark-missing-end-tags): Use explicit ".." in formats rather than
calling rng-quote-string everywhere.
Stefan Monnier [Sat, 16 Jan 2016 15:43:19 +0000 (10:43 -0500)]
Use sgml-electric-tag-pair-mode also in nxml-mode
* lisp/nxml/rng-nxml.el: Require sgml-mode.
(rng-nxml-easy-menu): Add entry for sgml-electric-tag-pair-mode.
(rng-complete-qname-function): Use complete-with-action.
* lisp/textmodes/sgml-mode.el (sgml-electric-tag-pair-before-change-function):
Let-bind forward-sexp-function, since nxml-mode binds it to
something incompatible.
* lisp/nxml/nxml-mode.el: Use setq-local and defvar-local.
Eli Zaretskii [Sat, 16 Jan 2016 15:30:11 +0000 (17:30 +0200)]
Improve documentation of dynamic modules
* doc/lispref/loading.texi (How Programs Do Loading): Update the
description of searching for files in 'load' when Emacs was built
with support for dynamic modules.
Eli Zaretskii [Sat, 16 Jan 2016 13:56:50 +0000 (15:56 +0200)]
Document renaming of selection-related functions
* doc/lispref/frames.texi (Window System Selections): Rename "x-*"
functions into the corresponding "gui-*" functions. Make the
description slightly less X-centric.
Fix incompatbilities with MS-Windows 2000 and older
* src/w32.c <multiByteToWideCharFlags>: New global variable.
(filename_to_utf16, filename_from_ansi, check_windows_init_file):
Use it instead of the literal MB_ERR_INVALID_CHARS.
(maybe_load_unicows_dll): Initialize multiByteToWideCharFlags as
appropriate for the underlying OS version. For details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
* src/w32.h: Declare multiByteToWideCharFlags.
* src/w32fns.c (Fx_file_dialog, Fw32_shell_execute)
(add_tray_notification): Use multiByteToWideCharFlags instead of
the literal MB_ERR_INVALID_CHARS.
(_resetstkoflw_proc): New typedef.
(w32_reset_stack_overflow_guard): Call _resetstkoflw via a
pointer, as this function is absent in msvcrt.dll shipped with W2K
and older systems.
Eli Zaretskii [Sat, 16 Jan 2016 09:23:42 +0000 (11:23 +0200)]
Mention in PROBLEMS an issue with MS-Windows NT4
* etc/PROBLEMS (MS-Windows): Mention the problem with Shell32.dll
on Windows NT4. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00835.html.
Ensure 8-byte aligned memory allocation on MS-Windows 9X
* src/w32heap.c (init_heap): Redirect malloc, realloc, and free to
special functions on Windows 9X. Refuse to dump Emacs on Windows 9X.
(malloc_after_dump_9x, realloc_after_dump_9x)
(free_after_dump_9x): New functions. (Bug#22379) See also
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html
for more details about the original problem.
Eli Zaretskii [Sat, 16 Jan 2016 07:55:00 +0000 (09:55 +0200)]
Fix tests for active region in hideif.el
* lisp/progmodes/hideif.el (hif-evaluate-macro, hide-ifdef-block): Use
'use-region-p' to test whether to operate on region, instead of
testing 'mark-active'.
Eli Zaretskii [Sat, 16 Jan 2016 07:40:12 +0000 (09:40 +0200)]
Fix interactive specs in some hideif.el commands
* lisp/progmodes/hideif.el (hif-evaluate-macro)
(hide-ifdef-undef, show-ifdef-block): Don't use '(interactive "r")'
in commands that should only act on the region if it's active.
Sam Steingold [Fri, 15 Jan 2016 16:53:05 +0000 (11:53 -0500)]
replace `tramp-compat-split-string' (removed) with `split-string'
(python-shell-tramp-refresh-process-environment)
(python-shell-calculate-pythonpath): use `split-string'
instead of defunct `tramp-compat-split-string'
* lisp/net/tramp-sh.el (tramp-methods) <sg>: Add. (Bug#22329)
(tramp-completion-function-alist-sg): New defconst.
(top): Completion function for "sg" is
`tramp-completion-function-alist-sg'.
* lisp/net/tramp.el (tramp-completion-function-alist): Adapt docstring.
(tramp-parse-etc-group, tramp-parse-etc-group-group): New defuns.
Eli Zaretskii [Fri, 15 Jan 2016 09:47:55 +0000 (11:47 +0200)]
Make 'random' seeds cryptographically secure if possible
* configure.ac: Check for "/dev/urandom".
* src/sysdep.c (init_random) [HAVE_DEV_URANDOM]: Read the stream
for the seed from "/dev/urandom".
[WINDOWSNT]: Obtain the stream for the seed from w32 APIs.
* src/fns.c (Frandom): Update the doc string to indicate that
system entropy is used when available.
* src/w32.c: Include wincrypt.h.
(w32_init_crypt_random, w32_init_random): New functions, use the
CryptGenRandom API.
(globals_of_w32): Initialize w32_crypto_hprov handle to zero.
* src/w32.h (w32_init_random): Add prototype.
* doc/lispref/numbers.texi (Random Numbers): Document more details
about 't' as the argument to 'random'.
* etc/NEWS: Mention that '(random t)' now uses a cryptographically
strong seed if possible.
Simen Heggestøyl [Thu, 14 Jan 2016 18:24:03 +0000 (19:24 +0100)]
Disallow parenthesis in non-pseudo CSS selectors
* lisp/textmodes/css-mode.el (css--font-lock-keywords): Disallow
parenthesis in selectors except for in the function notation that
might appear right after a pseudo-class.
* test/indent/scss-mode.scss: Add a test for it.
Michael Albinus [Thu, 14 Jan 2016 13:12:17 +0000 (14:12 +0100)]
Remove XEmacs compatibility in Tramp
* doc/misc/tramp.texi: Replace flags by their hard coded name.
Remove unused flags and the enclosed alternative text for XEmacs.
* doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs"
and "xemacs" flags to "unified" and "separate". Remove flags
"emacsgw", "emacsname", "emacsdir", "ftppackagename",
"emacsothername", "emacsotherdir" and "emacsotherfilename".
(trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre".
Eli Zaretskii [Wed, 13 Jan 2016 19:14:22 +0000 (21:14 +0200)]
Document obsoletion of 'intangible' and 'point-entered/left'
* doc/lispref/text.texi (Special Properties): Document the new
properties 'cursor-intangible' and 'cursor-sensor-functions'.
Document the obsolete status of 'intangible', 'pointer-left',
and 'point-entered' properties, and of 'inhibit-point-motion-hooks'.
* doc/lispref/display.texi (Overlay Properties): Document that
'intangible' overlay property is obsolete.