diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 11ee6684cd5..2335543580f 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -424,13 +424,37 @@ Kill back to the beginning of the previous word (@code{backward-kill-word}). @end table - The @kbd{@key{DEL}} (@code{delete-backward-char}) command removes -the character before point, moving the cursor and the characters after -it backwards. If point was at the beginning of a line, this deletes -the preceding newline, joining this line to the previous one. +@cindex grapheme cluster +@cindex delete part of composed sequence of characters + The @kbd{@key{DEL}} (@code{delete-backward-char}) command removes the +character before point, moving the cursor and the characters after it +backwards. If point was at the beginning of a line, this deletes the +preceding newline, joining this line to the previous one. If the +character before point is composed with one or more of the preceding +characters, and is displayed together with them as a single display +unit, a so-called @dfn{grapheme cluster} representing the entire +sequence, @kbd{@key{DEL}} deletes only a single character from the +composed sequence, which in some cases can significantly change the +appearance of the text on display. (The command +@code{backward-delete-char-untabify}, usually bound to @key{DEL} in +programming modes, does the same, @pxref{Program Modes}.) This is in +contrast with commands like @code{delete-char-forward}, which delete the +entire composed sequence of characters after point, see below. - If, however, the region is active, @kbd{@key{DEL}} instead deletes -the text in the region. @xref{Mark}, for a description of the region. +@vindex composition-break-at-point + For long enough sequences of composed characters, using +@kbd{@key{DEL}} to delete them one by one might be inconvenient. In +those cases, you can customize the option +@code{composition-break-at-point} to a non-@code{nil} value, to have +Emacs show characters around point separately, instead of showing the +result of their composition. This allows editing the composed sequence +of characters more conveniently, because you can move point inside the +composed sequence and delete characters there without having to delete +(and later re-insert) the following ones. + + If the region is active, @kbd{@key{DEL}} deletes the text in the +region instead of deleting a single character. @xref{Mark}, for a +description of the region. On most keyboards, @key{DEL} is labeled @key{BACKSPACE}, but we refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} @@ -438,18 +462,20 @@ with the @key{Delete} key; we will discuss @key{Delete} momentarily.) On some text terminals, Emacs may not recognize the @key{DEL} key properly. @xref{DEL Does Not Delete}, if you encounter this problem. -@cindex grapheme cluster, deletion +@cindex composed sequence of characters, deletion @cindex delete entire grapheme cluster The @key{Delete} (@code{delete-forward-char}) command deletes in the opposite direction: it deletes the character after point, i.e., the character under the cursor. If point was at the end of a line, this joins the following line onto this one. Like @kbd{@key{DEL}}, it deletes the text in the region if the region is active (@pxref{Mark}). -If the character after point is composed with following characters and -displayed as a single display unit, a so-called @dfn{grapheme cluster} -representing the entire sequence, @key{Delete} deletes the entire -sequence in one go. This is in contrast to @key{DEL} which always -deletes a single character, even if the character is composed. +If the character after point is composed with following characters, +@key{Delete} deletes the entire composed sequence in one go. This is in +contrast to @key{DEL} which always deletes a single character, even if +the character is composed. If @code{composition-break-at-point} is +non-@code{nil}, @key{Delete} deletes all of the composed characters from +point to the end of the composed sequence, which could be only a part of +the sequence if you moved point into the sequence. @kbd{C-d} (@code{delete-char}) deletes the character after point, similar to @key{Delete}, but regardless of whether the region is diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5bc28580cf1..5cbcb810824 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -1833,7 +1833,7 @@ and the target host matching @var{user}@@@var{host}. @var{host} and @var{user} are regular expressions or @code{nil}, interpreted as a regular expression which always matches. -@var{proxy} is a literal @value{tramp} file name whose local name part +@var{proxy} is a literal @value{tramp} file name whose localname part is ignored, and the method and user name parts are optional. The method must be an inline method (@pxref{Inline methods}). If @@ -3712,7 +3712,7 @@ name. For example: @file{@trampfn{ssh,daniel@@melancholia#42,.emacs}}. If the host is an IPv6 address, the port is appended like this: @file{@trampfn{ssh,@value{ipv6prefix}::1@value{ipv6postfix}#42,.emacs}}. -All method, user name, host name, port number and local name parts are +All method, user name, host name, port number and localname parts are optional, @xref{Default Method}, @xref{Default User}, @xref{Default Host}. @ifset unified For syntactical reasons, the default method must be indicated by the @@ -4103,6 +4103,24 @@ configured to expand a home directory via a connection property, When your remote file name does not contain a @samp{user} part, the connection property @t{"~"} must be used instead. +In case there is no remote home directory and you haven't specified a +respective connection property, you should avoid using @file{~} in +file names. This means for example + +@itemize +@item +Don't use a remote file name like @file{@trampfn{ssh,user@@host,}} or +@file{@trampfn{ssh,user@@host,~/}}. Use an absolute localname part +instead, like @file{@trampfn{ssh,user@@host,/path/to/file}}. + +@item +Disable @code{tramp-histfile-override}, @ref{Managing remote shell history}: + +@lisp +(setopt tramp-histfile-override nil) +@end lisp +@end itemize + @node Remote processes @section Integration with other Emacs packages diff --git a/etc/themes/newcomers-presets-theme.el b/etc/themes/newcomers-presets-theme.el index b2082a518c5..ea7cfd268f7 100644 --- a/etc/themes/newcomers-presets-theme.el +++ b/etc/themes/newcomers-presets-theme.el @@ -91,7 +91,12 @@ This minor mode will enable and disable the theme on startup." ;;;###theme-autoload (deftheme newcomers-presets - "Theme of user options settings interesting for newcomers." + "Theme of user options settings interesting for newcomers. + +The functionality enabled by this theme will change between releases of +Emacs. Therefore, if you get used to these presets, **you should copy +them into your own configuration and then disable this theme again.** +You can use \\[copy-theme-options] to do this." :kind 'user-options) (custom-theme-set-variables diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index b297c866bd4..59cb1d72672 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -2161,24 +2161,26 @@ diagnostics at point. This function doesn't move point" (interactive - (if (mouse-event-p last-command-event) - (with-selected-window (posn-window (event-end last-command-event)) - (with-current-buffer (window-buffer) - (let* ((event-point (posn-point (event-end last-command-event))) - (diags - (or - (flymake-diagnostics event-point) - (let (event-lbp event-lep) - (save-excursion - (goto-char event-point) - (setq event-lbp (line-beginning-position) - event-lep (line-end-position))) - (flymake-diagnostics event-lbp event-lep)))) - (diag (car diags))) - (unless diag - (error "No diagnostics here")) - (list diag)))) - (flymake-diagnostics (point)))) + (let* ((diags + (if (mouse-event-p last-command-event) + (with-selected-window + (posn-window (event-end last-command-event)) + (with-current-buffer (window-buffer) + (let ((event-point (posn-point + (event-end last-command-event)))) + (or (flymake-diagnostics event-point) + (let (event-lbp event-lep) + (save-excursion + (goto-char event-point) + (setq event-lbp (line-beginning-position) + event-lep (line-end-position))) + (flymake-diagnostics event-lbp + event-lep)))))) + (flymake-diagnostics (point)))) + (diag (car diags))) + (unless diag + (error "No diagnostics here")) + (list diag))) (unless flymake-mode (user-error "Flymake mode is not enabled in the current buffer")) (let* ((name (flymake--diagnostics-buffer-name)) diff --git a/lisp/simple.el b/lisp/simple.el index 8fa2537dbd2..68541c577ea 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -510,10 +510,11 @@ select the source buffer." (defvar next-error-follow-last-line nil) (define-minor-mode next-error-follow-minor-mode - "Minor mode for compilation, occur and diff modes. + "Minor mode for Compilation, Grep, Occur and Diff modes. -When turned on, cursor motion in the compilation, grep, occur or diff -buffer causes automatic display of the corresponding source code location." +When turned on, cursor motion in Compilation, Grep, Occur and Diff mode +buffers causes automatic display of the corresponding source code +location." :group 'next-error :init-value nil :lighter " Fol" (if (not next-error-follow-minor-mode) (remove-hook 'post-command-hook 'next-error-follow-mode-post-command-hook t) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 7cc81db1ffb..ea4630d6dfb 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1083,10 +1083,10 @@ Positive ARG means turn on, negative turn off. A nil ARG means toggle. Once the speedbar window is activated, a buffer in `speedbar-mode' will be displayed. Currently, only one speedbar is supported at a time. -`speedbar-before-popup-hook' is called before popping up the speedbar frame. `speedbar-before-delete-hook' is called before the frame is deleted." (interactive "P") (when (eq (speedbar-frame-or-window) 'frame) + (run-hooks 'speedbar-before-delete-hook) (delete-frame (speedbar-current-frame))) (if (or (and (not arg) (speedbar-window--live-p))