aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2012-12-30 00:03:52 +0100
committerJoakim Verona2012-12-30 00:03:52 +0100
commitea2da3d8fbf19765a9bd82292bfc73918f74048d (patch)
treeb350dbdaa6601f4384a3fbde01eeaea297d4f047 /lisp
parent16b9f224223b3e9eb0c4b313e4257dacbd3ebe34 (diff)
parenteff2eb5812e964024c3aa20197b21f12d37155dd (diff)
downloademacs-ea2da3d8fbf19765a9bd82292bfc73918f74048d.tar.gz
emacs-ea2da3d8fbf19765a9bd82292bfc73918f74048d.zip
auto upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog34
-rw-r--r--lisp/files.el28
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/info.el17
-rw-r--r--lisp/net/tramp-sh.el28
-rw-r--r--lisp/progmodes/python.el57
6 files changed, 119 insertions, 51 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1083dc5513d..81b4978dba5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,37 @@
12012-12-29 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-sh-handle-file-acl): Suppress basic attributes.
4 (tramp-sh-handle-set-file-acl): Return `t' on success.
5
62012-12-29 Eli Zaretskii <eliz@gnu.org>
7
8 * files.el (backup-buffer-copy, basic-save-buffer-2): If
9 set-file-extended-attributes fails, fall back on set-file-modes
10 instead of signaling an error. (Bug#13298)
11 (basic-save-buffer): Likewise.
12
132012-12-29 Fabián Ezequiel Gallina <fgallina@cuca>
14
15 * progmodes/python.el: Support other commands triggering
16 python-indent-line so indentation cycling continues to work.
17 (python-indent-trigger-commands): New defcustom.
18 (python-indent-line): Use it.
19
202012-12-29 Fabián Ezequiel Gallina <fgallina@cuca>
21
22 * progmodes/python.el (python-shell-send-region): Add blank lines
23 for non sent code so backtraces remain correct.
24
252012-12-29 Fabián Ezequiel Gallina <fgallina@cuca>
26
27 * progmodes/python.el: Remove cl dependency.
28 (python-syntax-count-quotes): Replace incf call.
29 (python-fill-string): Replace setf call.
30
312012-12-29 Damien Cassou <damien.cassou@gmail.com>
32
33 * info.el (info-other-window): New arg, for consistency with info.
34
12012-12-28 Martin Rudalics <rudalics@gmx.at> 352012-12-28 Martin Rudalics <rudalics@gmx.at>
2 36
3 * mail/rmail.el (rmail-maybe-display-summary): Rewrite 37 * mail/rmail.el (rmail-maybe-display-summary): Rewrite
diff --git a/lisp/files.el b/lisp/files.el
index f076530fbc8..e8be1a09047 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4019,10 +4019,12 @@ BACKUPNAME is the backup file name, which is the old file renamed."
4019 nil))) 4019 nil)))
4020 ;; Reset the umask. 4020 ;; Reset the umask.
4021 (set-default-file-modes umask))) 4021 (set-default-file-modes umask)))
4022 (and modes 4022 ;; If set-file-extended-attributes fails, fall back on set-file-modes.
4023 (set-file-modes to-name (logand modes #o1777))) 4023 (unless (and extended-attributes
4024 (and extended-attributes 4024 (with-demoted-errors
4025 (set-file-extended-attributes to-name extended-attributes))) 4025 (set-file-extended-attributes to-name extended-attributes)))
4026 (and modes
4027 (set-file-modes to-name (logand modes #o1777)))))
4026 4028
4027(defvar file-name-version-regexp 4029(defvar file-name-version-regexp
4028 "\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)" 4030 "\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)"
@@ -4619,9 +4621,11 @@ Before and after saving the buffer, this function runs
4619 (if setmodes 4621 (if setmodes
4620 (condition-case () 4622 (condition-case ()
4621 (progn 4623 (progn
4622 (set-file-modes buffer-file-name (car setmodes)) 4624 (unless
4623 (set-file-extended-attributes buffer-file-name 4625 (with-demoted-errors
4624 (nth 1 setmodes))) 4626 (set-file-modes buffer-file-name (car setmodes)))
4627 (set-file-extended-attributes buffer-file-name
4628 (nth 1 setmodes))))
4625 (error nil)))) 4629 (error nil))))
4626 ;; If the auto-save file was recent before this command, 4630 ;; If the auto-save file was recent before this command,
4627 ;; delete it now. 4631 ;; delete it now.
@@ -4737,8 +4741,14 @@ Before and after saving the buffer, this function runs
4737 (setq setmodes (list (file-modes buffer-file-name) 4741 (setq setmodes (list (file-modes buffer-file-name)
4738 (file-extended-attributes buffer-file-name) 4742 (file-extended-attributes buffer-file-name)
4739 buffer-file-name)) 4743 buffer-file-name))
4740 (set-file-modes buffer-file-name (logior (car setmodes) 128)) 4744 ;; If set-file-extended-attributes fails, fall back on
4741 (set-file-extended-attributes buffer-file-name (nth 1 setmodes))))) 4745 ;; set-file-modes.
4746 (unless
4747 (with-demoted-errors
4748 (set-file-extended-attributes buffer-file-name
4749 (nth 1 setmodes)))
4750 (set-file-modes buffer-file-name
4751 (logior (car setmodes) 128))))))
4742 (let (success) 4752 (let (success)
4743 (unwind-protect 4753 (unwind-protect
4744 (progn 4754 (progn
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index b9df3bb9cf7..e17661095e4 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -26,11 +26,11 @@
26 26
272012-12-27 Andreas Schwab <schwab@linux-m68k.org> 272012-12-27 Andreas Schwab <schwab@linux-m68k.org>
28 28
29 * mml2015.el (mml2015-epg-key-image): separate attribute stream from 29 * mml2015.el (mml2015-epg-key-image): Separate attribute stream from
30 stderr. 30 stderr.
31 31
32 * nnimap.el (nnimap-find-article-by-message-id): 32 * nnimap.el (nnimap-find-article-by-message-id): Don't error out if
33 Don't error out if group is nil. 33 group is nil.
34 34
35 * shr.el (shr-tag-em): Render as italic, not bold. 35 * shr.el (shr-tag-em): Render as italic, not bold.
36 36
diff --git a/lisp/info.el b/lisp/info.el
index 19f9212f88a..07d5c66201d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -746,11 +746,15 @@ in `Info-file-supports-index-cookies-list'."
746 (push dir Info-directory-list))))))) 746 (push dir Info-directory-list)))))))
747 747
748;;;###autoload 748;;;###autoload
749(defun info-other-window (&optional file-or-node) 749(defun info-other-window (&optional file-or-node buffer)
750 "Like `info' but show the Info buffer in another window." 750 "Like `info' but show the Info buffer in another window."
751 (interactive (if current-prefix-arg 751 (interactive (list
752 (list (read-file-name "Info file name: " nil nil t)))) 752 (if (and current-prefix-arg (not (numberp current-prefix-arg)))
753 (info-setup file-or-node (switch-to-buffer-other-window "*info*"))) 753 (read-file-name "Info file name: " nil nil t))
754 (if (numberp current-prefix-arg)
755 (format "*info*<%s>" current-prefix-arg))))
756 (info-setup file-or-node
757 (switch-to-buffer-other-window (or buffer "*info*"))))
754 758
755;;;###autoload (put 'info 'info-file (purecopy "emacs")) 759;;;###autoload (put 'info 'info-file (purecopy "emacs"))
756;;;###autoload 760;;;###autoload
@@ -767,8 +771,9 @@ with the top-level Info directory.
767 771
768In interactive use, a non-numeric prefix argument directs 772In interactive use, a non-numeric prefix argument directs
769this command to read a file name from the minibuffer. 773this command to read a file name from the minibuffer.
770A numeric prefix argument selects an Info buffer with the prefix number 774
771appended to the Info buffer name. 775A numeric prefix argument N selects an Info buffer named
776\"*info*<%s>\".
772 777
773The search path for Info files is in the variable `Info-directory-list'. 778The search path for Info files is in the variable `Info-directory-list'.
774The top-level Info directory is made by combining all the files named `dir' 779The top-level Info directory is made by combining all the files named `dir'
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 67459b4f9ca..ebc377c08c8 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1547,25 +1547,31 @@ and gid of the corresponding user is taken. Both parameters must be integers."
1547 (when (and (tramp-remote-acl-p v) 1547 (when (and (tramp-remote-acl-p v)
1548 (tramp-send-command-and-check 1548 (tramp-send-command-and-check
1549 v (format 1549 v (format
1550 "getfacl -ac %s 2>/dev/null" 1550 "getfacl -acs %s 2>/dev/null"
1551 (tramp-shell-quote-argument localname)))) 1551 (tramp-shell-quote-argument localname))))
1552 (with-current-buffer (tramp-get-connection-buffer v) 1552 (with-current-buffer (tramp-get-connection-buffer v)
1553 (goto-char (point-max)) 1553 (goto-char (point-max))
1554 (delete-blank-lines) 1554 (delete-blank-lines)
1555 (substring-no-properties (buffer-string))))))) 1555 (when (> (point-max) (point-min))
1556 (substring-no-properties (buffer-string))))))))
1556 1557
1557(defun tramp-sh-handle-set-file-acl (filename acl-string) 1558(defun tramp-sh-handle-set-file-acl (filename acl-string)
1558 "Like `set-file-acl' for Tramp files." 1559 "Like `set-file-acl' for Tramp files."
1559 (with-parsed-tramp-file-name filename nil 1560 (with-parsed-tramp-file-name filename nil
1560 (if (and (stringp acl-string) 1561 (when (tramp-remote-acl-p v)
1561 (tramp-remote-acl-p v) 1562 (condition-case nil
1562 (tramp-send-command-and-check 1563 (when (stringp acl-string)
1563 v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" 1564 (tramp-set-file-property v localname "file-acl" acl-string)
1564 (tramp-shell-quote-argument localname) acl-string))) 1565 (dolist (line (split-string acl-string nil t) t)
1565 (tramp-set-file-property v localname "file-acl" acl-string) 1566 (unless (tramp-send-command-and-check
1566 (tramp-set-file-property v localname "file-acl-string" 'undef))) 1567 v (format
1567 ;; We always return nil. 1568 "setfacl -m %s %s"
1568 nil) 1569 line (tramp-shell-quote-argument localname)))
1570 (error))))
1571 ;; In case of errors, we return `nil'.
1572 (error
1573 (tramp-set-file-property v localname "file-acl" 'undef)
1574 nil)))))
1569 1575
1570;; Simple functions using the `test' command. 1576;; Simple functions using the `test' command.
1571 1577
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 67388c0339b..54a657a2593 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -204,7 +204,6 @@
204 204
205(require 'ansi-color) 205(require 'ansi-color)
206(require 'comint) 206(require 'comint)
207(eval-when-compile (require 'cl-lib))
208 207
209;; Avoid compiler warnings 208;; Avoid compiler warnings
210(defvar view-return-to-alist) 209(defvar view-return-to-alist)
@@ -529,7 +528,7 @@ is used to limit the scan."
529 (while (and (< i 3) 528 (while (and (< i 3)
530 (or (not limit) (< (+ point i) limit)) 529 (or (not limit) (< (+ point i) limit))
531 (eq (char-after (+ point i)) quote-char)) 530 (eq (char-after (+ point i)) quote-char))
532 (cl-incf i)) 531 (setq i (1+ i)))
533 i)) 532 i))
534 533
535(defun python-syntax-stringify () 534(defun python-syntax-stringify ()
@@ -608,6 +607,12 @@ It makes underscores and dots word constituent chars.")
608 :group 'python 607 :group 'python
609 :safe 'booleanp) 608 :safe 'booleanp)
610 609
610(defcustom python-indent-trigger-commands
611 '(indent-for-tab-command yas-expand yas/expand)
612 "Commands that might trigger a `python-indent-line' call."
613 :type '(repeat symbol)
614 :group 'python)
615
611(define-obsolete-variable-alias 616(define-obsolete-variable-alias
612 'python-indent 'python-indent-offset "24.3") 617 'python-indent 'python-indent-offset "24.3")
613 618
@@ -906,20 +911,21 @@ Uses the offset calculated in
906indicated by the variable `python-indent-levels' to set the 911indicated by the variable `python-indent-levels' to set the
907current indentation. 912current indentation.
908 913
909When the variable `last-command' is equal to 914When the variable `last-command' is equal to one of the symbols
910`indent-for-tab-command' or FORCE-TOGGLE is non-nil it cycles 915inside `python-indent-trigger-commands' or FORCE-TOGGLE is
911levels indicated in the variable `python-indent-levels' by 916non-nil it cycles levels indicated in the variable
912setting the current level in the variable 917`python-indent-levels' by setting the current level in the
913`python-indent-current-level'. 918variable `python-indent-current-level'.
914 919
915When the variable `last-command' is not equal to 920When the variable `last-command' is not equal to one of the
916`indent-for-tab-command' and FORCE-TOGGLE is nil it calculates 921symbols inside `python-indent-trigger-commands' and FORCE-TOGGLE
917possible indentation levels and saves it in the variable 922is nil it calculates possible indentation levels and saves it in
918`python-indent-levels'. Afterwards it sets the variable 923the variable `python-indent-levels'. Afterwards it sets the
919`python-indent-current-level' correctly so offset is equal 924variable `python-indent-current-level' correctly so offset is
920to (`nth' `python-indent-current-level' `python-indent-levels')" 925equal to (`nth' `python-indent-current-level'
926`python-indent-levels')"
921 (or 927 (or
922 (and (or (and (eq this-command 'indent-for-tab-command) 928 (and (or (and (memq this-command python-indent-trigger-commands)
923 (eq last-command this-command)) 929 (eq last-command this-command))
924 force-toggle) 930 force-toggle)
925 (not (equal python-indent-levels '(0))) 931 (not (equal python-indent-levels '(0)))
@@ -2009,7 +2015,14 @@ Returns the output. See `python-shell-send-string-no-output'."
2009(defun python-shell-send-region (start end) 2015(defun python-shell-send-region (start end)
2010 "Send the region delimited by START and END to inferior Python process." 2016 "Send the region delimited by START and END to inferior Python process."
2011 (interactive "r") 2017 (interactive "r")
2012 (python-shell-send-string (buffer-substring start end) nil t)) 2018 (python-shell-send-string
2019 (concat
2020 (let ((line-num (line-number-at-pos start)))
2021 ;; When sending a region, add blank lines for non sent code so
2022 ;; backtraces remain correct.
2023 (make-string (1- line-num) ?\n))
2024 (buffer-substring start end))
2025 nil t))
2013 2026
2014(defun python-shell-send-buffer (&optional arg) 2027(defun python-shell-send-buffer (&optional arg)
2015 "Send the entire buffer to inferior Python process. 2028 "Send the entire buffer to inferior Python process.
@@ -2487,12 +2500,12 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2487JUSTIFY should be used (if applicable) as in `fill-paragraph'." 2500JUSTIFY should be used (if applicable) as in `fill-paragraph'."
2488 (let* ((marker (point-marker)) 2501 (let* ((marker (point-marker))
2489 (str-start-pos 2502 (str-start-pos
2490 (let ((m (make-marker))) 2503 (set-marker
2491 (setf (marker-position m) 2504 (make-marker)
2492 (or (python-syntax-context 'string) 2505 (or (python-syntax-context 'string)
2493 (and (equal (string-to-syntax "|") 2506 (and (equal (string-to-syntax "|")
2494 (syntax-after (point))) 2507 (syntax-after (point)))
2495 (point)))) m)) 2508 (point)))))
2496 (num-quotes (python-syntax-count-quotes 2509 (num-quotes (python-syntax-count-quotes
2497 (char-after str-start-pos) str-start-pos)) 2510 (char-after str-start-pos) str-start-pos))
2498 (str-end-pos 2511 (str-end-pos