Alan Mackenzie [Sat, 28 May 2022 12:55:32 +0000 (12:55 +0000)]
do_switch_frame: before leaving mini-window, check other (mru) window is live
This fixes bug#55684. There, with a minibuffer-only frame at start up,
Emacs tried to switch to this frame, whose selected window was the
mini-window. There is no other active window in this frame, so the
attempt to swith to another window failed.
* src/frame.c (do_switch_frame): On switching to a frame whose selected
window is as above, before selecting the most recently used window, check
this ostensible window is an actual live window. Otherwise leave the
mini-window selected.
Eli Zaretskii [Sat, 28 May 2022 11:57:55 +0000 (14:57 +0300)]
Fix commands used to produce on-line HTML docs
* admin/admin.el (manual-meta-string): Only include the first
line, and move the rest...
(manual-links-string): ...to this new string.
(manual-html-fix-headers): Don't remove the '<meta name=' elements
produced by makeinfo, especially not the 'name="viewport"' one,
which is essential for viewing the docs on mobile devices.
Reported by "Facundo Lander via RT" <webmasters-comment@gnu.org>,
see gnu.org ticket #1840138.
Alan Mackenzie [Fri, 20 May 2022 20:18:38 +0000 (20:18 +0000)]
Restore the Fselect_window call in gui_consider_frame_title.
This fixes bug #55412. The call to Fselect_window was removed on 2021-03-21
in the commit "Prevent open minibuffers getting lost when their frame gets
deleted". This call is actually needed to determine current elements of the
pertinent window and frame when these are used in the frame title.
* src/frame.c (do_switch_frame): When the selected window in the target frame
is the mini-window, switch away from this window unless there is a valid
minibuffer there.
* src/frame.h (struct frame): Add an incidental comment about the element
selected_window.
* src/minibuf.c (move_minibuffers_onto_frame): No longer set the selected
window of the source frame. This action is now performed later, on returning
to that frame, in do_switch_frame when needed (see above).
* src/xdisp.c (gui_consider_frame_title): Replace the Fselect_window call and
associated ancillary settings.
Michael Albinus [Sun, 15 May 2022 13:09:26 +0000 (15:09 +0200)]
Hide temporary FUSE files in Tramp
* lisp/net/tramp-fuse.el (tramp-fuse-remove-hidden-files): New defsubst.
(tramp-fuse-handle-directory-files)
(tramp-fuse-handle-file-name-all-completions): Use it.
Eli Zaretskii [Fri, 13 May 2022 12:00:21 +0000 (15:00 +0300)]
Fix lexical-binding fallout in vhdl-mode.el
* lisp/progmodes/vhdl-mode.el (arch-alist, pack-alist)
(file-alist, unit-alist, rule-alist): Defvar them, since vhdl-aput
expects them to be dynamically bound. (Bug#55389)
(vhdl-speedbar-insert-hierarchy): Rename the PACK-ALIST argument
to PACKAGE-ALIST, to avoid shadowing the global variable.
Alan Mackenzie [Sun, 8 May 2022 11:39:45 +0000 (11:39 +0000)]
Linux console: don't translate ESC TAB to `backtab' in input-decode-map.
This translation happened after the terminfo entry for <shift>TAB in the linux
section was changed to kcbt=\E^I in ncurses version 6.3.
* lisp/term/linux.el (terminal-init-linux): Add a define-key form to remove
the entry for "\e\t" from input-decode-map.
* etc/PROBLEMS: Add a new section under "character terminals" about S-TAB
wrongly doing the same thing as M-TAB, giving tips about amending the Linux
keyboard layout.
Michael Albinus [Sun, 8 May 2022 09:43:19 +0000 (11:43 +0200)]
Handle changed scp protocol in Tramp, don't merge
* lisp/net/tramp-sh.el (tramp-scp-force-scp-protocol): New defvar.
(tramp-scp-force-scp-protocol): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Use it.
(tramp-methods) <scp, scpx>: Use "%y".
Eli Zaretskii [Thu, 28 Apr 2022 14:53:36 +0000 (17:53 +0300)]
Improve documentation of font- and face-related attribute functions
* lisp/faces.el (face-attribute):
* src/xfaces.c (Fx_family_fonts):
* src/font.c (Ffont_get, Ffont_put): Improve and clarify the doc
strings.
* doc/lispref/display.texi (Low-Level Font): Document the :type
attribute of a font. Improve documentation of 'font-get' and
'font-put'.
(Attribute Functions): Add cross-reference to the description of
face attributes.
Eli Zaretskii [Sun, 24 Apr 2022 06:56:22 +0000 (09:56 +0300)]
Improve documentation of 'set-fontset-font'
* doc/lispref/display.texi (Fontsets):
* src/fontset.c (Fset_fontset_font): Improve and clarify the
documentation of 'set-fontset-font'. Rename the arguments to be
more self-explanatory. (Bug#55086)
Eli Zaretskii [Thu, 21 Apr 2022 20:18:42 +0000 (23:18 +0300)]
Avoid a redisplay loop when 'overlay-arrow-string' is non-ASCII
* src/xdisp.c (get_overlay_arrow_glyph_row): Don't assume every
character in 'overlay-arrow-string' is one byte long. Reported by
Yuri D'Elia <wavexx@thregr.org>.
Eli Zaretskii [Thu, 21 Apr 2022 06:06:09 +0000 (09:06 +0300)]
Fix customization-group of 'python-forward-sexp-function'
* lisp/progmodes/python.el (python-forward-sexp-function): Make it
be part of both 'python' and 'python-flymake' groups. (Bug#55027)
Do not merge to master.
This is a partial backport from master: it only includes the changes below.
* lib/mini-gmp.c (gmp_assert_nocarry): Avoid many Clang
unused-variable warnings when building with optimisation.
* lib/verify.h (_GL_HAVE__STATIC_ASSERT): Modify condition for using
_Static_assert to cope with older Apple builds of Clang exposing
misleading compiler version numbers. See discussion starting at
https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00779.html
* lisp/emulation/viper-cmd.el (viper-quote-region)
(viper-read-string-with-history, viper-query-replace): Revert
prompting changes done in 50512e3 -- the way viper prompts in
command mode is special (bug#55007).
Avoid hangs in python-mode with debug-on-error set
* lisp/progmodes/python.el (python-nav-end-of-statement): Avoid
using cl-assert here, because this is called from the font-lock
machinery, and if debug-on-error is set here, we'll hang Emacs
(bug#54996).
This is a change with far-reaching effects on MS-Windows at the least,
where file-related APIs are shadowed to support transparent support
for UTF-8 encoded file names. Making such changes on a stable branch
for the benefit of a proprietary platform with a 13-year old OS is a
tail wagging the dog. Please don't do that without discussing first.
Paul Eggert [Sun, 17 Apr 2022 17:41:17 +0000 (10:41 -0700)]
Don’t assume openat
Use openat only on platforms with O_PATH.
This ports to OS X 10.9 and earlier.
Problem reported by Keith David Bershatsky in:
https://lists.gnu.org/r/emacs-devel/2022-04/msg00805.html
* lib-src/emacsclient.c (local_sockname): Use open, not openat.
* src/sysdep.c (sys_openat): New static function,
which uses openat only if O_PATH is defined.
(emacs_openat): Use it instead of openat.
(emacs_openat_noquit): Remove.
(emacs_open_noquit): Reimplement as per the old emacs_openat_noquit,
but use plain 'open'.
Paul Eggert [Sun, 17 Apr 2022 08:06:46 +0000 (01:06 -0700)]
Fix GC bug in filelock.c
Fix a bug where if GC occurred at the wrong moment when locking a
file, the lock file’s name was trashed so file locking did not work.
This bug was introduced in Emacs 28.1. The bug sometimes caused
filelock-tests-detect-external-change test failures on Fedora 35
x86-64 in an en_US.utf8 locale.
* src/filelock.c (lock_file_1, current_lock_owner, lock_if_free)
(lock_file, unlock_file, Ffile_locked_p):
Use Lisp_Object, not char *, for string, so that GC doesn’t trash
string contents.
(make_lock_file_name): Return the encoded name, not the original.
All callers changed.
This adds back macOS-specific code replaced earlier (bug#48548),
specifically to fix build errors on macOS 10.7.5. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00779.html .
* src/sysdep.c (HAVE_RUSAGE_INFO_CURRENT, HAVE_PROC_PIDINFO): New.
(system_process_attributes): Use alternative code or exclude features
when building on older macOS versions.
Eli Zaretskii [Fri, 15 Apr 2022 20:03:15 +0000 (23:03 +0300)]
Improve discoverability of 'insert-directory-program'
* lisp/files.el (insert-directory-program): Mention 'dired' in the
doc string.
* lisp/dired.el (dired): Mention 'insert-directory-program' in the
doc string. (Bug#54962)
Eli Zaretskii [Fri, 15 Apr 2022 09:03:36 +0000 (12:03 +0300)]
Fix cursor motion under truncate-lines with Flymake fringe indicator
* src/indent.c (Fvertical_motion): Don't consider fringe bitmaps
as "images" for the purpose of vertical-motion logic dealing with
overshooting buffer positions. (Bug#54946)
Make all vc-*-responsible-p functions return a string
* lisp/vc/vc-sccs.el (vc-sccs-responsible-p):
* lisp/vc/vc-rcs.el (vc-rcs-responsible-p):
* lisp/vc/vc-dav.el (vc-dav-responsible-p):
* lisp/vc/vc-cvs.el (vc-cvs-responsible-p): Return a file name
instead of t when we get a match (which is what
vc-backend-for-registration expects) (bug#51800).
Eli Zaretskii [Tue, 12 Apr 2022 14:05:15 +0000 (17:05 +0300)]
Fix 'window-text-pixel-width' when starting from display property
* src/xdisp.c (Fwindow_text_pixel_size): Handle the case where
there's a display property at START, and move_it_to overshoots.
Do not merge to master. (Bug#54862)
Eli Zaretskii [Mon, 11 Apr 2022 11:31:04 +0000 (14:31 +0300)]
Fix default-directory of buffers visiting files in renamed directories
* lisp/dired-aux.el (dired-rename-file): Take note of whether FILE
is a directory before it is renamed, which makes it impossible to
determine if it was a directory.
(dired-rename-subdir, dired-rename-subdir-1): Revert to using
dired-in-this-tree-p instead of file-in-directory-p, for the
benefit of files that were renamed/removed, because
file-in-directory-p returns nil in those cases. (Bug#54838)
* msdos/sed1v2.inp (MAKE_PDUMPER_FINGERPRINT): Fix indentation, so
that Make won't consider this line a command.
($(etc)/DOC): Chdir back to ../src, since "make-docfile -d" leaves
us in a wrong directory.
* msdos/sedlibmk.inp (GL_GNULIB_GETRANDOM, GL_GNULIB_MEMMEM)
(GL_GNULIB_SIGDESCR_NP): Define to 1, to get the prototypes from
Gnulib headers.
Eli Zaretskii [Fri, 8 Apr 2022 18:11:16 +0000 (21:11 +0300)]
Update and fix instructions and scripts for updating the Web pages
* admin/admin.el (manual-html-fix-index-2): Support Texinfo 6.8
and later by not converting TOC menus into tables. (Bug#49719)
* admin/upload-manuals (New directory): Invoke "cvs add" in
$webdir, to pick up the correct CVSROOT.
* admin/make-tarball.txt: Update the section about the Emacs Web
pages.
* etc/refcards/Makefile (pl-refcard.dvi): If mex.fmt cannot be
found, invoke 'mex' instead of 'tex'.