1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

133118 Commits

Author SHA1 Message Date
Noam Postavsky
302e500087 Move epa-pinentry-mode to epg-config (Bug#26298)
* lisp/epa.el (epa-pinentry-mode): Make into obsolete alias for...
* lisp/epg-config.el (epg-pinentry-mode): ...this new user option.
* lisp/epg.el (epg-context): Use it as the default value for
pinentry-mode.
* etc/NEWS: Announce name change.

* lisp/epa-file.el (epa-file-insert-file-contents)
(epa-file-write-region):
* lisp/epa.el (epa-decrypt-file, epa-sign-file)
(epa-encrypt-file, epa-decrypt-region)
(epa-sign-region, epa-encrypt-region): Don't change
epg-context-pinentry-mode from the default.
2018-05-23 07:53:58 -04:00
Noam Postavsky
21ab346a07 Drop some epg/epa backwards compat code for ancient Emacs versions
* lisp/epa.el (epa--select-safe-coding-system): Remove,
`select-safe-coding-system' has been present since Emacs 20.3.
(epa--encode-coding-string, epa--decode-coding-string):
* lisp/epg.el (epg--decode-coding-string, epg--encode-coding-string)
(epg--clear-string): Remove, the corresponding Emacs functions are so
old they don't show up in NEWS.  Furthermore, the fallback for
the *-coding-string functions was `identity' which wouldn't have
worked anyway, since it only takes a single argument.
(epg--make-temp-file): Remove, `make-temp-file' has been present since
Emacs 21.1.
* lisp/epg-config.el (epg-gpg-program, epg-gpgsm-program)
(epg-gpgconf-program, epg-gpg-home-directory)
(epg-passphrase-coding-system, epg-debug): Remove unneeded :group
parameter.
2018-05-23 07:53:57 -04:00
Tino Calancha
bab73230d1 Fix corner case in query-replace-regexp undo
This commit fixes Bug#31492.
* lisp/replace.el (replace-match-maybe-edit): Preserve match data.

* test/lisp/replace-tests.el (query-replace-undo-bug31492): Add test.
2018-05-23 18:20:36 +09:00
Glenn Morris
cc130d13d4 Merge from origin/emacs-26
e3f00f5 (origin/emacs-26) Clarify when to use advice-add vs add-function
c0f3e6b Minor formatting tweak in the Emacs manual
fadf653 Update comments in Intro to Emacs Lisp
52ccb24 ; * doc/os.texi (Batch Mode): use = after --eval
d65430f * etc/NEWS: Mention change in `edebug-prin1-to-string'.
ef4aec1 ; * doc/lispref/hash.texi (Defining Hash): Fix typos.
2981952 Another attempt to fix sql.el
b1b96d7 Update binding of 'M-.' in Intro to Emacs Lisp
b239a09 Fix a typo in last change in sql.el
0d8bae5 Fix capitalization of mail headers
845fe03 Fix buffer names in sql.el
a3885f5 Minor fixes in the Emacs manual
542f830 Fix a typo in rmail.texi
eb0bc6f * etc/PROBLEMS: Document Bug#31305.

Conflicts:
	doc/emacs/sending.texi
	etc/NEWS
2018-05-23 01:37:54 -07:00
Glenn Morris
e5ff7f788e ; Merge from origin/emacs-26
The following commit was skipped:

152a556 (gnus-blocked-images): Clarify privacy implications
2018-05-23 01:35:06 -07:00
Glenn Morris
c120037be0 Merge from origin/emacs-26
73bc6f8 Fix a typo in describing input methods
6b4bafe ; Add a comment to emacs-lisp-intro.texi
2018-05-23 01:35:05 -07:00
Noam Postavsky
e3f00f5637 Clarify when to use advice-add vs add-function
* lisp/emacs-lisp/nadvice.el (add-function): Note in docstring that
advice-add should be used for named functions.
2018-05-22 20:08:01 -04:00
João Távora
c73e6a3111 More helpful docstrings for tests of electric-tests.el
* test/lisp/electric-tests.el (electric-pair-define-test-form):
Improve automatically generated docstring.
2018-05-22 23:05:17 +01:00
Paul Eggert
e18600dfbd Work around GCC bug with function attributes
* src/alloc.c (PNTR_ADD): Put attributes after ‘static’ and before
returned type.  Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-05/msg00559.html
2018-05-22 13:05:48 -07:00
Paul Eggert
02f303d75f Fix failed assertion when load-force-doc-strings
Problem reported by Philipp Stephani (Bug#31556).
* src/lread.c (read_vector): When load_force_doc_strings, check
for byte code vectors that are invalid because they are too short.
* test/src/lread-tests.el (lread-invalid-bytecodes): New test.
2018-05-22 12:42:16 -07:00
Eli Zaretskii
c0f3e6b56b Minor formatting tweak in the Emacs manual
* doc/emacs/custom.texi (Directory Variables): Don't have 2
footnotes back to back, it looks bad in HTML.  (Bug#31555)
2018-05-22 20:27:28 +03:00
Eli Zaretskii
fadf6535c0 Update comments in Intro to Emacs Lisp
* doc/lispintro/emacs-lisp-intro.texi: Explain in the comments
what are roman page numbers in Preface about.  (Bug#31541)
2018-05-22 20:03:09 +03:00
Paul Eggert
a51725280a Minor tweaks to recent fix for Bug#31545
* src/xwidget.c (webkit_javascript_finished_cb)
(Fxwidget_webkit_execute_script): Use intptr_t to avoid warnings
in the (unlikely) event that ptrdiff_t and void * differ in width.
(save_script_callback): Simplify by using xlispdstrdup and
larger_vector.
2018-05-22 09:14:03 -07:00
Philipp Stephani
52ccb24aba ; * doc/os.texi (Batch Mode): use = after --eval 2018-05-22 15:33:22 +02:00
Michael Albinus
19e642fdb0 Extend secrets.el by searching for object paths.
* lisp/net/secrets.el (secrets-search-item-paths): New function.
(secrets-search-items): Use it.
(secrets-create-item): Adapt docstring.

* test/lisp/net/secrets-tests.el (secrets-test04-search): Extend test.
2018-05-22 11:32:33 +02:00
Andreas Schwab
d2d35febf2 * src/xwidget.c (Fxwidget_webkit_goto_uri): Encode uri. 2018-05-22 00:09:24 +02:00
Noam Postavsky
d65430f6cb * etc/NEWS: Mention change in `edebug-prin1-to-string'. 2018-05-21 17:11:29 -04:00
Andreas Schwab
8811c2408d Make xwidget-webkit-execute-script safe against GC (Bug#31545)
* src/xwidget.h (struct xwidget): Add script_callbacks.
* src/xwidget.c (save_script_callback): New function.
(Fxwidget_webkit_execute_script): Use it.  Encode script
before passing to execution engine.  Always use a callback.
(webkit_javascript_finished_cb): Deallocate script.
(kill_buffer_xwidgets): Deallocate remaining scripts.
(Fxwidget_webkit_zoom): Doc fix.
(Fxwidget_resize): Doc fix.
2018-05-21 22:51:20 +02:00
Paul Eggert
7b9fb7ace4 Don’t assume ordering in make-process/mix-stderr
* test/src/process-tests.el (process-tests--mixable): New function.
(make-process/mix-stderr): Don’t assume stdout is merged before
stderr.  POSIX does not require this, and the assumption failed to
hold on my Fedora 28 platform.  See Bug#31214.
2018-05-21 12:31:54 -07:00
Paul Eggert
79f15092b9 Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need.  Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 11:43:07 -07:00
João Távora
f21db9e120 Fix Flymake's ruby-mode tests when user has "rubocop" installed
The Flymake test suite fails if the "rubocop" program is installed,
because the ruby-flymake-rubocop backend is selected automatically by
ruby-flymake-auto.  The test was designed for ruby-flymake-simple,
tough, and fails.

* test/lisp/progmodes/flymake-tests.el (ruby-backend): Ensure
this test runs exclusively with the ruby-flymake-simple backend.
2018-05-21 19:23:42 +01:00
Eli Zaretskii
ef4aec14d1 ; * doc/lispref/hash.texi (Defining Hash): Fix typos. 2018-05-21 21:08:39 +03:00
Michael Albinus
ab37ceb9ee Fix Bug#31489
* doc/misc/tramp.texi (Frequently Asked Questions):
Mention `tramp-ignored-file-name-regexp'.  Improve index.

; * etc/NEWS: Mention `tramp-ignored-file-name-regexp'.

* lisp/net/tramp.el (tramp-ignored-file-name-regexp): New defcustom.
(tramp-tramp-file-p): Use it.  Check also for `tramp-mode'.
(tramp-file-name-handler): Don't check for `tramp-mode'.  (Bug#31489)

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax):
Extend test.
2018-05-21 19:48:15 +02:00
Eli Zaretskii
2981952b6c Another attempt to fix sql.el
* lisp/progmodes/sql.el (sql-product-interactive): Fix calculation
of the SQL buffer name.  (Bug#31446)
2018-05-21 18:43:03 +03:00
Eli Zaretskii
b1b96d7cd9 Update binding of 'M-.' in Intro to Emacs Lisp
* doc/lispintro/emacs-lisp-intro.texi (On Reading this Text)
(Finding More, Buffer Related Review, Buffer Exercises)
(Find a File, Conclusion): 'M-.' is now bound to
'xref-find-definitions'.  (Bug#31542)
2018-05-21 18:01:57 +03:00
Eli Zaretskii
b239a096f1 Fix a typo in last change in sql.el
* lisp/progmodes/sql.el (sql-product-interactive): Use 'null',
not 'zerop'.  (Bug#31446)
2018-05-21 05:33:57 +03:00
Eli Zaretskii
4010631fe9 Revert part of the previous change
* doc/misc/message.texi:
* doc/misc/efaq.texi:
* doc/emacs/sending.texi:
* doc/emacs/rmail.texi: Revert the CC => Cc etc. conversions.
2018-05-20 21:27:42 +03:00
Paul Eggert
ee2916c6d2 Use “Cc” for email copies, as per RFC 5322.
Also fix similar problems with Bcc, Fcc, In-Reply-To,
and similar email headers.  See thread starting at:
https://lists.gnu.org/r/emacs-devel/2018-05/msg00463.html
2018-05-20 11:02:50 -07:00
Noam Postavsky
a32412b8aa * make-dist: Add '--no-info' option. 2018-05-20 09:47:36 -04:00
Alan Mackenzie
bb591f139f Enhance CC Mode's fontification, etc., of unterminated strings.
String delimiters, including escaped new lines, of correctly terminated
strings are left in font-lock-string-face.  All others get
font-lock-warning-face.  The latter get syntax-table text properties on the
opening string delim and the "terminating EOL".

Correct two miscellaneous bugs: the handling of text properties on Java Mode's
generic delimiters; the handling of c-just-done-before-change.

* lisp/progmodes/cc-defs.el (c-point): New position 'eoll "end of logical line".
(c-characterp): New macro.

* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-string): Removed.
(c-basic-matchers-before): Use a simple matcher in place of the form around
c-font-lock-invalid-string.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add
c-before-change-check-unbalanced-strings to the value for all modes except AWK
Mode.  Also add c-before-change-check-<>-operators to Java Mode, correcting an
error in that mode's handling of generic delimiters.
(c-before-font-lock-functions): Add c-after-change-re-mark-unbalanced-strings
to the value for all modes except AWK Mode.
(c-single-quotes-quote-strings, c-string-delims): New lang variables for
future enhancements.
(c-string-innards-re-alist): New lang variable.

* lisp/progmodes/cc-mode.el (c-just-done-before-change): Do not set this
variable when a change is the alteration of text properties.
(c-basic-common-init): Set parse-sexp-lookup-properties (and the XEmacs
equivalent) also for Pike Mode.
(c-neutralize-CPP-line): No longer neutralize unbalanced quotes here.
(c-unescaped-nls-in-string-p, c-multiline-string-start-is-being-detached)
(c-pps-to-string-delim, c-before-change-check-unbalanced-strings)
(c-after-change-re-mark-unbalanced-strings): New functions.
(c-after-change): Fix a bug with the handling of c-just-done-before-change.
2018-05-20 13:28:14 +00:00
Eli Zaretskii
0d8bae5c55 Fix capitalization of mail headers
* doc/emacs/sending.texi (Mail Format, Mail Headers)
(Mail Aliases, Header Editing): Use consistent capitalization of
CC, BCC, and FCC.  (Bug#31532)
2018-05-20 12:08:03 +03:00
Eli Zaretskii
e2f68c144f * etc/HELLO: More reasonable placement of 'charset' properties. 2018-05-20 11:53:03 +03:00
Eli Zaretskii
845fe038e7 Fix buffer names in sql.el
* lisp/progmodes/sql.el (sql-product-interactive): Fix the way the
buffer name is determined by prefix arg.  (Bug#31446)
2018-05-20 10:25:26 +03:00
Eli Zaretskii
a3885f5653 Minor fixes in the Emacs manual
* doc/emacs/misc.texi (Gnus Group Buffer): Fix a typo.  (Bug#31534)
(Single Shell): Rephrase an unclear sentence.  (Bug#31535)
(Remote Host): Use @command where appropriate.  (Bug#31536)
2018-05-20 10:11:05 +03:00
Eli Zaretskii
542f830247 Fix a typo in rmail.texi
* doc/emacs/rmail.texi (Rmail Summary Edit): Add markup to 'nil'.
(Bug#31533)
2018-05-19 23:08:38 +03:00
Paul Eggert
51c1fdcccf * admin/notes/unicode: HELLO is again UTF-8. 2018-05-19 10:01:49 -07:00
Eli Zaretskii
3589c966b7 Use Enriched mode in etc/HELLO to keep charset information
This allows to encode HELLO in UTF-8, thus supporting the entire
repertory of Unicode, while still keeping the charset info where
that is important.  Suggested by Michael Welsh Duggan <mwd@md5i.com>.
* lisp/textmodes/enriched.el (enriched-translations): Add
translations for 'charset'.
(enriched-decode-charset, enriched-handle-charset-prop): New
functions.
* lisp/facemenu.el (facemenu-special-menu): Add sub-menu for
'charset' property.
(facemenu-set-charset): New function.
(facemenu-remove-special): Remove the 'charset' property as well.

* etc/NEWS: Announce the new feature of Enriched mode.
* etc/HELLO: Recode in UTF-8 and place under Enriched mode.

* doc/emacs/text.texi (Enriched Properties): Mention the support
for 'charset'.
2018-05-19 18:17:38 +03:00
Paul Eggert
593c367b07 * src/alloc.c: Fix comment. 2018-05-18 15:53:21 -07:00
Paul Eggert
a1c925fd41 Port to GCC 8 -fsanitize=undefined
In GCC 8, gcc -fsanitize=undefined flags the undefined behavior
that Emacs relies on in its XPNTR and XSYMBOL low-level functions.
Disable undefined sanitization in these functions.  Although this
disabling doesn’t suffice if DEFINE_KEY_OPS_AS_MACROS is true, it
works for -fsanitize=undefined -DINLINING=0, which is good enough.
* src/alloc.c (macro_PNTR_ADD): New macro.
(PNTR_ADD): New function and macro.
The function disables -fsanitize=undefined.
(macro_XPNTR): Use it.
* src/conf_post.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
* src/lisp.h (XSYMBOL): Disable -fsanitize=undefined.
2018-05-18 15:49:48 -07:00
Paul Eggert
eb0bc6f7b3 * etc/PROBLEMS: Document Bug#31305. 2018-05-18 09:26:26 -07:00
Lars Ingebrigtsen
152a5569c8 (gnus-blocked-images): Clarify privacy implications
* lisp/gnus/gnus-art.el (gnus-blocked-images): Clarify the privacy
implication of altering the value of this variable.

(cherry picked from commit f4d9fd3dd4)
2018-05-18 17:18:58 +03:00
Lars Ingebrigtsen
f4d9fd3dd4 (gnus-blocked-images): Clarify privacy implications
* lisp/gnus/gnus-art.el (gnus-blocked-images): Clarify the privacy
implication of altering the value of this variable.
2018-05-18 16:05:11 +02:00
Eli Zaretskii
3aab8626ba Fix decoding of directories when "~" includes non-ASCII chars
* src/fileio.c (Fexpand_file_name): Don't build multibyte strings
from unibyte non-ASCII strings when NAME and DEFAULT_DIRECTORY
have different multibyteness, as this adds bytes to the byte
sequence, and in some situations, e.g., when the home directory
includes non-ASCII characters, can fail file APIs.  (Bug#30755)

* lisp/startup.el (normal-top-level): Make sure default-directory
is set to a multibyte string when decoded on MS-Windows.
2018-05-18 16:34:19 +03:00
Eli Zaretskii
73bc6f8693 Fix a typo in describing input methods
* lisp/help-mode.el (help-make-xrefs): Fix a typo.  (Bug#31448)
2018-05-18 10:58:11 +03:00
Eli Zaretskii
6b4bafedbc ; Add a comment to emacs-lisp-intro.texi
* doc/lispintro/emacs-lisp-intro.texi: Add a comment with the
rationale for the manual's seemingly too large size.
2018-05-18 09:31:24 +03:00
Filipp Gunbin
60ff810144 Fix bugs in `auth-source-netrc-parse-one'.
* lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match
  data is not overwritten in `auth-source-netrc-parse-next-interesting'.
  Ensure that blanks are skipped before and after going over comments
  and eols.
* test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.
2018-05-17 18:44:31 +03:00
Michael Albinus
01120ec3d2 Fix creation of Secret Service items in auth-source
* lisp/auth-source.el (auth-source-secrets-create): Use ´apply'.
(auth-source-secrets-saver): Handle `auth-source-save-behavior'
equal t.

* lisp/net/secrets.el (secrets-get-items): Do not call
`secrets-open-session' here ...
(top): ... but here.

* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Bind
`auth-source-save-behavior' to t.  Cleanup.

* test/lisp/net/secrets-tests.el (secrets-test00-availability):
After loading secets.el, a session is already opened.
(secrets-test02-collections, secrets-test03-items)
(secrets-test04-search): Open a new session.
2018-05-16 11:22:51 +02:00
Dima Kogan
4c3cd27df9 Give '$' punctuation syntax in make-mode (Bug#24477)
* lisp/progmodes/make-mode.el (makefile-mode-syntax-table): Set syntax
of '$' to punctuation.
2018-05-15 19:33:34 -04:00
Noam Postavsky
2fda57c6fb Simplify eshell arg processing with (pop (nthcdr ...))
* lisp/eshell/esh-opt.el (eshell--set-option)
(eshell--process-args): Use (pop (nthcdr ...)) instead of writing it
out by hand.
2018-05-15 19:32:49 -04:00
Jay Kamat
a4c616e27a esh-opt.el: Add a :parse-leading-options-only argument (Bug#28323)
* lisp/eshell/esh-opt.el (eshell-eval-using-options): Add a new
:parse-leading-options-only argument which ignores dash/switch
arguments after the first positional argument.
(eshell--process-args): Abort processing of arguments if we see one
positional argument and :parse-leading-options-only is set.
* lisp/eshell/em-tramp.el (eshell/sudo): Use
:parse-leading-options-only, to avoid parsing subcommand switches as
switches of sudo itself.
* test/lisp/eshell/esh-opt-tests.el: Add tests for new and old behavior.
2018-05-15 19:32:49 -04:00