commit 4be16866b959dd173e4016b8a16590093686e1f1 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Sat May 2 22:50:14 2020 +0200 Use lexical-binding for some term libraries This takes care of the most trivial cases, but there are more that could be easily converted. * lisp/term/bobcat.el: * lisp/term/cygwin.el: * lisp/term/konsole.el: * lisp/term/linux.el: * lisp/term/vt100.el: * lisp/term/vt200.el: Use lexical-binding. diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index a32da6ae8f..983c8cded2 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el @@ -1,3 +1,4 @@ +;;; bobcat.el -*- lexical-binding:t -*- (defun terminal-init-bobcat () "Terminal initialization function for bobcat." diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el index edc64b4404..8f0d751cf2 100644 --- a/lisp/term/cygwin.el +++ b/lisp/term/cygwin.el @@ -1,4 +1,4 @@ -;;; cygwin.el --- support for the Cygwin terminal +;;; cygwin.el --- support for the Cygwin terminal -*- lexical-binding:t -*- ;;; The Cygwin terminal can't really display underlines. diff --git a/lisp/term/konsole.el b/lisp/term/konsole.el index 8b2e7e1d5f..4af818b4a6 100644 --- a/lisp/term/konsole.el +++ b/lisp/term/konsole.el @@ -1,4 +1,4 @@ -;;; konsole.el --- terminal initialization for konsole +;;; konsole.el --- terminal initialization for konsole -*- lexical-binding:t -*- ;; Copyright (C) 2017-2020 Free Software Foundation, Inc. (require 'term/xterm) diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 70730dc584..35bd3ac0ac 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -1,4 +1,4 @@ -;; The Linux console handles Latin-1 by default. +;; The Linux console handles Latin-1 by default. -*- lexical-binding:t -*- (declare-function gpm-mouse-enable "t-mouse" ()) diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index 7ddbe38a28..2df1414523 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el @@ -1,4 +1,4 @@ -;;; vt100.el --- define VT100 function key sequences in function-key-map +;;; vt100.el --- define VT100 function key sequences in function-key-map -*- lexical-binding:t -*- ;; Copyright (C) 1989, 1993, 2001-2020 Free Software Foundation, Inc. diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index dde2e22906..569b79e25a 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el @@ -1,3 +1,5 @@ +;;; vt200.el -*- lexical-binding:t -*- + ;; For our purposes we can treat the vt200 and vt100 almost alike. ;; Most differences are handled by the termcap entry. (defun terminal-init-vt200 () commit 11fd01c9941cc9fcf760750a7e287edae02779c9 Author: Stefan Kangas Date: Sat May 2 22:41:20 2020 +0200 Improve Info-mode doc and menu * lisp/info.el (Info-mode-menu): Re-arrange to be more logical, move items into submenus, add 'Info-directory' and separators. (Info-mode): Add 'end-of-buffer' to doc string. (Bug#39042) diff --git a/lisp/info.el b/lisp/info.el index 3015e60a4f..d579ecc5a3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4079,22 +4079,28 @@ If FORK is non-nil, it is passed to `Info-goto-node'." :help "Go to top node of file"] ["Final Node" Info-final-node :help "Go to final node in this file"] + "---" ("Menu Item" ["You should never see this" report-emacs-bug t]) ("Reference" ["You should never see this" report-emacs-bug t]) ["Search..." Info-search :help "Search for regular expression in this Info file"] ["Search Next" Info-search-next :help "Search for another occurrence of regular expression"] - ["Go to Node..." Info-goto-node + "---" + ("History" + ["Back in history" Info-history-back :active Info-history + :help "Go back in history to the last node you were at"] + ["Forward in history" Info-history-forward :active Info-history-forward + :help "Go forward in history"] + ["Show History" Info-history :active Info-history-list + :help "Go to menu of visited nodes"]) + ("Go to" + ["Go to Node..." Info-goto-node :help "Go to a named node"] - ["Back in history" Info-history-back :active Info-history - :help "Go back in history to the last node you were at"] - ["Forward in history" Info-history-forward :active Info-history-forward - :help "Go forward in history"] - ["History" Info-history :active Info-history-list - :help "Go to menu of visited nodes"] - ["Table of Contents" Info-toc - :help "Go to table of contents"] + ["Table of Contents" Info-toc + :help "Go to table of contents"] + ["Go to Directory" Info-directory + :help "Go to the Info directory node."]) ("Index" ["Lookup a String..." Info-index :help "Look for a string in the index items"] @@ -4108,6 +4114,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'." :help "Copy the name of the current node into the kill ring"] ["Clone Info buffer" clone-buffer :help "Create a twin copy of the current Info buffer."] + "---" ["Exit" quit-window :help "Stop reading Info"])) @@ -4358,6 +4365,7 @@ Moving within a node: already visible, try to go to the previous menu entry, or up if there is none. \\[beginning-of-buffer] Go to beginning of node. +\\[end-of-buffer] Go to end of node. Advanced commands: \\[Info-search] Search through this Info file for specified regexp, commit a941a9e8c226cff8eb77c4f8d7d0d54cb4a36340 Author: Michael Albinus Date: Sat May 2 12:48:55 2020 +0200 ;; Revert recent change in tramp-cache.el * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Remove compatibility code dumping the persistency file. Use `emacs-lisp-mode' for backward compatibility. diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 6d87ce297b..14a64382ac 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -472,15 +472,10 @@ used to cache connection properties of the local machine." ;; Dump it. (with-temp-file tramp-persistency-file-name (insert - ";; -*- lisp-data -*-" - ;; `time-stamp-string' might not exist in all Emacs flavors. - (condition-case nil - (progn - (format - " <%s %s>\n" - (time-stamp-string "%02y/%02m/%02d %02H:%02M:%02S") - tramp-persistency-file-name)) - (error "\n")) + ;; Starting with Emacs 28, we could use `lisp-data'. + (format ";; -*- emacs-lisp -*- <%s %s>\n" + (time-stamp-string "%02y/%02m/%02d %02H:%02M:%02S") + tramp-persistency-file-name) ";; Tramp connection history. Don't change this file.\n" ";; Run `M-x tramp-cleanup-all-connections' instead.\n\n" (with-output-to-string commit 0ea1463e6796a5c0f8e10c4be0a891f417c0ae66 Author: Eli Zaretskii Date: Sat May 2 11:45:05 2020 +0300 Fix 'count-screen-lines' when lines are truncated * lisp/window.el (count-screen-lines): Fix the return value when lines are truncated in the window, and the end of the region is invisible due to this truncation. (Bug#40849) diff --git a/lisp/window.el b/lisp/window.el index 8512a0e2f9..d658cb81f6 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8638,16 +8638,32 @@ in some window." (setq end (point-max))) (if (= beg end) 0 - (save-excursion - (save-restriction - (widen) - (narrow-to-region (min beg end) - (if (and (not count-final-newline) - (= ?\n (char-before (max beg end)))) - (1- (max beg end)) - (max beg end))) - (goto-char (point-min)) - (1+ (vertical-motion (buffer-size) window)))))) + (let ((start (min beg end)) + (finish (max beg end)) + count end-invisible-p) + ;; When END is invisible because lines are truncated in WINDOW, + ;; vertical-motion returns a number that is 1 larger than it + ;; should. We need to fix that. + (setq end-invisible-p + (and (or truncate-lines + (and (natnump truncate-partial-width-windows) + (< (window-total-width window) + truncate-partial-width-windows))) + (save-excursion + (goto-char finish) + (> (- (current-column) (window-hscroll window)) + (window-body-width window))))) + (save-excursion + (save-restriction + (widen) + (narrow-to-region start + (if (and (not count-final-newline) + (= ?\n (char-before finish))) + (1- finish) + finish)) + (goto-char start) + (setq count (vertical-motion (buffer-size) window)) + (if end-invisible-p count (1+ count))))))) (defun window-buffer-height (window) "Return the height (in screen lines) of the buffer that WINDOW is displaying.