1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

128395 Commits

Author SHA1 Message Date
Mark Oteiza
071680b734 Enable erc-accidental-paste-threshold-seconds by default
* lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Set
default to 0.2 (Bug#25709).
2017-02-17 18:38:09 -05:00
Michal Nazarewicz
9f9863e502 Fix build failure caused by ‘Generate upcase and downcase tables from Unicode’
The [5ec3a584: Generate upcase and downcase tables from Unicode data]
commit broke bootstrap from a truly clean tree (e.g. a fresh clone or
one created with ‘make extraclean’), see
<http://hydra.nixos.org/build/48774928>.

The failure was caused by characters.el trying to read Unicode
property tables which aren’t available so early in the build process.

Wrap the part that requires Unicode property tables in a condition
checking if those are available.  If they aren’t they case and syntax
tables won’t be fully set but later on, the characters.el file will be
evaluated again and this time with Unicode properties available so
final Emacs ends up with the exact same case and syntax tables.
2017-02-17 16:36:44 +01:00
Katsumi Yamaoka
630e2d2e6a mm-add-meta-html-tag: Improve regexp
* lisp/gnus/mm-decode.el (mm-add-meta-html-tag):
Improve regexp to search html meta tag.
2017-02-17 10:05:56 +00:00
Katsumi Yamaoka
79f017d5c3 mm-shr: Prefer charset specified in html meta tag
* lisp/gnus/mm-decode.el (mm-shr): Prefer charset specified in html
meta tag than mail-parse-charset in the case there is no charset spec
in MIME header.
2017-02-17 09:52:09 +00:00
Glenn Morris
78f869687e Stop duplicating some custom-types in message.el
* lisp/gnus/message.el (user-mail-address, user-full-name):
No need to re-specify custom-type.
2017-02-16 21:43:23 -08:00
Glenn Morris
3ea055c90e Whitespace trivia in dunnet.el
* lisp/play/dunnet.el (dun-special-object, dun-put-objs)
(dun-rlogin-endgame): Whitespace trivia.
2017-02-16 20:33:24 -08:00
Glenn Morris
b91bfa1041 Explicit error on changing case of negative integers
* src/casefiddle.c (casify_object): Reject negative integers:
Emacs characters are positive integers.  (Bug#25684)
2017-02-16 20:24:37 -08:00
Dmitry Gutov
7cc95d4d86 Fix buffers update in vc-retrieve-tag
* lisp/vc/vc.el (vc-retrieve-tag): When the granularity is
`repository', use the repository root and pass it to
vc-resynch-buffer (bug#25714).
2017-02-17 03:01:05 +02:00
Paul Eggert
cb70725584 ; Spelling, punctuation and minor wording fixes 2017-02-16 09:18:21 -08:00
Paul Eggert
0b544b6764 * src/buffer.h: Fix indenting. 2017-02-16 07:55:41 -08:00
Paul Eggert
8929746489 Add sanity checks for Bswitch hash tables
* src/bytecode.c (exec_byte_code) [BYTE_CODE_SAFE]:
Check that operand is a hash table and hashes to ints.
2017-02-16 07:54:12 -08:00
Paul Eggert
064541af6a * src/keyboard.c (read_key_sequence): Fix integer-overflow glitch. 2017-02-16 07:54:12 -08:00
Vibhav Pant
501ad54626 bytecomp.el: Avoid unnecessary calculation for jump table addresses.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Don't do
  redundant operations while calculating the correct jump addresses
  from TAGs in jump tables.
2017-02-16 20:30:04 +05:30
Mark Oteiza
236648fe26 Minor changes in json.el
* lisp/json.el (json-advance): Simpler docstring.
(json-read-escaped-char): Use xdigit subform in rx expression.
(json-read-string): Just use = for char comparison.
2017-02-15 20:43:55 -05:00
Mark Oteiza
1b4442bee9 Don't expand body inside a let-binding when there are no bindings
* lisp/emacs-lisp/pcase.el (pcase-codegen): Only let-bind if VARS
is non-nil.
2017-02-15 20:40:46 -05:00
Glenn Morris
8ed8ef307d Handle user-mail-address being the empty string
* lisp/mail/feedmail.el (feedmail-fiddle-from):
* lisp/mail/rmail.el (rmail-unknown-mail-followup-to):
* lisp/mail/rmailsum.el (rmail-header-summary):
Belated update for 2002-09-29 startup.el change, 680ebfa, where
the value of user-mail-address during initialization was changed
from nil to the empty string.
2017-02-15 20:23:07 -05:00
Michael Albinus
adfb6f1dc2 Continue to fix bug#25607
* lisp/ido.el (ido-complete): Let-bind `non-essential' to nil.
(ido-file-name-all-completions-1): Do not bind `non-essential'.

* lisp/net/tramp.el: (tramp-completion-file-name-handler):
Improve autoloaded version.
(tramp-completion-file-name-handler): Remove old compat code.
Check only for `tramp-completion-mode-p'.
(tramp-completion-mode-p): Autoload.  Do not check any longer
for `last-input-event'.
(tramp-completion-handle-expand-file-name): Simplify.  (Bug#25607)
2017-02-15 19:42:34 +01:00
Michal Nazarewicz
6220faeb4e casing: don’t assume letters are *either* upper- or lower-case (bug#24603)
A compatibility digraph characters, such as Dž, are neither upper- nor
lower-case.  At the moment however, those are reported as upper-case¹
despite the fact that they change when upper-cased.

Stop checking if a character is upper-case before trying to up-case it
so that title-case characters are handled correctly.  This fixes one of
the issues mentioned in bug#24603.

¹ Because they change when converted to lower-case.  Notice an asymmetry
  in that for a character to be considered lower-case it must not be
  upper-case (plus the usual condition of changing when upper-cased).

* src/buffer.h (upcase1): Delete.
(upcase): Change to upcase character unconditionally just like downcase
does it.  This is what upcase1 was.

* src/casefiddle.c (casify_object, casify_region): Use upcase instead
of upcase1 and don’t check !uppercasep(x) before calling upcase.

* src/keyboard.c (read_key_sequence): Don’t check if uppercase(x), just
downcase(x) and see if it changed.

* test/src/casefiddle-tests.el (casefiddle-tests--characters,
casefiddle-tests-casing): Update test cases which are now passing.
2017-02-15 16:54:07 +01:00
Michal Nazarewicz
5ec3a58462 Generate upcase and downcase tables from Unicode data (bug#24603)
Use Unicode data to generate case tables instead of mostly repeating
them in lisp code.  Do that in a way which maps ‘Dz’ (and similar)
digraph to ‘dz’ when down- and ‘DZ’ when upcasing.

https://debbugs.gnu.org/cgi/bugreport.cgi?msg=89;bug=24603 lists all
changes to syntax table and case tables introduced by this commit.

* lisp/international/characters.el: Remove case-pairs defined with
explicit Lisp code and instead use Unicode character properties.

* test/src/casefiddle-tests.el (casefiddle-tests--characters,
casefiddle-tests-casing): Update test cases which are now working
as they should.
2017-02-15 16:54:06 +01:00
Michal Nazarewicz
0d4290650d Add tests for casefiddle.c (bug#24603)
Fixes cases marked FIXME upcoming in followup commits.

* test/src/casefiddle-tests.el (casefiddle-tests-char-properties,
casefiddle-tests-case-table, casefiddle-tests-casing-character,
casefiddle-tests-casing, casefiddle-tests-casing-byte8,
casefiddle-tests-casing-byte8-with-changes): New tests.
(casefiddle-tests--test-casing): New helper function for runnig
some of the tests.
2017-02-15 16:54:06 +01:00
Michal Nazarewicz
aeeb86c99d oldXMenu: add missing #include <string.h>
Some of the files in oldXMenu use functions from string.h without
including that header which results in compile warnings:

	ChgPane.c:46:5: warning: implicit declaration of function ‘strlen’
	ChgPane.c:46:20: warning: incompatible implicit declaration of
		built-in function ‘strlen’
	ChgSel.c:62:2: warning: implicit declaration of function ‘strlen’
	ChgSel.c:62:17: warning: incompatible implicit declaration of built-in
		function ‘strlen’
	Create.c:220:5: warning: implicit declaration of function ‘strcmp’
	InsPane.c:65:5: warning: implicit declaration of function ‘strlen’
	InsPane.c:65:20: warning: incompatible implicit declaration of
		built-in function ‘strlen’
	InsSel.c:68:5: warning: implicit declaration of function ‘strlen’
	InsSel.c:68:20: warning: incompatible implicit declaration of built-in
		function ‘strlen’
	InsSel.c:75:5: warning: implicit declaration of function ‘strcmp’

Add the necessary ‘#include <string.h>’.

oldXMenu/ChgPane.c, oldXMenu/ChgSel.c, oldXMenu/Create.c, oldXMenu/InsPane.c,
oldXMenu/InsSel.c: add missing #include <string.h>
2017-02-15 16:54:06 +01:00
Paul Eggert
e6041a05a0 Fixup recent rmail patch
* lisp/mail/rmail.el (rmail-epa-decrypt): Remove unused local.
2017-02-15 07:48:30 -08:00
Richard Stallman
971f4fabfa Rmail fix
* lisp/mail/rmail.el (rmail-epa-decrypt-1): Include the just-decrypted text
as element 4 of the value.
(rmail-epa-decrypt): Take the text to insert from that element.
2017-02-15 07:48:30 -08:00
Vibhav Pant
96e18ebb99 bytecomp-tests.el: Store all test forms in one constant.
* test/lisp/emacs-lisp/bytecomp-tests.el: Store all test expressions
in a single constant (byte-opt-testsuite-arith-data), add new forms
which generate lapcode with adjacent/redundant tags.
2017-02-15 21:12:44 +05:30
Glenn Morris
1b685e7a0b Small lispref edit
* doc/lispref/os.texi (User Identification):
Remove extraneous detail about user-mail-address.
2017-02-14 23:34:49 -08:00
Katsumi Yamaoka
8a9c468b6f Document fill-separate-heterogeneous-words-with-space (bug#25685)
* doc/lispref/text.texi (Filling):
Document fill-separate-heterogeneous-words-with-space (bug#25685).
2017-02-15 05:59:29 +00:00
Noam Postavsky
0a64666288 Test comment-multi-line = nil auto fill case too
* test/lisp/progmodes/js-tests.el (js-mode-auto-fill): Test with
`comment-multi-line' both nil and non-nil.
* lisp/newcomment.el (comment-multi-line): Mark safe if it's a
boolean.
* etc/NEWS: Mention that `js-mode' now sets `comment-multi-line'.
2017-02-14 22:29:56 -05:00
Katsumi Yamaoka
61ea36bb37 Don't delete leading and trailing space from CJK word (bug#25685)
* lisp/textmodes/fill.el (fill-delete-newlines):
Don't delete leading and trailing space from CJK word.
(fill-separate-heterogeneous-words-with-space):
New user option that controls it (bug#25685).
2017-02-15 01:26:59 +00:00
Juri Linkov
4e23578127 ‘M-s w RET word C-s’ repeats incremental search.
* lisp/isearch.el (isearch-new-nonincremental): New variable.
(with-isearch-suspended): Bind isearch-new-nonincremental to
isearch-nonincremental, and restore it afterwards.
(isearch-forward-exit-minibuffer, isearch-reverse-exit-minibuffer):
Set isearch-new-nonincremental to nil.  (Bug#25562)
2017-02-15 01:28:15 +02:00
Tom Tromey
3fb9f5452f Make vc-git detect conflict state for vc-dir
* lisp/vc/vc-git.el (vc-git-dir-status-state): New struct.
(vc-git-dir-status-update-file): New function.
(vc-git-after-dir-status-stage, vc-git-dir-status-goto-stage): Use
vc-git-dir-status-state; add 'ls-files-conflict state.
(vc-git-dir-status-files): Create a vc-git-dir-status-state.
2017-02-14 14:07:53 -07:00
Vibhav Pant
71b90192da byte-opt: Replace merged tags in jump tables too. (bug#25716)
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): While merging
  adjacent tags, make sure that the old tag is replaced in all jump
  tables, if any. This fixes the bytecode VM jumping to the wrong
  address in compiled cond forms where the body of a clause was a loop
  of any sort.
2017-02-14 21:53:26 +05:30
Eli Zaretskii
c1eb871e92 ; * test/file-organization.org: Minor copyedits. 2017-02-14 18:17:51 +02:00
Glenn Morris
3f383a4668 Remove overly broad element from default mail-dont-reply-to-names
* lisp/mail/mail-utils.el (mail-dont-reply-to):
Do not include just "user@" in mail-dont-reply-to-names, and simplify.
Ref: lists.gnu.org/archive/html/help-gnu-emacs/2017-02/msg00049.html
* lisp/gnus/message.el (message-dont-reply-to-names): Doc fix.
* doc/misc/message.texi (Wide Reply): Tiny fix re dont-reply-to-names.
2017-02-13 23:36:17 -08:00
Juri Linkov
31b4d9a137 * etc/NEWS: Mention query-replace-from-to-separator. (Bug#25482) 2017-02-14 02:04:28 +02:00
Vibhav Pant
fffd4ffd74 ; etc/TODO: Remove 'switch' item, as it is now implemented. 2017-02-13 22:56:17 +05:30
Arash Esbati
271dcf8652 Match all characters in optional argument of \documentclass
* lisp/textmodes/reftex.el (reftex-TeX-master-file): Match all
characters in optional argument containing name of the main file.
2017-02-13 17:07:12 +01:00
Vibhav Pant
cb410433e0 Merge branch 'master' into feature/byte-switch 2017-02-13 17:07:36 +05:30
Vibhav Pant
e742450427 ; Add more documentation for byte-switch related code. 2017-02-13 16:44:06 +05:30
Katsumi Yamaoka
4b18ef7ba3 Fix non-ASCII text encoding (bug#25658)
* lisp/gnus/mm-bodies.el (mm-encode-body):
Fix non-ASCII text encoding (bug#25658).
2017-02-13 08:30:28 +00:00
Vibhav Pant
c24e8290fa test/lisp/emacs-lisp/bytecomp-tests.el: Add more tests for switch. 2017-02-13 13:18:54 +05:30
Glenn Morris
ef6132c55f Fix recent bootstrap issue by moving string-to-list
* lisp/international/mule-util.el (string-to-list, string-to-vector):
Move from here...
* lisp/subr.el (string-to-list, string-to-vector): ...to here.
The implementation is trivial and at least string-to-list
has ended up being needed early during bootstrap.
2017-02-12 19:02:56 -08:00
Glenn Morris
04ea55fa47 Doc fixes related to mail-host-address
* lisp/startup.el (mail-host-address): Doc fix.
* doc/lispref/os.texi (System Environment):
Remove extraneous details of mail-host-address.
2017-02-12 17:53:13 -08:00
Glenn Morris
e9ec1c5b26 Simplify time-stamp mail host usage
* lisp/time-stamp.el (time-stamp-mail-host-name): Remove function.
(time-stamp-string-preprocess): Handle "h" (mail host) directly.
2017-02-12 17:44:46 -08:00
Glenn Morris
ee9970734f Doc fix for vhdl-mode re mail-host-address
* lisp/progmodes/vhdl-mode.el (vhdl-file-header): Doc fix.
(mail-host-address): Do not add to vhdl-related custom group,
since vhdl-template-replace-header-keywords doesn't use it.
2017-02-12 17:36:33 -08:00
Mark Oteiza
4c1d7acf81 Substitute leading $HOME/ in xdg-user-dirs
* lisp/xdg.el (xdg--substitute-home-env): New function.
(xdg--user-dirs-parse-line): Use it.
(xdg-user-dir): Expand ~/ in xdg-user-dirs values.
2017-02-12 20:31:38 -05:00
Mark Oteiza
01ebe5dc0b * lisp/buff-menu.el: Turn on lexical-binding. 2017-02-12 20:02:26 -05:00
Juri Linkov
d8cca4d8c5 * lisp/replace.el (query-replace-from-to-separator): Move propertize
and char-displayable-p test to query-replace-read-from.
Add choice nil to disable this feature.
(query-replace-read-from): Don't reevaluate custom setting.
Use char-displayable-p to test the first non-whitespace character
in query-replace-from-to-separator, use " -> " when fails.
Add prompt for the case when separator is nil but
query-replace-defaults is non-nil.
Remove unused test for regexp-flag.
Thanks to Thierry Volpiatto <thierry.volpiatto@gmail.com>
2017-02-13 02:37:52 +02:00
Karl Fogel
a84da83c1a Convert more uses of looking-at' to following-char'
This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
(commit 91478f4623) with more of the same.

* lisp/bookmark.el (bookmark-send-edited-annotation):
  (bookmark-bmenu-execute-deletions): Replace instances of looking-at
  with char comparisons using following-char.
2017-02-12 17:21:06 -06:00
Paul Eggert
d4429dfd49 Fix typos in tests for lax-plist-get etc.
Problem reported by Eli Zaretskii (Bug#25606#62).
* test/src/fns-tests.el (test-cycle-lax-plist-get)
(test-cycle-plist-put, test-cycle-lax-plist-put):
Fix tests to match behavior.
2017-02-12 12:55:29 -08:00
Michael Albinus
0769c99578 Fix bug#25607
* lisp/net/tramp.el (tramp-completion-file-name-handler):
Improve autoloaded version.
(tramp-autoload-file-name-handler): Avoid recursive load.
(tramp-completion-handle-expand-file-name): Handle empty NAME.
(Bug#25607)
2017-02-12 18:19:32 +01:00