Martin Rudalics [Wed, 16 Oct 2019 09:02:56 +0000 (11:02 +0200)]
Handle top margin change in adjust_frame_size
* src/frame.c (adjust_frame_size): Handle case where only
pseudo windows changed height so the top margin has to be
adjusted.
* src/window.c (Fset_window_configuration): Call
adjust_frame_size with inhibit 4.
Juri Linkov [Tue, 15 Oct 2019 21:42:31 +0000 (00:42 +0300)]
Declare tab-bar-tabs the single source of truth in regard to current tab name
* lisp/tab-bar.el: Replace all calls of tab-bar-tabs
with '(funcall tab-bar-tabs-function)'.
(tab-bar-tabs): Update the current tab name here
instead of tab-bar-make-keymap-1.
(tab-bar-make-keymap-1): Move the current tab name updating
to tab-bar-tabs.
Robert Cochran [Mon, 7 Oct 2019 20:41:47 +0000 (13:41 -0700)]
Allow tabs to have consistent given names
* lisp/tab-bar.el (tab-bar--tab): Pull automatic name information from
current tab
(tab-bar--current-tab): Pull automatic name information from current
tab, or from new optional template argument
(tab-bar-select-tab): Pass the target tab as a template when setting
it as current tab
(tab-bar-rename-tab, tab-bar-rename-tab-by-name): New functions
* doc/emacs/frames.texi (Tab Bars): Document new tab rename functionality.
Juri Linkov [Tue, 15 Oct 2019 20:38:18 +0000 (23:38 +0300)]
* lisp/tab-bar.el (tab-bar-select-tab-modifiers): New defcustom.
(tab-bar-mode): Use tab-bar-select-tab-modifiers to bind
tab-bar-select-tab.
Don't override user customized key bindings of C-TAB, C-S-TAB.
On disabling tab-bar-mode, unset only keys bound by tab-bar.
Juri Linkov [Tue, 15 Oct 2019 19:41:40 +0000 (22:41 +0300)]
New variable tab-bar-position
* lisp/cus-start.el: Add customization for tab-bar-position.
* src/dispnew.c (syms_of_display): New variable Vtab_bar_position.
(adjust_frame_glyphs_for_window_redisplay): Use it.
Daiki Ueno [Tue, 15 Oct 2019 10:42:37 +0000 (12:42 +0200)]
auth-source: Fix wrong-type-argument when searching plstore
`auth-source-search' can be called with an integer port number from
`network-stream-certificate`, while the backend implementation doesn't
allow non-string attributes.
* lisp/auth-source.el (auth-source-plstore-search): Ensure attributes
are string.
Make auth-source work with non-ASCII passwords again
* lisp/auth-source.el (auth-source--obfuscate): Convert the string
to bytes before obfuscating.
(auth-source--deobfuscate): Convert back into a string (bug#37758).
Carlos Pita [Tue, 4 Dec 2018 22:35:09 +0000 (19:35 -0300)]
Fix python-shell font-lock cleanup for unclosed quotes (Bug#32390)
The problem originating this report was:
-------------
In [15]: "
File "<ipython-input-15-3b7a06bb1102>", line 1
"
^
SyntaxError: EOL while scanning string literal
In [16]: string face still here"
-------------
This happens because
python-shell-font-lock-comint-output-filter-function is called twice,
first for the error output and then for the "In [16]: " part. The
first time python-shell-comint-end-of-output-p returns nil since
we're *not* at the end of an input prompt. The second time it returns
0 since we're at the end of *just* an input prompt. So we don't call
python-shell-font-lock-cleanup-buffer either time.
The current code is relying in a very weak rule: it considers "just an
input prompt" to be a continuation prompt. Another unreliable aspect
of the current rule is that sometimes
returns 1 and not 0 for continuation prompts. In short, the rule does
a very poor job identifying continuations.
* lisp/progmodes/python.el (python-shell-font-lock-cleanup-buffer):
Don't check for empty OUTPUT since python-shell-comint-end-of-output-p
returns nil for that anyway. Don't check for
python-shell-comint-end-of-output-p returning a specific number
because it's unreliable, just check for any non-nil. Identify
continuation prompts by looking for "...".
Juri Linkov [Mon, 14 Oct 2019 22:43:45 +0000 (01:43 +0300)]
Add images on tab-bar buttons the first time the tab bar is activated
* lisp/tab-bar.el (tab-bar-mode): Set display property with image files
on tab-bar-new-button and tab-bar-close-button when tab-bar-mode is enabled
the first time.
(tab-bar-new-button, tab-bar-close-button): Use default values
without display image properties. (Bug#37685)
Remove the find-file-visit-truename safe-local-variable
* lisp/files.el (find-file-visit-truename): Remove the
safe-local-variable put, because the variable is checked too late
to actually make a difference (bug#36830).
Štěpán Němec [Mon, 14 Oct 2019 21:12:00 +0000 (23:12 +0200)]
quail/py-b5: Use U+3007 for ideographic zero (bug#3179)
* leim/leim-ext.el ("quail/PY-b5"): Use U+3007 instead of U+25CB for
ideographic zero. U+25CB (used previously) is only one of the several
lookalikes (bug#3179).
New face attribute :extend to control the face extension after
EOL.
necessary, # especially if it merges an updated upstream into a topic
branch. # # Lines starting with '#' will be ignored, and an empty
message aborts # the commit.
src/xdisp.c (face_at_pos): Removed code to that modified
it->start_of_box_run_p and it->face_box_p. This function should not
modify it.
(handle_face_prop): Added code to update it->start_of_box_run_p and
it->face_box_p.
(underlying_face_id): Input IT made CONST.
* src/xdisp.c (append_space_for_newline): Modified to add the space
with the last face also in terminal interface.
(fill_column_indicator_column): Modified to group more conditions.
(extend_face_to_end_of_line): Simplified code in
fill_column_indicator to use the new function.
* src/xdisp.c (extend_face_to_end_of_line): Added a call to
handle_face_prop_general to extend face after EOL according to
parameter :extend in the faces.
* src/xdisp.c (handle_face_prop_general): New function to specialize
handle_face_prop with ATTR_FILTER.
* src/dispextern.h (face_at_buffer_position): Added
LFACE_ATTRIBUTE_INDEX.
* src/xfaces.c (merge_face_ref): Added LFACE_ATTRIBUTE_INDEX to merge
conditionally.
* src/dispextern.h (enum face_underline_type): Add FACE_NO_UNDERLINE = 0.
(struct face): Merge `underline_type` and `underline_p` into `underline`.
Update all the occurrences in src/xdisp.c, src/xfaces.c, and src/xterm.c.
Hong Xu [Mon, 14 Oct 2019 04:46:47 +0000 (06:46 +0200)]
Make url-hexify-string accept a list of allowed chars (bug#26469)
* lisp/url/url-util.el (url-hexify-string): Accept a list of allowed
chars.
* doc/misc/url.texi (URI Encoding): Update url-hexify-string doc and
index improvements (bug#24694).
Juri Linkov [Sun, 13 Oct 2019 22:00:38 +0000 (01:00 +0300)]
Don't display the number of windows in tab name in tab-bar by default.
* lisp/tab-bar.el (tab-bar-tab-name-function): Change the default value.
(tab-bar-tab-name-current): Rename from tab-bar-tab-name-selected-window.
(tab-bar-tab-name-current-with-count): New function.
(tab-bar-tab-name-all): Rename from tab-bar-tab-name-all-windows.
Juri Linkov [Sun, 13 Oct 2019 20:47:33 +0000 (23:47 +0300)]
Fix initial value of frame-inhibit-implied-resize
* src/frame.c (syms_of_frame): Update doc string and default value of
frame-inhibit-implied-resize in NS to not include 'tab-bar-lines,
and non-toolkit X builds to include 'tab-bar-lines.
* lisp/progmodes/compile.el (compilation-next-error-function):
Don't bug out with an incomprehensible error message on "make[2]:"
texts (bug#5316).
(compilation-find-file): Protect against there being no file name.
Add a new action in save-some-buffers to view the buffer
* doc/emacs/files.texi (Save Commands): Document it.
* lisp/files.el (save-some-buffers-action-alist): Offer to pop to
the buffer and then quit (bug#3625).
(save-some-buffers): Implement it.
(save-some-buffers--switch-window-callback): New variable.
Correctly explain test failures with mixed uni/multibyte strings
* lisp/emacs-lisp/ert.el (ert--explain-equal-rec):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-equal):
When explaining a difference between a unibyte and a multibyte string,
first convert both to multibyte. Otherwise, we might end up comparing
unibyte char C to multibyte char C, 127<C<256, and not detect the
difference (bug#30219).
* doc/lispref/nonascii.texi (Specifying Coding Systems): Don't use
'&rest' in conjunction with 'body...' in arglist of
with-coding-priority. Fix typo and cross-referencing (2-arg @pxref
adds a trailing period).
Stephen Gildea [Sun, 13 Oct 2019 14:58:55 +0000 (07:58 -0700)]
Minor tweaks to time-stamp documentation strings
* time-stamp.el (time-stamp): Reformat the explanation of the
variables that affect time-stamp, for easier reading. In particular,
wrap the documentation to 75 characters, so that it displays neatly as
a before-save-hook customization option.
* time-stamp-tests.el (with-time-stamp-test-env): Use imperative voice,
per checkdoc.
Alan Mackenzie [Sun, 13 Oct 2019 13:15:35 +0000 (13:15 +0000)]
In compilation-tear-down-arrow-spec-in-margin, test compilation-arrow-overlay
* lisp/progmodes/compile.el (compilation-tear-down-arrow-spec-in-margin): Make
sure compilation-arrow-overlay is an overlay before performing overlay
operations on it. This fixes bug #37733.
Make diff-mode understand git-format-patch separators
* lisp/vc/diff-mode.el (diff-prev-line-if-patch-separator):
A function to return prev. line if it has git-format-patch
separator.
(diff-end-of-hunk): Make use of
diff-prev-line-if-patch-separator
diff-buffer-type: whether a buffer is a git-diff
(define-derived-mode): set diff-buffer-type to appropriate
value (bug#37395).
* lisp/subr.el (read-password--hide-password): Factor out (bug#17127).
(read-passwd): Use it in post-command-hook instead of
after-change-functions to ensure that we hide the password no
matter what inserts text.