aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2011-08-30 09:50:25 +0200
committerJoakim Verona2011-08-30 09:50:25 +0200
commitb72c6fe2ac5f148b00ceed70a910c7c9ee6a669e (patch)
tree7c64545ae0d8f0d99b82134e04e43b0759d776bc /lisp
parent9fb7b0cab34a48a4c7b66abb6b8edc4ee20467b4 (diff)
parent393aa9d403dda96b2fa061311cc76bbad40489cf (diff)
downloademacs-b72c6fe2ac5f148b00ceed70a910c7c9ee6a669e.tar.gz
emacs-b72c6fe2ac5f148b00ceed70a910c7c9ee6a669e.zip
upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog45
-rw-r--r--lisp/cus-theme.el5
-rw-r--r--lisp/emacs-lisp/package.el2
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/mml-smime.el2
-rw-r--r--lisp/gnus/mml2015.el2
-rw-r--r--lisp/help-mode.el43
-rw-r--r--lisp/isearch.el2
-rw-r--r--lisp/net/rcirc.el9
-rw-r--r--lisp/org/ChangeLog14
-rw-r--r--lisp/progmodes/cc-fonts.el97
-rw-r--r--lisp/server.el5
-rw-r--r--lisp/shell.el26
13 files changed, 179 insertions, 79 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8a57fe75405..15296e09b46 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,48 @@
12011-08-29 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (isearch-done): Don't display message "Mark saved"
4 when arg `edit' is non-nil to prevent its flicker in the echo area.
5
62011-08-28 Chong Yidong <cyd@stupidchicken.com>
7
8 * emacs-lisp/package.el (package-menu-mark-delete): Allow marking
9 obsolete packages for deletion.
10
112011-08-28 Christoph Scholtes <cschol2112@googlemail.com>
12
13 * help-mode.el (help-mode-map): Add special-mode-map to parent.
14 (help-mode): Derive help-mode from special-mode. Don't invoke
15 view-mode from help-mode.
16 (help-xref-override-view-map): Remove.
17 (help-make-xrefs): Remove minor-mode-overriding-map-alist since
18 view-mode is not used anymore.
19
202011-08-28 Chong Yidong <cyd@stupidchicken.com>
21
22 * server.el (server-port): Doc fix.
23
24 * cus-theme.el (custom-theme-choose-mode): Inherit from
25 special-mode (Bug#9124).
26 (custom-theme-choose-mode-map): Add special-mode to parent.
27
282011-08-28 Alan Mackenzie <acm@muc.de>
29
30 * progmodes/cc-fonts.el
31 (c-make-font-lock-BO-decl-search-function): New function.
32 (c-basic-matchers-after - "Fontify the clauses after various
33 keywords"): Extract the three keyword lists for the 3 erroneous
34 constructs from the list of four, and use the new function above
35 in place of an old one.
36
372011-08-28 Deniz Dogan <deniz@dogan.se>
38
39 * net/rcirc.el (rcirc-insert-prev-input)
40 (rcirc-insert-next-input): Remove unused argument.
41
422011-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
43
44 * shell.el (shell-parse-pcomplete-arguments): Unquote args (bug#9160).
45
12011-08-27 Alan Mackenzie <acm@muc.de> 462011-08-27 Alan Mackenzie <acm@muc.de>
2 47
3 * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it 48 * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 04a9e728b22..1f33c3e8256 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -521,7 +521,8 @@ It includes all faces in list FACES."
521 521
522(defvar custom-theme-choose-mode-map 522(defvar custom-theme-choose-mode-map
523 (let ((map (make-keymap))) 523 (let ((map (make-keymap)))
524 (set-keymap-parent map widget-keymap) 524 (set-keymap-parent map (make-composed-keymap widget-keymap
525 special-mode-map))
525 (suppress-keymap map) 526 (suppress-keymap map)
526 (define-key map "\C-x\C-s" 'custom-theme-save) 527 (define-key map "\C-x\C-s" 'custom-theme-save)
527 (define-key map "n" 'widget-forward) 528 (define-key map "n" 'widget-forward)
@@ -530,7 +531,7 @@ It includes all faces in list FACES."
530 map) 531 map)
531 "Keymap for `custom-theme-choose-mode'.") 532 "Keymap for `custom-theme-choose-mode'.")
532 533
533(define-derived-mode custom-theme-choose-mode nil "Themes" 534(define-derived-mode custom-theme-choose-mode special-mode "Themes"
534 "Major mode for selecting Custom themes. 535 "Major mode for selecting Custom themes.
535Do not call this mode function yourself. It is meant for internal use." 536Do not call this mode function yourself. It is meant for internal use."
536 (use-local-map custom-theme-choose-mode-map) 537 (use-local-map custom-theme-choose-mode-map)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 88282606aa8..caf0ec2e8b8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1440,7 +1440,7 @@ If optional arg BUTTON is non-nil, describe its associated package."
1440(defun package-menu-mark-delete (num) 1440(defun package-menu-mark-delete (num)
1441 "Mark a package for deletion and move to the next line." 1441 "Mark a package for deletion and move to the next line."
1442 (interactive "p") 1442 (interactive "p")
1443 (if (string-equal (package-menu-get-status) "installed") 1443 (if (member (package-menu-get-status) '("installed" "obsolete"))
1444 (tabulated-list-put-tag "D" t) 1444 (tabulated-list-put-tag "D" t)
1445 (forward-line))) 1445 (forward-line)))
1446 1446
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 5c8b4333332..feee3c49f3a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12011-08-27 Daiki Ueno <ueno@unixuser.org>
2
3 * mml-smime.el (mml-smime-epg-verify): Don't use the 4th arg of
4 mm-replace-in-string for compatibility issues.
5 * mml2015.el (mml2015-epg-verify): Ditto.
6
12011-08-26 Katsumi Yamaoka <yamaoka@jpl.org> 72011-08-26 Katsumi Yamaoka <yamaoka@jpl.org>
2 8
3 * mailcap.el (mailcap-mime-data): Regexp-quote MIME subtype. 9 * mailcap.el (mailcap-mime-data): Regexp-quote MIME subtype.
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 43c91604ec5..7a7b3f6d82d 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -531,7 +531,7 @@ Content-Disposition: attachment; filename=smime.p7m
531 (mm-set-handle-multipart-parameter 531 (mm-set-handle-multipart-parameter
532 mm-security-handle 'gnus-info "Corrupted") 532 mm-security-handle 'gnus-info "Corrupted")
533 (throw 'error handle)) 533 (throw 'error handle))
534 (setq part (mm-replace-in-string part "\n" "\r\n" t) 534 (setq part (mm-replace-in-string part "\n" "\r\n")
535 context (epg-make-context 'CMS)) 535 context (epg-make-context 'CMS))
536 (condition-case error 536 (condition-case error
537 (setq plain (epg-verify-string context (mm-get-part signature) part)) 537 (setq plain (epg-verify-string context (mm-get-part signature) part))
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index 7d8a4119c0e..b9310beed58 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -923,7 +923,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
923 (mm-set-handle-multipart-parameter 923 (mm-set-handle-multipart-parameter
924 mm-security-handle 'gnus-info "Corrupted") 924 mm-security-handle 'gnus-info "Corrupted")
925 (throw 'error handle)) 925 (throw 'error handle))
926 (setq part (mm-replace-in-string part "\n" "\r\n" t) 926 (setq part (mm-replace-in-string part "\n" "\r\n")
927 signature (mm-get-part signature) 927 signature (mm-get-part signature)
928 context (epg-make-context)) 928 context (epg-make-context))
929 (condition-case error 929 (condition-case error
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 1a96f29c4cc..64c114c993d 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -35,13 +35,12 @@
35 35
36(defvar help-mode-map 36(defvar help-mode-map
37 (let ((map (make-sparse-keymap))) 37 (let ((map (make-sparse-keymap)))
38 (set-keymap-parent map button-buffer-map) 38 (set-keymap-parent map (make-composed-keymap button-buffer-map
39 39 special-mode-map))
40 (define-key map [mouse-2] 'help-follow-mouse) 40 (define-key map [mouse-2] 'help-follow-mouse)
41 (define-key map "\C-c\C-b" 'help-go-back) 41 (define-key map "\C-c\C-b" 'help-go-back)
42 (define-key map "\C-c\C-f" 'help-go-forward) 42 (define-key map "\C-c\C-f" 'help-go-forward)
43 (define-key map "\C-c\C-c" 'help-follow-symbol) 43 (define-key map "\C-c\C-c" 'help-follow-symbol)
44 ;; Documentation only, since we use minor-mode-overriding-map-alist.
45 (define-key map "\r" 'help-follow) 44 (define-key map "\r" 'help-follow)
46 map) 45 map)
47 "Keymap for help mode.") 46 "Keymap for help mode.")
@@ -266,37 +265,13 @@ The format is (FUNCTION ARGS...).")
266 'help-function 'customize-create-theme 265 'help-function 'customize-create-theme
267 'help-echo (purecopy "mouse-2, RET: edit this theme file")) 266 'help-echo (purecopy "mouse-2, RET: edit this theme file"))
268 267
269;;;###autoload 268(define-derived-mode help-mode special-mode "Help"
270(defun help-mode ()
271 "Major mode for viewing help text and navigating references in it. 269 "Major mode for viewing help text and navigating references in it.
272Entry to this mode runs the normal hook `help-mode-hook'. 270Entry to this mode runs the normal hook `help-mode-hook'.
273Commands: 271Commands:
274\\{help-mode-map}" 272\\{help-mode-map}"
275 (interactive)
276 (kill-all-local-variables)
277 (use-local-map help-mode-map)
278 (setq mode-name "Help")
279 (setq major-mode 'help-mode)
280
281 (view-mode)
282 (set (make-local-variable 'view-no-disable-on-exit) t)
283 ;; With Emacs 22 `view-exit-action' could delete the selected window
284 ;; disregarding whether the help buffer was shown in that window at
285 ;; all. Since `view-exit-action' is called with the help buffer as
286 ;; argument it seems more appropriate to have it work on the buffer
287 ;; only and leave it to `view-mode-exit' to delete any associated
288 ;; window(s).
289 (setq view-exit-action
290 (lambda (buffer)
291 ;; Use `with-current-buffer' to make sure that `bury-buffer'
292 ;; also removes BUFFER from the selected window.
293 (with-current-buffer buffer
294 (bury-buffer))))
295
296 (set (make-local-variable 'revert-buffer-function) 273 (set (make-local-variable 'revert-buffer-function)
297 'help-mode-revert-buffer) 274 'help-mode-revert-buffer))
298
299 (run-mode-hooks 'help-mode-hook))
300 275
301;;;###autoload 276;;;###autoload
302(defun help-mode-setup () 277(defun help-mode-setup ()
@@ -403,13 +378,6 @@ it does not already exist."
403 (error "Current buffer is not in Help mode")) 378 (error "Current buffer is not in Help mode"))
404 (current-buffer)))) 379 (current-buffer))))
405 380
406(defvar help-xref-override-view-map
407 (let ((map (make-sparse-keymap)))
408 (set-keymap-parent map view-mode-map)
409 (define-key map "\r" nil)
410 map)
411 "Replacement keymap for `view-mode' in help buffers.")
412
413;;;###autoload 381;;;###autoload
414(defun help-make-xrefs (&optional buffer) 382(defun help-make-xrefs (&optional buffer)
415 "Parse and hyperlink documentation cross-references in the given BUFFER. 383 "Parse and hyperlink documentation cross-references in the given BUFFER.
@@ -594,9 +562,6 @@ that."
594 (current-buffer))) 562 (current-buffer)))
595 (when (or help-xref-stack help-xref-forward-stack) 563 (when (or help-xref-stack help-xref-forward-stack)
596 (insert "\n"))) 564 (insert "\n")))
597 ;; View mode steals RET from us.
598 (set (make-local-variable 'minor-mode-overriding-map-alist)
599 (list (cons 'view-mode help-xref-override-view-map)))
600 (set-buffer-modified-p old-modified))))) 565 (set-buffer-modified-p old-modified)))))
601 566
602;;;###autoload 567;;;###autoload
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8764952dbf5..6eab3dbcbc4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -952,7 +952,7 @@ NOPUSH is t and EDIT is t."
952 (or (and transient-mark-mode mark-active) 952 (or (and transient-mark-mode mark-active)
953 (progn 953 (progn
954 (push-mark isearch-opoint t) 954 (push-mark isearch-opoint t)
955 (or executing-kbd-macro (> (minibuffer-depth) 0) 955 (or executing-kbd-macro (> (minibuffer-depth) 0) edit
956 (message "Mark saved where search started"))))) 956 (message "Mark saved where search started")))))
957 957
958 (and (not edit) isearch-recursive-edit (exit-recursive-edit))) 958 (and (not edit) isearch-recursive-edit (exit-recursive-edit)))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index de2c3adba95..71b3fe0c4a1 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -815,18 +815,19 @@ If SILENT is non-nil, do not print the message in any irc buffer."
815 815
816(defvar rcirc-input-ring nil) 816(defvar rcirc-input-ring nil)
817(defvar rcirc-input-ring-index 0) 817(defvar rcirc-input-ring-index 0)
818
818(defun rcirc-prev-input-string (arg) 819(defun rcirc-prev-input-string (arg)
819 (ring-ref rcirc-input-ring (+ rcirc-input-ring-index arg))) 820 (ring-ref rcirc-input-ring (+ rcirc-input-ring-index arg)))
820 821
821(defun rcirc-insert-prev-input (arg) 822(defun rcirc-insert-prev-input ()
822 (interactive "p") 823 (interactive)
823 (when (<= rcirc-prompt-end-marker (point)) 824 (when (<= rcirc-prompt-end-marker (point))
824 (delete-region rcirc-prompt-end-marker (point-max)) 825 (delete-region rcirc-prompt-end-marker (point-max))
825 (insert (rcirc-prev-input-string 0)) 826 (insert (rcirc-prev-input-string 0))
826 (setq rcirc-input-ring-index (1+ rcirc-input-ring-index)))) 827 (setq rcirc-input-ring-index (1+ rcirc-input-ring-index))))
827 828
828(defun rcirc-insert-next-input (arg) 829(defun rcirc-insert-next-input ()
829 (interactive "p") 830 (interactive)
830 (when (<= rcirc-prompt-end-marker (point)) 831 (when (<= rcirc-prompt-end-marker (point))
831 (delete-region rcirc-prompt-end-marker (point-max)) 832 (delete-region rcirc-prompt-end-marker (point-max))
832 (setq rcirc-input-ring-index (1- rcirc-input-ring-index)) 833 (setq rcirc-input-ring-index (1- rcirc-input-ring-index))
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 9c0c62ccdf6..1c58b8a9a7f 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1047,21 +1047,21 @@
1047 1047
10482011-07-28 Achim Gratz <stromeko@nexgo.de> 10482011-07-28 Achim Gratz <stromeko@nexgo.de>
1049 1049
1050 * org.el (defcustom org-log-into-drawer): correct typo. 1050 * org.el (org-log-into-drawer): Correct typo.
1051 1051
1052 * org-clock.el (org-clock-into-drawer): New function to change the 1052 * org-clock.el (org-clock-into-drawer): New function to change the
1053 location of clock events based on properties CLOCK_INTO_DRAWER or, 1053 location of clock events based on properties CLOCK_INTO_DRAWER or,
1054 as fallback, LOG_INTO_DRAWER, like it is already possible for 1054 as fallback, LOG_INTO_DRAWER, like it is already possible for
1055 state change logs. 1055 state change logs.
1056 1056
1057 * org-clock.el (org-clock-jump-to-current-clock): add statement to 1057 * org-clock.el (org-clock-jump-to-current-clock): Add statement to
1058 let clause to bind org-clock-into-drawer to result of function 1058 let clause to bind `org-clock-into-drawer' to result of function
1059 eval 1059 eval.
1060 1060
1061 * org-clock.el (org-clock-find-position): add statement to let 1061 * org-clock.el (org-clock-find-position): Add statement to let
1062 clause to bind org-clock-into-drawer to result of function eval, 1062 clause to bind `org-clock-into-drawer' to result of function eval,
1063 change let to let* since the binding is used later in the same 1063 change let to let* since the binding is used later in the same
1064 clause 1064 clause.
1065 1065
10662011-07-28 Eric Schulte <schulte.eric@gmail.com> 10662011-07-28 Eric Schulte <schulte.eric@gmail.com>
1067 1067
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 3d5dc30d823..bca95c97e8b 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -398,6 +398,59 @@
398 398
399 nil))) 399 nil)))
400 400
401 (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights)
402 ;; This function makes a byte compiled function that first moves back
403 ;; to the beginning of the current declaration (if any), then searches
404 ;; forward for matcher elements (as in `font-lock-keywords') and
405 ;; fontifies them.
406 ;;
407 ;; The motivation for moving back to the declaration start is to
408 ;; establish a context for the current text when, e.g., a character
409 ;; is typed on a C++ inheritance continuation line, or a jit-lock
410 ;; chunk starts there.
411 ;;
412 ;; The new function works much like a matcher element in
413 ;; `font-lock-keywords'. It cuts out a little bit of the overhead
414 ;; compared to a real matcher. The main reason is however to pass the
415 ;; real search limit to the anchored matcher(s), since most (if not
416 ;; all) font-lock implementations arbitrarily limit anchored matchers
417 ;; to the same line, and also to insulate against various other
418 ;; irritating differences between the different (X)Emacs font-lock
419 ;; packages.
420 ;;
421 ;; REGEXP is the matcher, which must be a regexp. Only matches
422 ;; where the beginning is outside any comment or string literal are
423 ;; significant.
424 ;;
425 ;; HIGHLIGHTS is a list of highlight specs, just like in
426 ;; `font-lock-keywords', with these limitations: The face is always
427 ;; overridden (no big disadvantage, since hits in comments etc are
428 ;; filtered anyway), there is no "laxmatch", and an anchored matcher
429 ;; is always a form which must do all the fontification directly.
430 ;; `limit' is a variable bound to the real limit in the context of
431 ;; the anchored matcher forms.
432 ;;
433 ;; This function does not do any hidden buffer changes, but the
434 ;; generated functions will. (They are however used in places
435 ;; covered by the font-lock context.)
436
437 ;; Note: Replace `byte-compile' with `eval' to debug the generated
438 ;; lambda more easily.
439 (byte-compile
440 `(lambda (limit)
441 (let ( ;; The font-lock package in Emacs is known to clobber
442 ;; `parse-sexp-lookup-properties' (when it exists).
443 (parse-sexp-lookup-properties
444 (cc-eval-when-compile
445 (boundp 'parse-sexp-lookup-properties))))
446 (goto-char
447 (let ((here (point)))
448 (if (eq (car (c-beginning-of-decl-1)) 'same)
449 (point)
450 here)))
451 ,(c-make-font-lock-search-form regexp highlights))
452 nil)))
453
401 (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) 454 (defun c-make-font-lock-context-search-function (normal &rest state-stanzas)
402 ;; This function makes a byte compiled function that works much like 455 ;; This function makes a byte compiled function that works much like
403 ;; a matcher element in `font-lock-keywords', with the following 456 ;; a matcher element in `font-lock-keywords', with the following
@@ -1828,24 +1881,32 @@ higher."
1828 c-label-face-name nil t)))))) 1881 c-label-face-name nil t))))))
1829 1882
1830 ;; Fontify the clauses after various keywords. 1883 ;; Fontify the clauses after various keywords.
1831 ,@(when (or (c-lang-const c-type-list-kwds) 1884 ,@(when (or (c-lang-const c-type-list-kwds)
1832 (c-lang-const c-ref-list-kwds) 1885 (c-lang-const c-ref-list-kwds)
1833 (c-lang-const c-colon-type-list-kwds) 1886 (c-lang-const c-colon-type-list-kwds))
1834 (c-lang-const c-paren-type-kwds)) 1887 `((,(c-make-font-lock-BO-decl-search-function
1835 `((,(c-make-font-lock-search-function 1888 (concat "\\<\\("
1836 (concat "\\<\\(" 1889 (c-make-keywords-re nil
1837 (c-make-keywords-re nil 1890 (append (c-lang-const c-type-list-kwds)
1838 (append (c-lang-const c-type-list-kwds) 1891 (c-lang-const c-ref-list-kwds)
1839 (c-lang-const c-ref-list-kwds) 1892 (c-lang-const c-colon-type-list-kwds)))
1840 (c-lang-const c-colon-type-list-kwds) 1893 "\\)\\>")
1841 (c-lang-const c-paren-type-kwds))) 1894 '((c-fontify-types-and-refs ((c-promote-possible-types t))
1842 "\\)\\>") 1895 (c-forward-keyword-clause 1)
1843 '((c-fontify-types-and-refs ((c-promote-possible-types t)) 1896 (if (> (point) limit) (goto-char limit))))))))
1844 (c-forward-keyword-clause 1) 1897
1845 (if (> (point) limit) (goto-char limit)))))))) 1898 ,@(when (c-lang-const c-paren-type-kwds)
1846 1899 `((,(c-make-font-lock-search-function
1847 ,@(when (c-major-mode-is 'java-mode) 1900 (concat "\\<\\("
1848 `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face)))) 1901 (c-make-keywords-re nil
1902 (c-lang-const c-paren-type-kwds))
1903 "\\)\\>")
1904 '((c-fontify-types-and-refs ((c-promote-possible-types t))
1905 (c-forward-keyword-clause 1)
1906 (if (> (point) limit) (goto-char limit))))))))
1907
1908 ,@(when (c-major-mode-is 'java-mode)
1909 `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face))))
1849 )) 1910 ))
1850 1911
1851(c-lang-defconst c-matchers-1 1912(c-lang-defconst c-matchers-1
diff --git a/lisp/server.el b/lisp/server.el
index c91f10b6584..63d46a365c9 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -112,7 +112,10 @@ If set, the server accepts remote connections; otherwise it is local."
112(put 'server-host 'risky-local-variable t) 112(put 'server-host 'risky-local-variable t)
113 113
114(defcustom server-port nil 114(defcustom server-port nil
115 "The port number that the server process should listen on." 115 "The port number that the server process should listen on.
116This variable only takes effect when the Emacs server is using
117TCP instead of local sockets. A nil value means to use a random
118port number."
116 :group 'server 119 :group 'server
117 :type '(choice 120 :type '(choice
118 (string :tag "Port number") 121 (string :tag "Port number")
diff --git a/lisp/shell.el b/lisp/shell.el
index 01d1a688f0e..909ebb48afc 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -393,10 +393,28 @@ to `dirtrack-mode'."
393 (while (< (point) end) 393 (while (< (point) end)
394 (skip-chars-forward " \t\n") 394 (skip-chars-forward " \t\n")
395 (push (point) begins) 395 (push (point) begins)
396 (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") 396 (let ((arg ()))
397 (goto-char (match-end 0)) 397 (while (looking-at
398 (push (buffer-substring-no-properties (car begins) (point)) 398 (eval-when-compile
399 args)) 399 (concat
400 "\\(?:[^\s\t\n\\\"']+"
401 "\\|'\\([^']*\\)'?"
402 "\\|\"\\(\\(?:[^\"\\]\\|\\\\.\\)*\\)\"?"
403 "\\|\\\\\\(\\(?:.\\|\n\\)?\\)\\)")))
404 (goto-char (match-end 0))
405 (cond
406 ((match-beginning 3) ;Backslash escape.
407 (push (if (= (match-beginning 3) (match-end 3))
408 "\\" (match-string 3))
409 arg))
410 ((match-beginning 2) ;Double quote.
411 (push (replace-regexp-in-string
412 "\\\\\\(.\\)" "\\1" (match-string 2))
413 arg))
414 ((match-beginning 1) ;Single quote.
415 (push (match-string 1) arg))
416 (t (push (match-string 0) arg))))
417 (push (mapconcat #'identity (nreverse arg) "") args)))
400 (cons (nreverse args) (nreverse begins))))) 418 (cons (nreverse args) (nreverse begins)))))
401 419
402(defun shell-completion-vars () 420(defun shell-completion-vars ()