]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoCorrectly set last_nonmenu_event when replaying
Daniel Colascione [Sun, 10 Jun 2018 00:45:01 +0000 (17:45 -0700)]
Correctly set last_nonmenu_event when replaying

read_key_sequence can, in various circumstances, play back recorded
events.  Make sure that we set last_nonmenu_event as if we weren't
replaying.  Without this change, we leave last_nonmenu_event set to
whatever it was before we started replaying, leading to spurious
random keymap menu prompts appearing after reading terminal control
sequences, the translation of which sometimes causes event replays.

* src/keyboard.c:
(grow_bool_vector): New function
(read_key_sequence): Remember menu event history per-event.

6 years agoAdd debug facility for formatting in rr sessions
Daniel Colascione [Sat, 9 Jun 2018 22:41:29 +0000 (15:41 -0700)]
Add debug facility for formatting in rr sessions

The existing debug print commands don't work in rr, since they touch
stderr. The new xfmt command just calls Fformat and doesn't touch the
stdio streams.

* src/.gdbinit:
(xfmt): New GDB command.

* src/print.c:
(debug_format): New function.

6 years agoFix typo in docstring
Daniel Colascione [Sat, 9 Jun 2018 20:43:05 +0000 (13:43 -0700)]
Fix typo in docstring

* lisp/term/xterm.el: (xterm-paste-ending-sequence): Fix typo

6 years agoFix read buffer overrun on overflowed integers
Paul Eggert [Sun, 10 Jun 2018 00:17:55 +0000 (17:17 -0700)]
Fix read buffer overrun on overflowed integers

* src/lread.c (read_integer): Fix off-by-1 buffer overrun
introduced in 2018-04-17T23:23:16Z!eggert@cs.ucla.edu.  The
bug could occur when Emacs read radixed integers containing
more than 100 digits.  Bug caught by AddressSanitizer.

6 years agoImplement the C++11 "using" type definition.
Alan Mackenzie [Sat, 9 Jun 2018 21:39:43 +0000 (21:39 +0000)]
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.

6 years agoImprove robustness xterm event processing
Daniel Colascione [Sat, 9 Jun 2018 20:14:11 +0000 (13:14 -0700)]
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.

6 years agoCC Mode: In brace lists, anchor an elt on its predecessor, not on first elt
Alan Mackenzie [Sat, 9 Jun 2018 17:34:46 +0000 (17:34 +0000)]
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.

6 years agoMake error checking for thread functions stricter.
Philipp Stephani [Sat, 2 Jun 2018 20:35:22 +0000 (22:35 +0200)]
Make error checking for thread functions stricter.

* src/systhread.c (sys_thread_create): Change return type to bool.
Check for errors returned by pthread_attr_setstacksize and
pthread_attr_destroy.
(sys_mutex_init): Abort on errors.  Enable mutex checks when checking
is enabled.
(sys_cond_init): Abort on errors.
(sys_mutex_lock, sys_mutex_unlock, sys_cond_wait)
(sys_cond_signal, sys_cond_broadcast, sys_cond_destroy): Check for
errors in debug mode.

6 years agoAllow to reset Deleted flag when exporting messages in Rmail
Eli Zaretskii [Sat, 9 Jun 2018 08:03:20 +0000 (11:03 +0300)]
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.

6 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 9 Jun 2018 06:55:46 +0000 (09:55 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

6 years agoRemove AddressSanitizer bug workaround
Paul Eggert [Sat, 9 Jun 2018 06:53:58 +0000 (23:53 -0700)]
Remove AddressSanitizer bug workaround

This workaround no longer appears to be needed.
* src/alloc.c (USE_ALIGNED_ALLOC): Don’t leave undefined
merely because ADDRESS_SANITIZER is defined, as that bug
in -fsanitize=address appears to have been fixed.  See:
https://github.com/google/sanitizers/issues/337
* src/conf_post.h (vfork): Improve comment.

6 years agoFix default candidate of find-face-definition
Basil L. Contovounesios [Sun, 3 Jun 2018 18:34:37 +0000 (19:34 +0100)]
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)

6 years agoAvoid unnecessary readahead early in TTY frame init
Daniel Colascione [Sat, 9 Jun 2018 06:22:23 +0000 (23:22 -0700)]
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.

6 years agoSupport terminal focus notifications
Daniel Colascione [Sat, 9 Jun 2018 05:47:27 +0000 (22:47 -0700)]
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.

6 years agoFix formatting in the face filter change
Daniel Colascione [Sat, 9 Jun 2018 04:21:47 +0000 (21:21 -0700)]
Fix formatting in the face filter change

* src/xfaces.c:
(evaluate_face_filter,filter_face_ref)
(merge_face_ref,syms_of_xfaces): Fix comments, formatting.

6 years agoMake setting inhibit-startup-screen in early init work
Daniel Colascione [Fri, 8 Jun 2018 23:21:39 +0000 (16:21 -0700)]
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.

6 years agoDescribe flymake-start-on-save-buffer in manual and NEWS
João Távora [Fri, 8 Jun 2018 21:30:46 +0000 (22:30 +0100)]
Describe flymake-start-on-save-buffer in manual and NEWS

Fixes: bug#31738
* doc/misc/flymake.texi (Using Flymake, Customizable variables):
Mention flymake-start-on-save-buffer.

* etc/NEWS: Mention flymake-start-on-save-buffer.

6 years agoNew flymake-start-on-save-buffer custom variable
João Távora [Fri, 8 Jun 2018 18:35:31 +0000 (19:35 +0100)]
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.

6 years agoCC Mode: Fontify unbalanced quotes in unconstrained multiline strings, etc.
Alan Mackenzie [Fri, 8 Jun 2018 16:42:18 +0000 (16:42 +0000)]
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.

6 years agoPort alignment verification to x86 --with-wide-int
Paul Eggert [Fri, 8 Jun 2018 15:08:03 +0000 (08:08 -0700)]
Port alignment verification to x86 --with-wide-int

Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-06/msg00238.html
* src/lisp.h (struct Lisp_Symbol, union vectorlike_header)
(struct Lisp_Cons, struct Lisp_String):
Do not check alignment if !USE_LSB_TAG, as alignment is
needed only if we are tagging the low-order bits.

6 years ago; Tiny tpyo fix
Michal Nazarewicz [Fri, 8 Jun 2018 08:20:43 +0000 (09:20 +0100)]
; Tiny tpyo fix

* src/xfaces.c (face-remapping-alist): remove an empty ‘(3)’ introduced
in a docstring by mistake.

6 years agoOffer to open large files without modes
Daniel Colascione [Fri, 8 Jun 2018 05:05:33 +0000 (22:05 -0700)]
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.

6 years agoAdd support for per-window face remapping
Daniel Colascione [Thu, 7 Jun 2018 23:20:06 +0000 (16:20 -0700)]
Add support for per-window face remapping

Extend face specifications to support the notion of filtering to a
specific context and add a filter that limits a face specification to
windows having a certain parameter.

* src/xfaces.c:
(evaluate_face_filter,filter_face_ref): New functions.
(merge_face_ref): Ignore filtered face specifications.
(Fx_list_fonts,get_lface_attributes,merge_face_vectors)
(merge_named_face,merge_face_ref,merge_face_ref)
(Finternal_merge_in_global_face,Fface_font,lookup_named_face)
(lookup_basic_face,Fface_attributes_as_vector)
(x_supports_face_attributes_p)
(Fdisplay_supports_face_attributes_p,realize_named_face)
(compute_char_face,face_at_buffer_position)
(face_at_buffer_position,face_at_buffer_position)
(face_at_buffer_position)
(face_for_overlay_string,face_at_string_position,merge_faces):
Pass window to face machinery.
(syms_of_xfaces): Add :window and :filtered

* src/xdisp.c (init_iterator, handle_face_prop)
(handle_single_display_spec, merge_escape_glyph_face)
(merge_glyphless_glyph_face, get_next_display_element)
(next_element_from_display_vector, append_space_for_newline)
(extend_face_to_end_of_line,highlight_trailing_whitespace)
(maybe_produce_line_number)
(display_line, calc_line_height_property): Pass window to
face machinery.

* src/term.c (tty_menu_activate): Adjust to new face core
function signature.

* src/msdos.c (XMenuActivate): Adjust to new face core
function signature.

* src/fringe.c (draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Pass window to face machinery.

* src/font.c (font_range, Finternal_char_font): Pass window to
face machinery.

* src/dispnew.c (spec_glyph_lookup_face): Pass window to
face machinery.

* src/dispextern.h:
(lookup_named_face,lookup_basic_face)
(lookup_derived_face,merge_faces):
Add struct window arguments to prototypes.

6 years agoFit kill_buffer_xwidgets into 80
Paul Eggert [Fri, 8 Jun 2018 01:53:27 +0000 (18:53 -0700)]
Fit kill_buffer_xwidgets into 80

* src/xwidget.c (kill_buffer_xwidgets): Reindent and use C99
style to fit in 80 columns.

6 years agoMinor cleanup of save_excursion_restore
Paul Eggert [Fri, 8 Jun 2018 01:53:27 +0000 (18:53 -0700)]
Minor cleanup of save_excursion_restore

* src/editfns.c (save_excursion_restore): Use clearer names
for locals.  Free earlier, removing the need for a label and goto.

6 years agoNew function record_unwind_protect_excursion
Paul Eggert [Fri, 8 Jun 2018 01:53:27 +0000 (18:53 -0700)]
New function record_unwind_protect_excursion

This simplifies callers a bit, and will simplify future changes.
* src/eval.c (record_unwind_protect_excursion): New function.
* src/buffer.c (Fkill_buffer):
* src/bytecode.c (exec_byte_code):
* src/editfns.c (Fsave_excursion, Freplace_buffer_contents):
* src/lread.c (readevalloop, Feval_buffer):
* src/window.c (scroll_command):
Use it.

6 years ago* src/.gdbinit: Omit soon-obsolete comment.
Paul Eggert [Fri, 8 Jun 2018 01:53:26 +0000 (18:53 -0700)]
* src/.gdbinit: Omit soon-obsolete comment.

6 years agoFix ftfont_open2 failure cleanup
Paul Eggert [Fri, 8 Jun 2018 01:53:26 +0000 (18:53 -0700)]
Fix ftfont_open2 failure cleanup

* src/ftfont.c (ftfont_open2): Don’t increment counter if failing.
Avoid use-after-free once the increment bug is fixed.

6 years agoDon’t over-align if WIDE_EMACS_INT
Paul Eggert [Fri, 8 Jun 2018 01:53:26 +0000 (18:53 -0700)]
Don’t over-align if WIDE_EMACS_INT

* src/lisp.h (GCALIGNED_UNION): New macro.
(struct Lisp_Symbol, union vectorlike_header)
(struct Lisp_Cons, struct Lisp_String):
Use it to avoid possible over-alignment if !USE_LSB_TAG.

6 years agoFix GC-related commentary
Paul Eggert [Fri, 8 Jun 2018 01:53:26 +0000 (18:53 -0700)]
Fix GC-related commentary

* src/lisp.h: USE_STACK_LISP_OBJECTS is no longer experimental.
Also, remove confusion about scope vs lifetime.
And say that stack-allocated strings should not be given
text properties.

6 years agoLet isearch-yank-kill enable isearch-mode if needed (Bug#21419)
Noam Postavsky [Wed, 6 Jun 2018 01:07:19 +0000 (21:07 -0400)]
Let isearch-yank-kill enable isearch-mode if needed (Bug#21419)

* lisp/isearch.el (isearch-yank-kill): Enable isearch-mode if needed.

6 years agoAccept plists when serializing and parsing JSON
João Távora [Fri, 1 Jun 2018 23:23:38 +0000 (00:23 +0100)]
Accept plists when serializing and parsing JSON

* doc/lispref/text.texi (Parsing JSON): Mention plist support.

* src/json.c (lisp_to_json_toplevel_1): Serialize plists to json.
(Fjson_serialize): Mention plists in docstring.
(enum json_object_type): Add json_object_plist.
(json_to_lisp): Parse JSON into plists.
(json_parse_object_type): Consider plists.
(Fjson_parse_string): Mention plists in docstring.
(syms_of_json): New Qplist sym_of_json.
(lisp_to_json): Update comment.

* test/src/json-tests.el (json-serialize/object)
(json-parse-string/object): New plist tests.

6 years agoRemove Tramp "obex" and "synce" methods
Michael Albinus [Thu, 7 Jun 2018 09:16:11 +0000 (11:16 +0200)]
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".

6 years agoWhen navigating Flymake diagnostics, consider their severity
João Távora [Tue, 5 Jun 2018 16:20:43 +0000 (17:20 +0100)]
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.

6 years agoObsolete Flymake's flymake-diagnostic-types-alist
João Távora [Tue, 5 Jun 2018 14:13:02 +0000 (15:13 +0100)]
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.

6 years agoCorrectly filter Flymake diagnostic types shown in mode-line
João Távora [Tue, 5 Jun 2018 13:31:38 +0000 (14:31 +0100)]
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.

6 years agoLet Flymake backends attach arbitrary data to diagnostics
João Távora [Tue, 5 Jun 2018 13:25:47 +0000 (14:25 +0100)]
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.

6 years agoUpdate version information for Flymake package and manual
João Távora [Tue, 5 Jun 2018 13:20:42 +0000 (14:20 +0100)]
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.

6 years ago* lisp/auth-source-pass.el: Update version to 4.0.1
Damien Cassou [Mon, 26 Mar 2018 07:04:36 +0000 (09:04 +0200)]
* lisp/auth-source-pass.el: Update version to 4.0.1

6 years agoTest checking that auth-source-pass backend is correctly installed
Damien Cassou [Mon, 26 Mar 2018 06:56:16 +0000 (08:56 +0200)]
Test checking that auth-source-pass backend is correctly installed

* test/lisp/auth-source-pass-tests.el
(auth-source-pass-can-start-from-auth-source-search): Add test.

6 years agoMake sure auth-source-pass is compatible with Emacs 25
Damien Cassou [Mon, 26 Mar 2018 04:28:17 +0000 (06:28 +0200)]
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.

6 years ago* lisp/auth-source-pass.el: Update version to 4.0.0
Damien Cassou [Fri, 23 Mar 2018 08:18:54 +0000 (09:18 +0100)]
* lisp/auth-source-pass.el: Update version to 4.0.0

6 years agoFix prefix messages of auth-source-pass debug messages
Damien Cassou [Fri, 23 Mar 2018 08:16:25 +0000 (09:16 +0100)]
Fix prefix messages of auth-source-pass debug messages

* lisp/auth-source-pass.el (auth-source-pass--do-debug): Fix message
prefix.

6 years ago* lisp/auth-source-pass.el: Update version to 3.0.0
Damien Cassou [Wed, 14 Feb 2018 13:51:25 +0000 (14:51 +0100)]
* lisp/auth-source-pass.el: Update version to 3.0.0

6 years agoSilence byte compiler warning in auth-source-pass
Alex Branham [Mon, 12 Feb 2018 19:28:20 +0000 (13:28 -0600)]
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.

6 years agoFix auth-source-pass.el to properly handle special inputs
Jelle Licht [Mon, 8 Jan 2018 16:34:38 +0000 (17:34 +0100)]
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.

6 years agoauth-source-pass: Take care of matching hosts when port is provided
Damien Cassou [Thu, 9 Nov 2017 09:40:19 +0000 (10:40 +0100)]
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.

6 years agoAdd missing test cases to auth-source-pass-tests.el
Damien Cassou [Tue, 7 Nov 2017 08:48:50 +0000 (09:48 +0100)]
Add missing test cases to auth-source-pass-tests.el

* test/lisp/auth-source-pass-tests.el
(auth-source-pass-build-result-passes-full-host-to-find-match): Add
missing test cases.

6 years agoAdd a test to auth-source-pass-tests.el
Damien Cassou [Tue, 7 Nov 2017 08:32:30 +0000 (09:32 +0100)]
Add a test to auth-source-pass-tests.el

* test/lisp/auth-source-pass-tests.el
(auth-source-pass-build-result-passes-full-host-to-find-match): Add
test making sure find-match is called with full host.

6 years agoFix indentation in auth-source-pass-tests.el
Damien Cassou [Tue, 7 Nov 2017 08:33:22 +0000 (09:33 +0100)]
Fix indentation in auth-source-pass-tests.el

* test/lisp/auth-source-pass-tests.el
(auth-source-pass-only-return-entries-that-can-be-open): Fix indentation.

6 years ago* test/lisp/auth-source-pass-tests.el: Add assertions for host:port
Edison Ibañez [Tue, 7 Nov 2017 08:00:43 +0000 (09:00 +0100)]
* test/lisp/auth-source-pass-tests.el: Add assertions for host:port

6 years ago* lisp/auth-source-pass.el: Fix headers.
Damien Cassou [Thu, 22 Feb 2018 16:58:07 +0000 (17:58 +0100)]
* lisp/auth-source-pass.el: Fix headers.

6 years agoFix selinux test in files-tests.el
Michael Albinus [Tue, 5 Jun 2018 07:43:34 +0000 (09:43 +0200)]
Fix selinux test in files-tests.el

* test/lisp/files-tests.el
(files-tests-file-name-non-special-set-file-selinux-context):
Adapt test.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 4 Jun 2018 16:25:22 +0000 (09:25 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

5d448ca (origin/emacs-26) Make cl-print respect print-level and print...

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 4 Jun 2018 16:25:22 +0000 (09:25 -0700)]
Merge from origin/emacs-26

03697e6 Fix remote-host directory tracking for shells in `term' buffers
16e8541 Update doc string of 'rx'

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 4 Jun 2018 16:25:22 +0000 (09:25 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

9a14b4d ; Merge: backports from master
ed962f2 Fix bug#30846, along with misc cleanups found along the way
3ba5fc2 esh-opt.el: Fix improper parsing of first argument (Bug#28323)
0ac98cc * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bu...
9552485 Fix cl-print for circular sublists (Bug#31146)
4c6cdf6 Revert "Make mail-extract-address-components return the user ...
51ee8bc Centralize Bug#30931 fix
daa6023 Fix another case of freed markers in the undo-list (Bug#30931)
7460840 Fix CHECK_ALLOCATED_AND_LIVE abort during GC
71192e0 Don't wait for visible frames to become visible
5fa73a7 query-replace undo: Handle when user edits the replacement st...
031004e Backport: Fix corner case in query-replace-regexp undo
50c0624 Backport: Preserve case in query-replace undo

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 4 Jun 2018 16:25:22 +0000 (09:25 -0700)]
Merge from origin/emacs-26

defd53a Set accessibility subroles for child frame (bug#31324)
de6a876 Fix redefinition of child frames on NS

6 years agoFix Bug#31489
Michael Albinus [Mon, 4 Jun 2018 16:15:54 +0000 (18:15 +0200)]
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)

6 years agoMake cl-print respect print-level and print-length (bug#31559)
Gemini Lasswell [Sun, 27 May 2018 18:38:00 +0000 (11:38 -0700)]
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 0f48d18fd2a30f29cc3592a835d2a2254c9b0afb)

6 years agoAdd proper Flymake support to cc-mode.el
João Távora [Mon, 4 Jun 2018 00:40:50 +0000 (01:40 +0100)]
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.

6 years agoFix remote-host directory tracking for shells in `term' buffers
Phil Sainty [Thu, 3 May 2018 13:29:42 +0000 (01:29 +1200)]
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.

6 years agoAdd NS style text scale keybindings
Alan Third [Thu, 31 May 2018 20:28:09 +0000 (21:28 +0100)]
Add NS style text scale keybindings

* lisp/term/ns-win.el: Add super-based keybindings for adjusting text
zoom.

6 years agoUpdate doc string of 'rx'
Eli Zaretskii [Sun, 3 Jun 2018 17:20:52 +0000 (20:20 +0300)]
Update doc string of 'rx'

* lisp/emacs-lisp/rx.el (rx): Update the description of some
character classes.

6 years ago; Merge: backports from master
Noam Postavsky [Sun, 3 Jun 2018 16:55:37 +0000 (12:55 -0400)]
; Merge: backports from master

6 years agoFix bug#30846, along with misc cleanups found along the way
Stefan Monnier [Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)]
Fix bug#30846, along with misc cleanups found along the way

* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.

* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.

* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.

* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.

(cherry picked from commit 3ddff080341580eb6fc18d907181e9cc2301f62d)

6 years agoesh-opt.el: Fix improper parsing of first argument (Bug#28323)
Jay Kamat [Tue, 8 May 2018 19:04:00 +0000 (12:04 -0700)]
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 92a8230e49a65be48442ee95cf50c90514e48f99)

6 years ago* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
Noam Postavsky [Fri, 27 Apr 2018 11:27:59 +0000 (07:27 -0400)]
* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).

(cherry picked from commit 217202c084232f36d4fa0fead0f3aca21396d074)

6 years agoFix cl-print for circular sublists (Bug#31146)
Noam Postavsky [Sat, 14 Apr 2018 05:02:25 +0000 (01:02 -0400)]
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 b8aa7ecf54c9b164a59f1b0e9f9fe90531dadd20)

6 years agoRevert "Make mail-extract-address-components return the user name more"
Lars Ingebrigtsen [Sun, 15 Apr 2018 17:28:04 +0000 (19:28 +0200)]
Revert "Make mail-extract-address-components return the user name more"

This reverts commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28.

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 a3a9d5434d56f8736cc47e379a1d011d4c779b7c)

6 years agoCentralize Bug#30931 fix
Paul Eggert [Fri, 30 Mar 2018 21:23:55 +0000 (14:23 -0700)]
Centralize Bug#30931 fix

* src/marker.c (detach_marker): New function.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Use it.

(cherry picked from commit 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb)

6 years agoFix another case of freed markers in the undo-list (Bug#30931)
Noam Postavsky [Fri, 30 Mar 2018 20:44:24 +0000 (16:44 -0400)]
Fix another case of freed markers in the undo-list (Bug#30931)

* src/alloc.c (free_marker): Remove.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Detach the markers from the
buffer when we're done with them instead of calling free_marker on
them.
* test/src/editfns-tests.el (delete-region-undo-markers-1)
(delete-region-undo-markers-2): New tests.

(cherry picked from commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a)

6 years agoFix CHECK_ALLOCATED_AND_LIVE abort during GC
Paul Eggert [Fri, 30 Mar 2018 06:00:23 +0000 (23:00 -0700)]
Fix CHECK_ALLOCATED_AND_LIVE abort during GC

* src/editfns.c (save_restriction_restore):
Wait for the GC to free the temporary markers (Bug#30931).

(cherry picked from commit 670f2ffae718046c0fb37313965a51c040ed096f)

6 years agoDon't wait for visible frames to become visible
Noam Postavsky [Thu, 29 Mar 2018 23:11:47 +0000 (19:11 -0400)]
Don't wait for visible frames to become visible

For discussion, see thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html.
* src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before
calling x_wait_for_event.

(cherry picked from commits 2a192e21cf3b04b7f830b4971c1508c611e13a3c
and 00c1f771f2a51ffa675ec5a07ea330f2605cd302)

6 years agoquery-replace undo: Handle when user edits the replacement string
Tino Calancha [Sun, 3 Jun 2018 14:28:30 +0000 (23:28 +0900)]
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
ea133e04f49afa7928e49a3ac4a85b47f6f13f01
and
7dcfdf5b14325ae7996f272f14c72810d7c84944)

6 years agoBackport: Fix corner case in query-replace-regexp undo
Tino Calancha [Sun, 3 Jun 2018 14:28:24 +0000 (23:28 +0900)]
Backport: 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.

(cherry picked from commit bab73230d1be1fe394b7269c1365ef6fb1a5d9b3)

6 years agoBackport: Preserve case in query-replace undo
Tino Calancha [Sun, 3 Jun 2018 14:28:14 +0000 (23:28 +0900)]
Backport: Preserve case in query-replace undo

If the user query and replaces 'foo' with 'BAR', then
undo must comeback to 'foo', not to 'FOO' (Bug#31073).
* lisp/replace.el (perform-replace): Bind nocasify to non-nil
value during undo/undo-all actions.
* test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.

(cherry picked from commit 32dc0cb1b5ae895d237c7118ccaeb084715934fd)

6 years agoExtend file-name-non-special
Michael Albinus [Sun, 3 Jun 2018 12:30:41 +0000 (14:30 +0200)]
Extend file-name-non-special

* lisp/files.el (insert-file-contents-literally):
Bind `inhibit-file-name-handlers' the default way.
(file-name-non-special): Rework, mainly for operations with two
file name arguments.
(file-name-unquote-non-special): New defsubst.
(file-name-unquote): Use it.

* test/lisp/files-tests.el (files-test-bug-18141): Skip if needed.
(files-tests--with-temp-non-special): Add docstring.  Delete also
`non-special-name' if the file/directory exists.
(files-tests--special-file-name-extension)
(files-tests--special-file-name-regexp): New defconst.
(files-tests--special-file-name-handler, files-tests--new-name):
New defuns.
(files-tests--with-temp-non-special-and-file-name-handler): New macro.
(files-tests-file-name-non-special-access-file)
(files-tests-file-name-non-special-add-name-to-file)
(files-tests-file-name-non-special-byte-compiler-base-file-name)
(files-tests-file-name-non-special-copy-directory)
(files-tests-file-name-non-special-copy-file)
(files-tests-file-name-non-special-delete-directory)
(files-tests-file-name-non-special-delete-file)
(files-tests-file-name-non-special-diff-latest-backup-file)
(files-tests-file-name-non-special-directory-file-name)
(files-tests-file-name-non-special-directory-files)
(files-tests-file-name-non-special-directory-files-and-attributes)
(files-tests-file-name-non-special-dired-compress-handler)
(files-tests-file-name-non-special-dired-uncache)
(files-tests-file-name-non-special-expand-file-name)
(files-tests-file-name-non-special-file-accessible-directory-p)
(files-tests-file-name-non-special-file-acl)
(files-tests-file-name-non-special-file-attributes)
(files-tests-file-name-non-special-file-directory-p)
(files-tests-file-name-non-special-file-equal-p)
(files-tests-file-name-non-special-file-executable-p)
(files-tests-file-name-non-special-file-exists-p)
(files-tests-file-name-non-special-file-in-directory-p)
(files-tests-file-name-non-special-file-local-copy)
(files-tests-file-name-non-special-file-modes)
(files-tests-file-name-non-special-file-name-all-completions)
(files-tests-file-name-non-special-file-name-as-directory)
(files-tests-file-name-non-special-file-name-case-insensitive-p)
(files-tests-file-name-non-special-file-name-completion)
(files-tests-file-name-non-special-file-name-directory)
(files-tests-file-name-non-special-file-name-nondirectory)
(files-tests-file-name-non-special-file-name-sans-versions)
(files-tests-file-name-non-special-file-newer-than-file-p)
(files-tests-file-name-non-special-notify-handlers)
(files-tests-file-name-non-special-file-ownership-preserved-p)
(files-tests-file-name-non-special-file-readable-p)
(files-tests-file-name-non-special-file-regular-p)
(files-tests-file-name-non-special-file-remote-p)
(files-tests-file-name-non-special-file-selinux-context)
(files-tests-file-name-non-special-file-symlink-p)
(files-tests-file-name-non-special-file-truename)
(files-tests-file-name-non-special-file-writable-p)
(files-tests-file-name-non-special-find-backup-file-name)
(files-tests-file-name-non-special-get-file-buffer)
(files-tests-file-name-non-special-insert-directory)
(files-tests-file-name-non-special-insert-file-contents)
(files-tests-file-name-non-special-load)
(files-tests-file-name-non-special-make-auto-save-file-name)
(files-tests-file-name-non-special-make-directory)
(files-tests-file-name-non-special-make-directory-internal)
(files-tests-file-name-non-special-make-symbolic-link)
(files-tests-file-name-non-special-rename-file)
(files-tests-file-name-non-special-set-file-acl)
(files-tests-file-name-non-special-set-file-modes)
(files-tests-file-name-non-special-set-file-selinux-context)
(files-tests-file-name-non-special-set-file-times)
(files-tests-file-name-non-special-set-visited-file-modtime)
(files-tests-file-name-non-special-shell-command)
(files-tests-file-name-non-special-start-file-process)
(files-tests-file-name-non-special-substitute-in-file-name)
(files-tests-file-name-non-special-temporary-file-directory)
(files-tests-file-name-non-special-unhandled-file-name-directory)
(files-tests-file-name-non-special-vc-registered)
(files-tests-file-name-non-special-write-region): Extends tests to
quoted file names, which would require a file name handler if unquoted.
(files-test-no-file-write-contents): Make test more robust.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
(tramp--test-emacs25-p): New defun.
(tramp-test34-vc-registered): Use it.

6 years agoImprove buffer naming in sql.el (Bug#31446)
Michael R. Mauger [Sat, 2 Jun 2018 23:21:31 +0000 (19:21 -0400)]
Improve buffer naming in sql.el (Bug#31446)

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:29:38 +0000 (10:29 -0700)]
Merge from origin/emacs-26

4cfe531 (origin/emacs-26) Improve ELisp documentation of 'clone-indir...
9089b02 Improve documentation of 'inhibit-message'
6107e12 Improve documentation of comment styles
fb45125 Documentation improvements in newcomment.el
641c94c Imp[rove documentation of 'with-silent-modifications'

6 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:29:38 +0000 (10:29 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

6e0ff4c Fix decoding of directories when "~" includes non-ASCII chars
35c1ab1 Don't remove highlight of misspelled word on pdict save
aac541e Fix some problems in the Cairo build
e96245a Avoid infloops in font_open_entity
3a06e72 Fix encoding of characters when using GB18030 fonts
7782550 Fix C-p and C-n when wrap-prefix is too wide
9804482 Avoid redisplay problems with too wide wrap-prefix
5ee9ccf Fix 'posn-at-point' when line numbers are displayed
c4db766 Another followup to fixing 'window-text-pixel-width'
a6cf7be Fix mouse-set-point when line numbers are displayed
ae78b14 * src/xdisp.c (Fwindow_text_pixel_size): Fix last change.
f1f12d8 Fix 'window-text-pixel-size' when display properties are around
8b2b4b5 Fix display of TABs in hscrolled windows with line numbers
de69d28 Fix wait_reading_process_output wait_proc hang

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:29:38 +0000 (10:29 -0700)]
Merge from origin/emacs-26

76f692e Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...

6 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:29:37 +0000 (10:29 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

ddd1b95 Fix posn-at-point in Flycheck buffers

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:29:37 +0000 (10:29 -0700)]
Merge from origin/emacs-26

90bea37 ; * etc/PROBLEMS: Fix fvwm version number in last commit
af82d1f * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31...
4a3aed2 Update Emacs Lisp Intro to match current behavior
21f2247 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
3257085 Fix previous commit
6d23525 Fix typos in several manuals (Bug#31610)
9188291 Add detailed documentation about lock files
e5471b2 Add commentary for subtle aspect of frame.el

Conflicts:
doc/lispintro/emacs-lisp-intro.texi

6 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:25:50 +0000 (10:25 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

61c8434 ; Auto-commit of loaddefs files.

6 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 2 Jun 2018 17:25:50 +0000 (10:25 -0700)]
Merge from origin/emacs-26

ca3f0a8 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs...
99f92da Improve documentation of 'directory-files-and-attributes'
df8649a * lisp/gnus/message.el (message-remove-header): Don't remove ...
b682a7e ; * etc/NEWS: Add headings for Emacs 26.2
aa175a4 Adapt hexl-mode to native line-number display
b8e7749 Fix example in Tramp manual
f212fe5 Handle case where Xft is found but not XRender
186280f * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh...
24ba633 Improve read-multiple-choice docstring (Bug#31628)

Conflicts:
etc/NEWS
src/dired.c

6 years agoSet accessibility subroles for child frame (bug#31324)
Alan Third [Sun, 13 May 2018 10:02:00 +0000 (11:02 +0100)]
Set accessibility subroles for child frame (bug#31324)

; Depends on patch in bug#31440.

* src/nsterm.m (x_set_parent_frame): Set subrole depending on whether
frame is a child or not.

6 years agoFix redefinition of child frames on NS
Alan Third [Sun, 13 May 2018 09:33:44 +0000 (10:33 +0100)]
Fix redefinition of child frames on NS

* src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing
parent frame, remove it.

6 years agoImprove ELisp documentation of 'clone-indirect-buffer'
Eli Zaretskii [Sat, 2 Jun 2018 11:15:10 +0000 (14:15 +0300)]
Improve ELisp documentation of 'clone-indirect-buffer'

* doc/lispref/buffers.texi (Indirect Buffers): Be more explicit
about the value of DISPLAY-FLAG in interactive usage.  (Bug#31648)

6 years agoImprove documentation of 'inhibit-message'
Eli Zaretskii [Sat, 2 Jun 2018 11:09:11 +0000 (14:09 +0300)]
Improve documentation of 'inhibit-message'

* src/xdisp.c (syms_of_xdisp) <inhibit-message>: Warn against
setting it non-nil globally.  (Bug#31627)

6 years agoImprove documentation of comment styles
Eli Zaretskii [Sat, 2 Jun 2018 11:01:18 +0000 (14:01 +0300)]
Improve documentation of comment styles

* doc/lispref/syntax.texi (Syntax Flags): Define the "a" style.
(Bug#31624)

6 years agoDocumentation improvements in newcomment.el
Eli Zaretskii [Sat, 2 Jun 2018 10:43:43 +0000 (13:43 +0300)]
Documentation improvements in newcomment.el

* lisp/newcomment.el (uncomment-region)
(uncomment-region-default): Doc fixes.  (Bug#31615)

6 years agoImp[rove documentation of 'with-silent-modifications'
Eli Zaretskii [Sat, 2 Jun 2018 10:27:22 +0000 (13:27 +0300)]
Imp[rove documentation of 'with-silent-modifications'

* doc/lispref/buffers.texi (Buffer Modification): Document
'with-silent-modifications'.  (Bug#31613)
* doc/lispref/text.texi (Changing Properties): Add a
cross-reference to "Buffer Modification".  Improve wording.

6 years agoUn-obsolete 'string-to-unibyte'
Eli Zaretskii [Sat, 2 Jun 2018 10:04:15 +0000 (13:04 +0300)]
Un-obsolete 'string-to-unibyte'

* lisp/subr.el (string-to-unibyte): No longer obsolete.  See the
emacs-devel discussion around this message:
http://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00656.html.

* etc/NEWS: Announce the change.

6 years agoFix decoding of directories when "~" includes non-ASCII chars
Eli Zaretskii [Fri, 18 May 2018 13:34:19 +0000 (16:34 +0300)]
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.

(cherry picked from commit 3aab8626ba5080bb04d0fdae52d99c850a842a52)

6 years agoDon't remove highlight of misspelled word on pdict save
Eli Zaretskii [Sun, 6 May 2018 18:20:31 +0000 (21:20 +0300)]
Don't remove highlight of misspelled word on pdict save

* lisp/textmodes/ispell.el (ispell-pdict-save): Don't restart
flyspell-mode, as bug#11963, which this was supposed to fix, is
fixed better by ispell-command-loop, when the user types 'i' or
'a'.  Restarting Flyspell mode when the personal dictionary is
saved caused bug#31372 as side effect.
(ispell-command-loop): Test 'flyspell-mode', not whether
flyspell-unhighlight-at is fboundp, to determine whether Flyspell
mode is turned on in the current buffer.
(flyspell-unhighlight-at): Add declare-function form for it.

(cherry picked from commit 91e582a31ada28fab5ae55bdbf959a9d30796587)

6 years agoFix some problems in the Cairo build
Ari Roponen [Fri, 27 Apr 2018 12:13:12 +0000 (15:13 +0300)]
Fix some problems in the Cairo build

* src/xterm.c (x_begin_cr_clip): Create image surface.
(x_update_end) [USE_CAIRO]: Remove GTK3-specific code.
(x_scroll_run) [USE_CAIRO]: Implement scrolling.
* src/image.c (lookup_rgb_color) [USE_CAIRO]: Support Cairo.
(jpeg_load_body) [USE_CAIRO]: Support Cairo.  Use USE_CAIRO
instead of CAIRO for #ifdef's.
(imagemagick_load_image) [USE_CAIRO]: Support Cairo.
(Bug#31288)

(cherry picked from commit 2d0eff42b8f1122e00f948759ed01a3be1a8c3fc)

6 years agoAvoid infloops in font_open_entity
Eli Zaretskii [Sat, 5 May 2018 08:52:29 +0000 (11:52 +0300)]
Avoid infloops in font_open_entity

* src/font.c (font_open_entity): Fail after 15 iterations through
the loop that looks for a font whose average_width and height are
both positive.  This avoids infinite loops for fonts that, e.g.,
report average_width of zero for any possible size we try.
(Bug#31316)

(cherry picked from commit e2879c1f837059335af89022b2a9ac9bc861e96d)

6 years agoFix encoding of characters when using GB18030 fonts
Eli Zaretskii [Sat, 5 May 2018 08:45:37 +0000 (11:45 +0300)]
Fix encoding of characters when using GB18030 fonts

* lisp/international/fontset.el (font-encoding-alist): Fix the
GB18030 entry to encode characters correctly when passing them to
the xfont back-end.  (Bug#31315)  See also
http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.

(cherry picked from commit bbe2cadc544e63e9378350621887f8fb9bbcc236)

6 years agoFix C-p and C-n when wrap-prefix is too wide
Eli Zaretskii [Fri, 30 Mar 2018 12:57:57 +0000 (15:57 +0300)]
Fix C-p and C-n when wrap-prefix is too wide

* src/xdisp.c (move_it_in_display_line_to): Avoid looping in
previous/next-line when wrap-prefix is set to a too-wide
stretch of whitespace.  (Bug#30432)

(cherry picked from commit 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d)

6 years agoAvoid redisplay problems with too wide wrap-prefix
Eli Zaretskii [Tue, 20 Mar 2018 17:05:21 +0000 (19:05 +0200)]
Avoid redisplay problems with too wide wrap-prefix

* src/xdisp.c (display_line): Avoid looping in redisplay when
wrap-prefix is set to a too-wide stretch of whitespace.
(Bug#30432)

(cherry picked from commit 2a1fe08307402d6217d073f8ab7737750d253dd4)