Commit graph

71278 commits

Author SHA1 Message Date
Noam Postavsky
23e9beff8c Merge from emacs-26
55c9bb9f3c Fix comint-get-old-input-default for output field case (Bu...
26819cd1c0 ; ChangeLog.3: Fix typo.
e35a08ea4b Prevent infloop in 'delete-trailing-whitespace'

* lisp/progmodes/cperl-mode.el:
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-mode.el: Fix tabs mixed with space preventing
commit hook from succeeding.
2018-06-10 18:41:47 -04:00
Noam Postavsky
8a1576cc03 Fix term.el cursor movement at bottom margin (Bug#31690)
* lisp/term.el (term-handle-ansi-escape) <\E[B cud>: Allow moving the
cursor to the bottom margin line, rather than stopping one line
before.
2018-06-10 17:57:50 -04:00
Reuben Thomas
4c3fae3cf2 Call enchant-lsmod correctly when Enchant is installed with a suffix
* lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a
version suffix on the binary name, so enchant-2 is converted to
enchant-lsmod-2, not enchant-2-lsmod.  (Bug#31761)

(cherry picked from commit a402d9aacb)
2018-06-10 19:53:39 +03:00
Daniel Colascione
16015dea97 Fix typo in docstring
* lisp/term/xterm.el: (xterm-paste-ending-sequence): Fix typo
2018-06-09 17:46:05 -07:00
Alan Mackenzie
89e2683d44 Implement the C++11 "using" type definition.
Cease using the long obsolete c++-template-syntax-table.

* lisp/progmodes/cc-align.el (c-lineup-template-args): Cease using
c++-template-syntax-table.

* lisp/progmodes/cc-engine.el (c-beginning-of-inheritance-list)
(c-search-decl-header-end, c-beginning-of-decl-1, c-end-of-decl-1)
(c-guess-continued-construct, c-guess-basic-syntax): Cease using
c++-template-syntax-table.
(c-guess-basic-syntax): Add CASE 5D.6 to handle C++11's "using" type
definition.

* lisp/progmodes/cc-langs.el (c++-make-template-syntax-table)
(c++-template-syntax-table): Remove.
(c-equals-type-clause-kwds, c-equals-type-clause-key): New language
constants/variables.
2018-06-09 21:39:43 +00:00
Daniel Colascione
a66a3b7f51 Improve robustness xterm event processing
We used to treat the start of a focus-in, focus-out, and the start of
a paste sequence as normal events bound in global-map, but this
approach produces problems when we recognize events in the middle of
actions that don't immediately dispatch to the command loop.

Now we handle these events internally inside read-key, translating the
focus events to nothing and paste-start into an xterm-paste event that
neatly encapsulates the entire paste sequence.

* lisp/term/xterm.el:
(xterm-paste): Accept an event argument; insert text from event.
(xterm-translate-focus-in,xterm-translate-focus-out)
(xterm-translate-bracketed-paste): New functions.
(xterm-handle-focus-in,xterm-handle-focus-out): Remove.
(xterm-rxvt-function-map): Bind new translation functions.
2018-06-09 13:18:17 -07:00
Alan Mackenzie
66ad98685a CC Mode: In brace lists, anchor an elt on its predecessor, not on first elt
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): At the end, accept
"." as a unary operator (which it now is in brace lists in, e.g., C Mode).
(c-guess-basic-syntax): Just before CASE 9C, move back to the previous brace
list entry in the block, rather than to the first one.
2018-06-09 17:34:46 +00:00
Eli Zaretskii
36bbdfc017 Update Unicode data files to version 11.0.0 of Unicode
* admin/unidata/UnicodeData.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/copyright.html:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/BidiBrackets.txt: Import from Unicode 11.0.
* admin/notes/unicode: Update the URL for OTF script tags.

* lisp/international/mule-cmds.el (ucs-names): Update unused ranges.
* lisp/international/fontset.el (script-representative-chars): Add
hanifi-rohingya, old-sogdian, sogdian, dogra, gunjala-gondi,
makasar, and medefaidrin.
(otf-script-alist): Add old-hungarian.
* lisp/international/characters.el (tbl): Add syntax entries for
Supplemental Mathematical Operators, Miscellaneous Symbols and
Arrows, and Supplemental Punctuation.
Update the list of wide characters.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part2): Update to match
admin/unidata/NormalizationTest.txt.

* doc/lispref/nonascii.texi (Character Properties): Update the
reference to the Unicode Standard.
* doc/misc/efaq.texi (New in Emacs 26):
* etc/NEWS: Mention compatibility with Unicode 11.0.
2018-06-09 15:41:21 +03:00
Eli Zaretskii
ca369a8ca6 Allow to reset Deleted flag when exporting messages in Rmail
* lisp/mail/rmailout.el (rmail-output-reset-deleted-flag): New
defcustom.
(rmail-output): When 'rmail-output-reset-deleted-flag' is non-nil,
reset the Deleted flag of the appended messages, and if COUNT is
greater than 1, do not ignore deleted messages.  Update the doc
string accordingly.  (Bug#31271)

* doc/emacs/rmail.texi (Rmail Output): Document
'rmail-output-reset-deleted-flag'.

* etc/NEWS: Mention the new user option.
2018-06-09 11:03:20 +03:00
Basil L. Contovounesios
c8dd1bc0fb Fix default candidate of find-face-definition
* lisp/emacs-lisp/find-func.el (find-function-read): Use
face-at-point instead of variable-at-point for faces. (bug#31699)
2018-06-09 09:52:54 +03:00
Daniel Colascione
c67befd662 Avoid unnecessary readahead early in TTY frame init
We query some properties of the terminal early in initialization, and
just before we do, we perform ordinary redisplay.  This redisplay can
result in unsightly flickering if we change some aspects of the
display immediately afterward and redisplay again.  By avoiding
redisplay in xquery--query as long as we get timely responses from the
terminal, we can avoid this early unwanted redisplay.

* lisp/term/xterm.el:
(xterm-query-redisplay-timeout): New variable.
(xterm--read-event-for-query): New function.
(xterm--report-background-handler,xterm--version-handler,xterm--query):
Call it.
2018-06-08 23:22:43 -07:00
Daniel Colascione
6fdc3fac56 Support terminal focus notifications
* lisp/frame.el (handle-focus-in,handle-focus-out): Make event
argument optional.
(blink-cursor-check): Make sure that the current frame is a
window-system frame before restarting the blink timer. TTY frames
can get focus, but don't need a blink timer because the terminal
will do the blinking.

* lisp/term/xterm.el
(xterm-handle-focus-in,xterm-handle-focus-out): New functions.
(xterm-rxvt-function-map): Recognize focus notification sequences.
(xterm--init-focus-tracking): New function.
(terminal-init-xterm): Call it.
2018-06-08 22:51:50 -07:00
Daniel Colascione
d1febb42f4 Make setting inhibit-startup-screen in early init work
* lisp/startup.el (command-line): Bind `inhibit-startup-screen'
around loading the site file instead of unconditionally
resetting it.
2018-06-08 16:22:35 -07:00
João Távora
21c6534ef3 New flymake-start-on-save-buffer custom variable
Fixes: bug#21419

* lisp/progmodes/flymake.el (flymake-after-save-hook): Use
flymake-start-on-save-buffer.
(flymake-start-on-save-buffer): New custom variable.
(flymake-start-on-flymake-mode): Tweak docstring.
2018-06-08 19:35:48 +01:00
Alan Mackenzie
fe06f643b2 CC Mode: Fontify unbalanced quotes in unconstrained multiline strings, etc.
("Unconstrained" meaning that every string is multiline, without needing such
special marking as used by Pike Mode.)

* lisp/progmodes/cc-mode.el (c-pps-to-string-delim): Don't process the char
before BOB.
(c-multiline-string-check-final-quote): New function.
(c-bc-changed-stringiness): New variable.
(c-before-change-check-unbalanced-strings): Add handling for unconstrained
multiline strings.
(c-after-change-re-mark-unbalanced-strings): Add handling for unconstrained
multiline strings.  Handle escaped double quotes more accurately.
2018-06-08 16:42:18 +00:00
Eli Zaretskii
0214ffbe60 Clarify doc string of 'update-glyphless-char-display'
* lisp/international/characters.el
(update-glyphless-char-display): Doc fix.  (Bug#31730)
2018-06-08 18:15:26 +03:00
Daniel Colascione
416ba369c4 Offer to open large files without modes
* lisp/files.el:
(files--ask-user-about-large-file): New function.
(abort-if-file-too-large): Call it.
(find-file-noselect): Support new raw open.
2018-06-07 22:05:33 -07:00
Gemini Lasswell
c6ef3c8321 Make cl-print respect print-quoted (bug#31649)
* lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Observe
print-quoted when printing quote and its relatives.  Add printing of
'function' as #'.
2018-06-07 08:27:43 -07:00
Noam Postavsky
9966842a21 Let isearch-yank-kill enable isearch-mode if needed (Bug#21419)
* lisp/isearch.el (isearch-yank-kill): Enable isearch-mode if needed.
2018-06-07 08:42:55 -04:00
Michael Albinus
2e2f61efa6 Remove Tramp "obex" and "synce" methods
* doc/misc/tramp.texi (GVFS based methods): Remove `obex' and `synce'.

* etc/NEWS: Mention obsolete Tramp "obex" and "synce" methods.

* lisp/net/tramp-gvfs.el (tramp-gvfs-methods):
Remove "obex" and "synce".
(top): Do not add defaults for "obex" and "synce".
(tramp-bluez-service, tramp-bluez-interface-manager)
(tramp-bluez-interface-adapter)
(tramp-bluez-discover-devices-timeout, tramp-bluez-discovery)
(tramp-bluez-devices, tramp-hal-service, tramp-hal-path-manager)
(tramp-hal-interface-manager, tramp-hal-interface-device)
(tramp-bluez-address, tramp-bluez-device)
(tramp-bluez-list-devices, tramp-bluez-property-changed)
(tramp-bluez-device-found, tramp-bluez-parse-device-names)
(tramp-synce-list-devices, tramp-synce-parse-device-names): Remove.
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec): Do not
handle "obex" and "synce".
2018-06-07 11:16:11 +02:00
Eli Zaretskii
e5ab25deae Fix cursor movement by 'next-logical-line' after 'next-line'
* src/indent.c (Fvertical_motion): Adjust TO_X when line-numbers
are being displayed.  Remove unneeded "correction" of TO_X at the
goal line.

* lisp/simple.el (last--line-number-width): Remove unneeded
variable.
(line-move-visual): Account for line-number display width by
adjusting the pixel X coordinate that gets converted into
canonical columns passed to vertical-motion, instead of adjusting
temporary-goal-column (which then affects next commands, including
next-logical-line).  (Bug#31723)
2018-06-06 18:28:44 +03:00
Allen Li
d20beef5f1 Fix prompt in bookmark.el (Bug#24726)
* lisp/bookmark.el (bookmark-set-internal): Conform to the standard
default prompt format (per `minibuffer-electric-default-mode') which
does not use a colon.
2018-06-05 20:29:22 -04:00
João Távora
4a51deb993 When navigating Flymake diagnostics, consider their severity
The FILTER arg of flymake-goto-next-error, a list of types, includes
every diagnostic with a severity number `eq` to those types.

* lisp/progmodes/flymake.el (flymake--severity): New helper.
(flymake-goto-next-error, flymake-goto-prev-error): Clarify
meaning of FILTER.
(flymake-goto-next-error): Interpret filter as a severity filter.
(flymake--mode-line-format): Simplify.
2018-06-05 17:36:21 +01:00
João Távora
fa794d1b60 Obsolete Flymake's flymake-diagnostic-types-alist
That varaiable was an association between symbols and properties,
effecively duplicating symbol's property lists.  It is simpler to just
put properties on symbols.  Backward compatibility to the old variable
has been kept.

* doc/misc/flymake.texi (Flymake error types): Don't mention
flymake-diagnostic-types-alist.
(Flymake error types): Rework section.
(Backend functions): Refill a paragraph.
(Flymake utility functions): Don't mention
flymake-diagnostic-types-alist.
(Proc customization variables): Don't mention
flymake-diagnostic-types-alist.

* etc/NEWS: Mention obsoletion of flymake-diagnostic-types-alist.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Don't use
flymake-diagnostic-types-alist.

* lisp/progmodes/flymake.el: Rewrite commentary.
(flymake-make-diagnostic, flymake-mode, flymake-goto-next-error)
(flymake-goto-prev-error): Don't mention
flymake-diagnostic-types-alist in docstring.
(flymake-diagnostic-types-alist): Make obsolete.
(:error, :warning, :note): Put flymake-category in these symbols.
(flymake-error, flymake-warning, flymake-note): Put
`flymake-bitmap', not `bitmap' in these symbols.
(flymake--lookup-type-property, flymake--highlight-line): Rewrite.
Honor flymake-diagnostic-types-alist for backward
compatibility.

* lisp/progmodes/python.el (python-flymake-msg-alist): Don't
mention flymake-diagnostic-types-alist.
2018-06-05 15:22:16 +01:00
João Távora
aadac04923 Correctly filter Flymake diagnostic types shown in mode-line
Thus, if a package foo has its own types foo-error and
foo-warning, and if the buffer has no errors, the mode-line
will correctly show `[0 0]' (zero errors and warnings) instead
of `[0 0 0 0]' (zero errors, zero foo-errors, zero warnings,
zero  foo-warnings).

* lisp/progmodes/flymake.el
(flymake--mode-line-format): Coalesce diagnostic types based on
the severity, not the symbol.
2018-06-05 15:18:04 +01:00
João Távora
fb759a7500 Let Flymake backends attach arbitrary data to diagnostics
This is easier that setting properties on diagnostics' text.

* lisp/progmodes/flymake.el (flymake--diag): Add data slot.
(flymake-make-diagnostic): Add DATA arg.
(flymake-diagnostic-data): New accessor.
2018-06-05 15:18:04 +01:00
João Távora
bd4f22b628 Update version information for Flymake package and manual
* doc/misc/flymake.texi: Update date and version.
Make myself the first author.

* lisp/progmodes/flymake.el: Update Maintainer and Version fields.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Update Maintainer and Version fields.
2018-06-05 15:17:49 +01:00
Damien Cassou
5d23382455
* lisp/auth-source-pass.el: Update version to 4.0.1 2018-06-05 15:53:43 +02:00
Damien Cassou
03c50fc7ae
Make sure auth-source-pass is compatible with Emacs 25
* lisp/auth-source-pass.el: Use `advice-add' for Emacs 25 users as
`auth-source-backend-parser-functions' does not exist there.
2018-06-05 15:52:02 +02:00
Damien Cassou
a6cbdd4e6f
* lisp/auth-source-pass.el: Update version to 4.0.0 2018-06-05 15:51:56 +02:00
Damien Cassou
a613326e67
Fix prefix messages of auth-source-pass debug messages
* lisp/auth-source-pass.el (auth-source-pass--do-debug): Fix message
prefix.
2018-06-05 15:51:46 +02:00
Damien Cassou
7b2d4754a2
* lisp/auth-source-pass.el: Update version to 3.0.0 2018-06-05 15:51:38 +02:00
Alex Branham
24cbb65954
Silence byte compiler warning in auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass-backend): Silence byte
compiler warning by only passing a parameter to `auth-source-backend'
in Emacs <= 25.
2018-06-05 15:51:32 +02:00
Jelle Licht
1d2551f8e7
Fix auth-source-pass.el to properly handle special inputs
* lisp/auth-source-pass.el (auth-source-pass-search): Warn when
passing multiple hosts in SPEC. Early return and warn when passing a
wildcard as host in SPEC. Early return when host is nil.
* test/lisp/auth-source-pass-tests.el (auth-source-pass-any-host,
auth-source-pass-undefined-host): Add corresponding tests.
2018-06-05 15:51:26 +02:00
Damien Cassou
b43ed61ef9
auth-source-pass: Take care of matching hosts when port is provided
* lisp/auth-source-pass.el (auth-source-pass--find-match): Add PORT
parameter and reorganize code by extracting `find-match-unambiguous'.
(auth-source-pass--find-match-unambiguous): New function.
(auth-source-pass--build-result): Fix the call to `find-match'.
(auth-source-pass--hostname, auth-source-pass--hostname-with-user,
auth-source-pass--user): Remove functions.
* test/lisp/auth-source-pass-tests.el: Fix the calls to `find-match'.
(auth-source-pass-find-host-without-port) Add corresponding test.
2018-06-05 15:51:14 +02:00
Damien Cassou
a6b1cb01b1
* lisp/auth-source-pass.el: Fix headers. 2018-06-05 15:50:37 +02:00
Noam Postavsky
55c9bb9f3c Fix comint-get-old-input-default for output field case (Bug#25028)
* lisp/comint.el (comint-get-old-input-default): Don't return whole
field when point was on an output field.
2018-06-04 19:42:22 -04:00
Eli Zaretskii
e35a08ea4b Prevent infloop in 'delete-trailing-whitespace'
* lisp/simple.el (delete-trailing-whitespace): Avoid inflooping
when some region of trailing whitespace is unmodifiable.
(Bug#31557)
2018-06-04 19:33:07 +03:00
Glenn Morris
4ee82a4ea9 Merge from origin/emacs-26
03697e6 Fix remote-host directory tracking for shells in `term' buffers
16e8541 Update doc string of 'rx'
2018-06-04 09:25:22 -07:00
Michael Albinus
5e307525b9 Fix Bug#31489
* lisp/files.el (file-name-unquote-non-special): Remove.
(file-name-quoted-p, file-name-quote, file-name-unquote):
Add optional argument TOP.
(file-name-non-special): Adapt callees.  Finish implementation of
functions which need a local copy.  (Bug#31489)
2018-06-04 18:15:54 +02:00
Gemini Lasswell
5d448ca98c Make cl-print respect print-level and print-length (bug#31559)
* lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable.
(cl-print-object) <cons>: Print ellipsis if printing depth greater
than 'print-level' or length of list greater than 'print-length'.
(cl-print-object) <vector>: Truncate printing with ellipsis if
vector is longer than 'print-length'.
(cl-print-object) <cl-structure-object>: Truncate printing with
ellipsis if structure has more slots than 'print-length'.
(cl-print-object) <:around>: Bind 'cl-print--depth'.
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-3, cl-print-tests-4): New tests.

(cherry picked from commit 0f48d18fd2)
2018-06-04 08:57:10 -07:00
João Távora
9a0b20d5b3 Add proper Flymake support to cc-mode.el
Except for the important detail that it doesn't make temporary files,
the new flymake-cc backend doesn't yet behave much differently from
the old flymake-proc-legacy-flymake, i.e. it still needs a special
`check-syntax' Makefile target to provide the compiler and compilation
flags.  However, the new infrastructure created should allow less
intrusive cleverer flag guessers (yet to be written) to replace that
mechanism.

* lisp/progmodes/cc-mode.el (c-mode, c++-mode): Add to
flymake-diagnostic-functions.

* lisp/progmodes/flymake-cc.el: New file.
2018-06-04 01:47:02 +01:00
Phil Sainty
03697e648c Fix remote-host directory tracking for shells in `term' buffers
* lisp/term.el (term-handle-ansi-terminal-messages): Use an explicit
tramp method when constructing the tramp path for a non-local host,
as this is now mandatory.  "-" is a pseudo-method for the user's
`tramp-default-method'.  (Bug#31355)

Specify the remote username explicitly in all cases, as
`tramp-default-user' and `tramp-default-user-alist' could cause the
previous logic to fail.

Minor related improvements to the commentary.
2018-06-04 11:10:21 +12:00
Alan Third
fb8d2e064d Add NS style text scale keybindings
* lisp/term/ns-win.el: Add super-based keybindings for adjusting text
zoom.
2018-06-03 20:25:13 +01:00
Eli Zaretskii
16e8541b74 Update doc string of 'rx'
* lisp/emacs-lisp/rx.el (rx): Update the description of some
character classes.
2018-06-03 20:20:52 +03:00
Jay Kamat
3ba5fc2bbe esh-opt.el: Fix improper parsing of first argument (Bug#28323)
Examples of broken behavior:

    sudo -u root whoami
    Outputs: -u
    ls -I '*.txt' /dev/null
    Errors with: *.txt: No such file or directory

* lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
args to eshell--args, as we rely on modifications from
eshell--process-option and vice versa.  These modifications were not
being propogated in the (if (= ai 0)) case, since popping the first
element of a list doesn't destructively modify the underlying list
object.

(cherry picked from commit 92a8230e49)
2018-06-03 12:48:14 -04:00
Noam Postavsky
0ac98cc6ed * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
(cherry picked from commit 217202c084)
2018-06-03 12:48:14 -04:00
Noam Postavsky
9552485c4d Fix cl-print for circular sublists (Bug#31146)
* lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Push each
element of list being printed onto cl-print--currently-printing.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle-2): New
test.

(cherry picked from commit b8aa7ecf54)
2018-06-03 12:48:13 -04:00
Lars Ingebrigtsen
4c6cdf6fc9 Revert "Make mail-extract-address-components return the user name more"
This reverts commit 8b50ae8b22.

According to tests in bug#27656 by OGAWA Hirofumi, this patch
led to wrong results when binding

(dolist (addr '("Rasmus <rasmus@gmx.us>" "Rasmus <mbox@gmx.us>"))
  (dolist (ignore-single '(t nil))
    (dolist (ignore-same '(t nil))
      (let ((mail-extr-ignore-single-names ignore-single)
	    (mail-extr-ignore-realname-equals-mailbox-name ignore-same))
	(message "%s" (mail-extract-address-components addr))))))

in combination.

(cherry picked from commit a3a9d5434d)
2018-06-03 12:48:13 -04:00
Tino Calancha
5fa73a7d98 query-replace undo: Handle when user edits the replacement string
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it (Fix Bug#31538).

* test/lisp/replace-tests.el (query-replace-undo-bug31538): New test.

Backport: (cherry picked from commits
ea133e04f4
and
7dcfdf5b14)
2018-06-03 23:28:30 +09:00