aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2013-02-18 19:29:28 -0800
committerGlenn Morris2013-02-18 19:29:28 -0800
commit872faefb07a9196a583fc8cbe146ab6a2ebc9c2b (patch)
tree5502bf8472fb7d132c03de2240ce403b502f8995 /lisp
parent8ca4f1e02e22f74dc269b01bc4a32e01dd226dae (diff)
parent2af3b9c16e340ad034e57e949f09bbafc00bd52c (diff)
downloademacs-872faefb07a9196a583fc8cbe146ab6a2ebc9c2b.tar.gz
emacs-872faefb07a9196a583fc8cbe146ab6a2ebc9c2b.zip
Merge from emacs-24; up to 2012-12-20T16:09:05Z!dmantipov@yandex.ru
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog20
-rw-r--r--lisp/eshell/em-unix.el4
-rw-r--r--lisp/info-look.el8
-rw-r--r--lisp/net/tramp-sh.el6
-rw-r--r--lisp/progmodes/python.el25
5 files changed, 47 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d4832d9cce8..d430ba0908f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,23 @@
12013-02-19 Fabián Ezequiel Gallina <fgallina@cuca>
2
3 * progmodes/python.el (python-indent-context):
4 Fix python-info-line-ends-backslash-p call.
5 (python-info-line-ends-backslash-p)
6 (python-info-beginning-of-backslash): Respect line-number argument.
7 (python-info-current-line-comment-p):
8 Fix behavior when not at beginning-of-line.
9 (python-util-position): Remove function.
10 (python-util-goto-line): New function.
11
122013-02-19 Michael Albinus <michael.albinus@gmx.de>
13
14 * eshell/em-unix.el (eshell/su): Require tramp.
15 (eshell/sudo): Require tramp. Remove now unnecessary check.
16
17 * net/tramp-sh.el (tramp-sh-handle-start-file-process): Let-bind
18 `tramp-current-connection' in order to avoid an error when several
19 commands are invoked in a short time in eshell and friends.
20
12013-02-19 Stefan Monnier <monnier@iro.umontreal.ca> 212013-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
2 22
3 Cleanup some of EIEIO's namespace. 23 Cleanup some of EIEIO's namespace.
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index f6dd0d5e990..94508d71592 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -1040,6 +1040,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
1040 1040
1041(defun eshell/su (&rest args) 1041(defun eshell/su (&rest args)
1042 "Alias \"su\" to call Tramp." 1042 "Alias \"su\" to call Tramp."
1043 (require 'tramp)
1043 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1044 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1044 (let ((orig-args (copy-tree args))) 1045 (let ((orig-args (copy-tree args)))
1045 (eshell-eval-using-options 1046 (eshell-eval-using-options
@@ -1077,6 +1078,7 @@ Become another USER during a login session.")
1077 1078
1078(defun eshell/sudo (&rest args) 1079(defun eshell/sudo (&rest args)
1079 "Alias \"sudo\" to call Tramp." 1080 "Alias \"sudo\" to call Tramp."
1081 (require 'tramp)
1080 (setq args (eshell-stringify-list (eshell-flatten-list args))) 1082 (setq args (eshell-stringify-list (eshell-flatten-list args)))
1081 (let ((orig-args (copy-tree args))) 1083 (let ((orig-args (copy-tree args)))
1082 (eshell-eval-using-options 1084 (eshell-eval-using-options
@@ -1111,8 +1113,6 @@ Execute a COMMAND as the superuser or another USER.")
1111 (format "%s|sudo:%s@%s:%s" 1113 (format "%s|sudo:%s@%s:%s"
1112 (substring prefix 0 -1) user host dir) 1114 (substring prefix 0 -1) user host dir)
1113 (format "/sudo:%s@%s:%s" user host dir)))) 1115 (format "/sudo:%s@%s:%s" user host dir))))
1114 ;; Ensure, that Tramp has connected to that construct already.
1115 (ignore (file-exists-p default-directory))
1116 (eshell-named-command (car orig-args) (cdr orig-args)))))))) 1116 (eshell-named-command (car orig-args) (cdr orig-args))))))))
1117 1117
1118(put 'eshell/sudo 'eshell-no-numeric-conversions t) 1118(put 'eshell/sudo 'eshell-no-numeric-conversions t)
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 0b33dd51faf..afe4301c659 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -27,6 +27,14 @@
27;; Really cool code to lookup info indexes. 27;; Really cool code to lookup info indexes.
28;; Try especially info-lookup-symbol (aka C-h S). 28;; Try especially info-lookup-symbol (aka C-h S).
29 29
30;; Some additional sources of (Tex)info files for non-GNU packages:
31;;
32;; Scheme: <URL:http://groups.csail.mit.edu/mac/ftpdir/scm/r5rs.info.tar.gz>
33;; LaTeX:
34;; <URL:ftp://ctan.tug.org/tex-archive/info/latex2e-help-texinfo/latex2e.texi>
35;; (or CTAN mirrors)
36;; Perl: <URL:ftp://ftp.cpan.org/pub/CPAN/doc/manual/texinfo/> (or CPAN mirrors)
37
30;;; Code: 38;;; Code:
31 39
32(require 'info) 40(require 'info)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9be22352b23..7388c570874 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2784,7 +2784,11 @@ the result will be a local, non-Tramp, filename."
2784 (or (null program) tramp-process-connection-type)) 2784 (or (null program) tramp-process-connection-type))
2785 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) 2785 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
2786 (name1 name) 2786 (name1 name)
2787 (i 0)) 2787 (i 0)
2788 ;; We do not want to raise an error when
2789 ;; `start-file-process' has been started several time in
2790 ;; `eshell' and friends.
2791 (tramp-current-connection nil))
2788 2792
2789 (unless buffer 2793 (unless buffer
2790 ;; BUFFER can be nil. We use a temporary buffer. 2794 ;; BUFFER can be nil. We use a temporary buffer.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index eadb06fa61e..da56fe70329 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -708,10 +708,9 @@ START is the buffer position where the sexp starts."
708 ;; After backslash 708 ;; After backslash
709 ((setq start (when (not (or (python-syntax-context 'string ppss) 709 ((setq start (when (not (or (python-syntax-context 'string ppss)
710 (python-syntax-context 'comment ppss))) 710 (python-syntax-context 'comment ppss)))
711 (let ((line-beg-pos (line-beginning-position))) 711 (let ((line-beg-pos (line-number-at-pos)))
712 (when (python-info-line-ends-backslash-p 712 (python-info-line-ends-backslash-p
713 (1- line-beg-pos)) 713 (1- line-beg-pos)))))
714 (- line-beg-pos 2)))))
715 'after-backslash) 714 'after-backslash)
716 ;; After beginning of block 715 ;; After beginning of block
717 ((setq start (save-excursion 716 ((setq start (save-excursion
@@ -3115,7 +3114,7 @@ With optional argument LINE-NUMBER, check that line instead."
3115 (save-restriction 3114 (save-restriction
3116 (widen) 3115 (widen)
3117 (when line-number 3116 (when line-number
3118 (goto-char line-number)) 3117 (python-util-goto-line line-number))
3119 (while (and (not (eobp)) 3118 (while (and (not (eobp))
3120 (goto-char (line-end-position)) 3119 (goto-char (line-end-position))
3121 (python-syntax-context 'paren) 3120 (python-syntax-context 'paren)
@@ -3131,7 +3130,7 @@ Optional argument LINE-NUMBER forces the line number to check against."
3131 (save-restriction 3130 (save-restriction
3132 (widen) 3131 (widen)
3133 (when line-number 3132 (when line-number
3134 (goto-char line-number)) 3133 (python-util-goto-line line-number))
3135 (when (python-info-line-ends-backslash-p) 3134 (when (python-info-line-ends-backslash-p)
3136 (while (save-excursion 3135 (while (save-excursion
3137 (goto-char (line-beginning-position)) 3136 (goto-char (line-beginning-position))
@@ -3210,7 +3209,9 @@ operator."
3210 3209
3211(defun python-info-current-line-comment-p () 3210(defun python-info-current-line-comment-p ()
3212 "Check if current line is a comment line." 3211 "Check if current line is a comment line."
3213 (char-equal (or (char-after (+ (point) (current-indentation))) ?_) ?#)) 3212 (char-equal
3213 (or (char-after (+ (line-beginning-position) (current-indentation))) ?_)
3214 ?#))
3214 3215
3215(defun python-info-current-line-empty-p () 3216(defun python-info-current-line-empty-p ()
3216 "Check if current line is empty, ignoring whitespace." 3217 "Check if current line is empty, ignoring whitespace."
@@ -3225,12 +3226,10 @@ operator."
3225 3226
3226;;; Utility functions 3227;;; Utility functions
3227 3228
3228(defun python-util-position (item seq) 3229(defun python-util-goto-line (line-number)
3229 "Find the first occurrence of ITEM in SEQ. 3230 "Move point to LINE-NUMBER."
3230Return the index of the matching item, or nil if not found." 3231 (goto-char (point-min))
3231 (let ((member-result (member item seq))) 3232 (forward-line (1- line-number)))
3232 (when member-result
3233 (- (length seq) (length member-result)))))
3234 3233
3235;; Stolen from org-mode 3234;; Stolen from org-mode
3236(defun python-util-clone-local-variables (from-buffer &optional regexp) 3235(defun python-util-clone-local-variables (from-buffer &optional regexp)