aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-06-04 09:25:22 -0700
committerGlenn Morris2018-06-04 09:25:22 -0700
commit4ee82a4ea98a17362fe36bfd5253eda768003683 (patch)
tree39ed0fb183144fbf32d482092a23f318dfc7f077
parenta3ec2e7edd9d84b83d22453dcaa37488b5c5d9e9 (diff)
parent03697e648c080f6b007b6ef8443fd4448bc52364 (diff)
downloademacs-4ee82a4ea98a17362fe36bfd5253eda768003683.tar.gz
emacs-4ee82a4ea98a17362fe36bfd5253eda768003683.zip
Merge from origin/emacs-26
03697e6 Fix remote-host directory tracking for shells in `term' buffers 16e8541 Update doc string of 'rx'
-rw-r--r--lisp/emacs-lisp/rx.el18
-rw-r--r--lisp/term.el31
2 files changed, 28 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 358f9db36c1..85e74f28ef0 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -978,12 +978,14 @@ CHAR
978 matches whitespace and graphic characters. 978 matches whitespace and graphic characters.
979 979
980`alphanumeric', `alnum' 980`alphanumeric', `alnum'
981 matches alphabetic characters and digits. (For multibyte characters, 981 matches alphabetic characters and digits. For multibyte characters,
982 it matches according to Unicode character properties.) 982 it matches characters whose Unicode `general-category' property
983 indicates they are alphabetic or decimal number characters.
983 984
984`letter', `alphabetic', `alpha' 985`letter', `alphabetic', `alpha'
985 matches alphabetic characters. (For multibyte characters, 986 matches alphabetic characters. For multibyte characters,
986 it matches according to Unicode character properties.) 987 it matches characters whose Unicode `general-category' property
988 indicates they are alphabetic characters.
987 989
988`ascii' 990`ascii'
989 matches ASCII (unibyte) characters. 991 matches ASCII (unibyte) characters.
@@ -992,10 +994,14 @@ CHAR
992 matches non-ASCII (multibyte) characters. 994 matches non-ASCII (multibyte) characters.
993 995
994`lower', `lower-case' 996`lower', `lower-case'
995 matches anything lower-case. 997 matches anything lower-case, as determined by the current case
998 table. If `case-fold-search' is non-nil, this also matches any
999 upper-case letter.
996 1000
997`upper', `upper-case' 1001`upper', `upper-case'
998 matches anything upper-case. 1002 matches anything upper-case, as determined by the current case
1003 table. If `case-fold-search' is non-nil, this also matches any
1004 lower-case letter.
999 1005
1000`punctuation', `punct' 1006`punctuation', `punct'
1001 matches punctuation. (But at present, for multibyte characters, 1007 matches punctuation. (But at present, for multibyte characters,
diff --git a/lisp/term.el b/lisp/term.el
index 715f39bbbfc..9aa4a20e36e 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -229,31 +229,33 @@
229;; 229;;
230;; Notice: for directory/host/user tracking you need to have something 230;; Notice: for directory/host/user tracking you need to have something
231;; like this in your shell startup script (this is for a POSIXish shell 231;; like this in your shell startup script (this is for a POSIXish shell
232;; like Bash but should be quite easy to port to other shells) 232;; like Bash but should be quite easy to port to other shells).
233;;
234;; For troubleshooting in Bash, you can check the definition of the
235;; custom functions with the "type" command. e.g. "type cd". If you
236;; do not see the expected definition from the config below, then the
237;; directory tracking will not work.
233;; 238;;
234;; ---------------------------------------- 239;; ----------------------------------------
235;; 240;;
236;; # Set HOSTNAME if not already set. 241;; # Set HOSTNAME if not already set.
237;; : ${HOSTNAME=$(uname -n)} 242;; : ${HOSTNAME=$(uname -n)}
238;; 243;;
239;; # su does not change this but I'd like it to 244;; # su does not change this but I'd like it to
240;;
241;; USER=$(whoami) 245;; USER=$(whoami)
242;; 246;;
243;; # ... 247;; # ...
244;; 248;;
245;; case $TERM in 249;; case $TERM in
246;; eterm*) 250;; eterm*)
247;; 251;;
248;; printf '%s\n' \ 252;; printf '%s\n' \
249;; -------------------------------------------------------------- \ 253;; -------------------------------------------------------------- \
250;; "Hello $user" \ 254;; "Hello $USER" \
251;; "Today is $(date)" \ 255;; "Today is $(date)" \
252;; "We are on $HOSTNAME running $(uname) under Emacs term mode" \ 256;; "We are on $HOSTNAME running $(uname) under Emacs term mode" \
253;; -------------------------------------------------------------- 257;; --------------------------------------------------------------
254;; 258;;
255;; export EDITOR=emacsclient
256;;
257;; # The \033 stands for ESC. 259;; # The \033 stands for ESC.
258;; # There is a space between "AnSiT?" and $whatever. 260;; # There is a space between "AnSiT?" and $whatever.
259;; 261;;
@@ -265,10 +267,11 @@
265;; printf '\033AnSiTh %s\n' "$HOSTNAME" 267;; printf '\033AnSiTh %s\n' "$HOSTNAME"
266;; printf '\033AnSiTu %s\n' "$USER" 268;; printf '\033AnSiTu %s\n' "$USER"
267;; 269;;
268;; eval $(dircolors $HOME/.emacs_dircolors) 270;; # Use custom dircolors in term buffers.
271;; # eval $(dircolors $HOME/.emacs_dircolors)
269;; esac 272;; esac
270;; 273;;
271;; # ... 274;; # ...
272;; 275;;
273;; 276;;
274 277
@@ -2742,12 +2745,10 @@ See `term-prompt-regexp'."
2742 (setq default-directory 2745 (setq default-directory
2743 (file-name-as-directory 2746 (file-name-as-directory
2744 (if (and (string= term-ansi-at-host (system-name)) 2747 (if (and (string= term-ansi-at-host (system-name))
2745 (string= term-ansi-at-user (user-real-login-name))) 2748 (string= term-ansi-at-user (user-real-login-name)))
2746 (expand-file-name term-ansi-at-dir) 2749 (expand-file-name term-ansi-at-dir)
2747 (if (string= term-ansi-at-user (user-real-login-name)) 2750 (concat "/-:" term-ansi-at-user "@" term-ansi-at-host ":"
2748 (concat "/" term-ansi-at-host ":" term-ansi-at-dir) 2751 term-ansi-at-dir))))
2749 (concat "/" term-ansi-at-user "@" term-ansi-at-host ":"
2750 term-ansi-at-dir)))))
2751 2752
2752 ;; I'm not sure this is necessary, 2753 ;; I'm not sure this is necessary,
2753 ;; but it's best to be on the safe side. 2754 ;; but it's best to be on the safe side.