Raimon Grau [Sat, 19 Oct 2019 09:46:17 +0000 (11:46 +0200)]
Fix optional parameter passing in calc-fin-* functions
* lisp/calc/calc-fin.el (calc-fin-pv, calc-fin-fv, calc-fin-pmt)
(calc-fin-pner, calc-fin-rate): Add support for an optional
parameter standing for an initial lump. The functions already
support it but the extra parameter was not taken into account in
stack mode. This commit it takes into consideration when deciding
if a function takes 3 or 4 parameters (bug#37649).
Eli Zaretskii [Sat, 19 Oct 2019 09:12:31 +0000 (12:12 +0300)]
Fix display of Info files on TTY frames
* lisp/info.el (info-symbols-and-replacements): New variable.
(Info-mode): Use 'info-symbols-and-replacements' to set up a
buffer-display-table for non-ASCII symbols used by Info files
that cannot be displayed on TTY frames.
Eli Zaretskii [Sat, 19 Oct 2019 07:42:14 +0000 (10:42 +0300)]
A better fix for tab-line mouse highlight on TTY frames
* src/dispnew.c (mode_line_string):
* src/xdisp.c (note_mode_line_or_margin_highlight): Remove
recently-added workarounds for incorrect TTY mouse highlight:
they are no longer needed.
(mark_window_display_accurate_1): Set the header_line_p and
tab_line_p flags of the window's current_matrix if the window
displays these.
(display_mode_line): Set the header_line_p and tab_line_p
flags of the window's desired_matrix if the window displays
these. (Bug#37807)
Paul Eggert [Fri, 18 Oct 2019 22:33:13 +0000 (15:33 -0700)]
Pacify x86 GCC 9 in tab bar code
* src/xdisp.c (tty_get_tab_bar_item): Simplify a bit. This
pacifies --enable-gcc-warnings with x86 GCC 9.2.1 20190827
(Red Hat 9.2.1-1) when combined with -fsanitize=undefined.
Paul Eggert [Fri, 18 Oct 2019 20:21:11 +0000 (13:21 -0700)]
Generalize list1i etc. to all signed integer types
* src/lisp.h (list1i, list2i, list3i, list4i):
Accept intmax_t instead of EMACS_INT, and use make_int instead
of make_fixnum. This should help avoid integer-overflow
problems akin to the Time bug (Bug#37795).
Paul Eggert [Fri, 18 Oct 2019 20:07:49 +0000 (13:07 -0700)]
Fix integer-overflow bug in Time conversion
Problem reported by Stefan Monnier (Bug#37795).
* src/keyboard.c (make_lispy_position)
(make_scroll_bar_position, make_lispy_event):
* src/xterm.c (x_ewmh_activate_frame):
Use INT_TO_INTEGER to convert Time to a Lisp integer,
since the value might not be a fixnum.
Eli Zaretskii [Fri, 18 Oct 2019 15:48:31 +0000 (18:48 +0300)]
Fix mouse highlight with tab-line on TTY frames
* src/xdisp.c (note_mode_line_or_margin_highlight):
* src/dispnew.c (mode_line_string): Fix mouse highlight on TTY
frames when both header line and tab-line are displayed.
(Bug#37807)
Eli Zaretskii [Fri, 18 Oct 2019 14:55:21 +0000 (17:55 +0300)]
Fix handling of mouse events on header line with tab-line
* src/window.c (coordinates_in_window): Fix conditions for
coordinates being on the window's header line when that
window also displays a tab-line. (Bug#37807)
Use [^z-a] for matching any character (anychar/anything) in rx
* lisp/emacs-lisp/rx.el (rx--translate-symbol):
* test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-atoms):
Use [^z-a] instead of ".\\|\n" for anychar.
The new expression is faster (about 2×) and does not allocate regexp
stack space. For example, (0+ anychar) now matches strings of any
size (bug#37659).
Add `anychar' as alias to `anything' in rx (bug#37659)
* lisp/emacs-lisp/rx.el (rx--translate-symbol, rx--builtin-symbols, rx):
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms):
* doc/lispref/searching.texi (Rx Constructs):
* etc/NEWS:
Add `anychar', an alias for `anything'. Since `anychar' is more
descriptive (and slightly shorter), treat it as the preferred name.
Peter Oliver [Thu, 17 Oct 2019 02:43:38 +0000 (04:43 +0200)]
Allow vc-sccs-diff to work with TRAMP
* lisp/vc/vc-sccs.el (vc-sccs-diff): If the diff command is to be
run remotely, then the temporary files it's acting on must be
remote too (bug#37777).
* lisp/vc/vc-hg.el (vc-hg-state-slow, vc-hg-merge-branch)
(vc-hg-command): Add "--config" "ui.report_untrusted=0" to the
log commands to avoid "Hg-not trusting file " messages in the mode
line (bug#31497).
lisp/*.el, src/*.c: Doc fixes related to returning t vs non-nil
* lisp/progmodes/flymake-proc.el (flymake-proc--find-buffer-for-file):
Doc fix; return value is a buffer, not t.
* lisp/progmodes/ebrowse.el (ebrowse-member-display-p):
Doc fix; return value is the MEMBER argument, not nil.
* lisp/files.el (hack-one-local-variable-eval-safep):
* lisp/play/doctor.el (doctor-nounp, doctor-pronounp):
* lisp/progmodes/flymake-proc.el (flymake-proc--check-include):
* lisp/progmodes/js.el (js--broken-arrow-terminates-line-p):
Doc fix; a non-nil return value is not always t.
* lisp/image.el (image-type-available-p):
* lisp/simple.el (region-active-p):
* lisp/window.el (frame-root-window-p):
* src/buffer.c (Fbuffer_live_p):
* src/image.c (Finit_image_library):
* src/window.c (Fwindow_minibuffer_p):
Doc fix; a non-nil return value is always t.
lisp/speedbar.el: Fix computation of boolean return values
* lisp/speedbar.el (speedbar-check-vc-this-line):
Normalize boolean result.
(speedbar-this-file-in-vc): Use `run-hook-with-args-until-success'
to check for files under versin control. Doc fix.
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.