diff options
| author | Joakim Verona | 2013-02-12 00:04:05 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-12 00:04:05 +0100 |
| commit | e0444a0966fa001953bb97cfb60451c42220be8e (patch) | |
| tree | d5d10a2f99fa0c7b24eee310069e2677409e6802 /lisp | |
| parent | 77f4834db1299b571b1fb3dfb120e5e50eec7cb1 (diff) | |
| parent | 6659b59ccb7909a07f71a0143fd9d85e60b8e414 (diff) | |
| download | emacs-e0444a0966fa001953bb97cfb60451c42220be8e.tar.gz emacs-e0444a0966fa001953bb97cfb60451c42220be8e.zip | |
auto upstream
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 27 | ||||
| -rw-r--r-- | lisp/cus-start.el | 19 | ||||
| -rw-r--r-- | lisp/doc-view.el | 3 | ||||
| -rw-r--r-- | lisp/erc/erc-match.el | 20 | ||||
| -rw-r--r-- | lisp/files.el | 11 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 2 | ||||
| -rw-r--r-- | lisp/tutorial.el | 10 | ||||
| -rw-r--r-- | lisp/vc/diff.el | 25 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 29 |
9 files changed, 99 insertions, 47 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2878db6271f..fd2186fcfb2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,30 @@ | |||
| 1 | 2013-02-11 Elias Pipping <pipping@lavabit.com> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-current-cache-dir): Beware % escapes | ||
| 4 | (bug#13689). | ||
| 5 | |||
| 6 | 2013-02-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * cus-start.el (all): Remove inhibit-local-menu-bar-menus. | ||
| 9 | |||
| 10 | 2013-02-11 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * vc/diff.el (diff-use-labels): New variable. | ||
| 13 | (diff-no-select): Use --label rather than -L, and first | ||
| 14 | check that it is supported. (Bug#11067) | ||
| 15 | |||
| 16 | * files.el (enable-dir-local-variables): New variable. | ||
| 17 | (hack-dir-local-variables): Respect enable-dir-local-variables. | ||
| 18 | * tutorial.el (help-with-tutorial): | ||
| 19 | Ignore directory-local variables. (Bug#11127) | ||
| 20 | |||
| 21 | * vc/vc-svn.el (vc-svn-command): Move --non-interactive from here... | ||
| 22 | (vc-svn-global-switches): ... to here. (Bug#13513) | ||
| 23 | |||
| 1 | 2013-02-10 Christopher Schmidt <christopher@ch.ristopher.com> | 24 | 2013-02-10 Christopher Schmidt <christopher@ch.ristopher.com> |
| 2 | 25 | ||
| 3 | * minibuf-eldef.el (minibuffer-default--in-prompt-regexps): Handle | 26 | * minibuf-eldef.el (minibuffer-default--in-prompt-regexps): |
| 4 | "foo (bar, default: xxx): " prompts. | 27 | Handle "foo (bar, default: xxx): " prompts. |
| 5 | 28 | ||
| 6 | 2013-02-10 Chong Yidong <cyd@gnu.org> | 29 | 2013-02-10 Chong Yidong <cyd@gnu.org> |
| 7 | 30 | ||
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 2bc47426332..2e442b6c944 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -286,7 +286,6 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 286 | (double-click-time mouse (restricted-sexp | 286 | (double-click-time mouse (restricted-sexp |
| 287 | :match-alternatives (integerp 'nil 't))) | 287 | :match-alternatives (integerp 'nil 't))) |
| 288 | (double-click-fuzz mouse integer "22.1") | 288 | (double-click-fuzz mouse integer "22.1") |
| 289 | (inhibit-local-menu-bar-menus menu boolean) | ||
| 290 | (help-char keyboard character) | 289 | (help-char keyboard character) |
| 291 | (help-event-list keyboard (repeat (sexp :format "%v"))) | 290 | (help-event-list keyboard (repeat (sexp :format "%v"))) |
| 292 | (menu-prompting menu boolean) | 291 | (menu-prompting menu boolean) |
| @@ -301,15 +300,15 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 301 | (const :tag "When sent SIGUSR2" sigusr2)) | 300 | (const :tag "When sent SIGUSR2" sigusr2)) |
| 302 | "24.1") | 301 | "24.1") |
| 303 | 302 | ||
| 304 | ;; This is not good news because it will use the wrong | 303 | ;; This is not good news because it will use the wrong |
| 305 | ;; version-specific directories when you upgrade. We need | 304 | ;; version-specific directories when you upgrade. We need |
| 306 | ;; customization of the front of the list, maintaining the standard | 305 | ;; customization of the front of the list, maintaining the |
| 307 | ;; value intact at the back. | 306 | ;; standard value intact at the back. |
| 308 | ;;; (load-path environment | 307 | ;;(load-path environment |
| 309 | ;;; (repeat (choice :tag "[Current dir?]" | 308 | ;; (repeat (choice :tag "[Current dir?]" |
| 310 | ;;; :format "%[Current dir?%] %v" | 309 | ;; :format "%[Current dir?%] %v" |
| 311 | ;;; (const :tag " current dir" nil) | 310 | ;; (const :tag " current dir" nil) |
| 312 | ;;; (directory :format "%v")))) | 311 | ;; (directory :format "%v")))) |
| 313 | ;; minibuf.c | 312 | ;; minibuf.c |
| 314 | (enable-recursive-minibuffers minibuffer boolean) | 313 | (enable-recursive-minibuffers minibuffer boolean) |
| 315 | (history-length minibuffer | 314 | (history-length minibuffer |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index e7d1ebc35ff..edd59a7b518 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -686,7 +686,8 @@ It's a subdirectory of `doc-view-cache-directory'." | |||
| 686 | (setq doc-view-current-cache-dir | 686 | (setq doc-view-current-cache-dir |
| 687 | (file-name-as-directory | 687 | (file-name-as-directory |
| 688 | (expand-file-name | 688 | (expand-file-name |
| 689 | (concat (file-name-nondirectory doc-view-buffer-file-name) | 689 | (concat (subst-char-in-string ?% ?_ ;; bug#13679 |
| 690 | (file-name-nondirectory doc-view-buffer-file-name)) | ||
| 690 | "-" | 691 | "-" |
| 691 | (let ((file doc-view-buffer-file-name)) | 692 | (let ((file doc-view-buffer-file-name)) |
| 692 | (with-temp-buffer | 693 | (with-temp-buffer |
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 7ca86b5ac95..1da838557f7 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el | |||
| @@ -447,16 +447,24 @@ Use this defun with `erc-insert-modify-hook'." | |||
| 447 | (nth 0 (erc-parse-user nickuserhost)))) | 447 | (nth 0 (erc-parse-user nickuserhost)))) |
| 448 | (old-pt (point)) | 448 | (old-pt (point)) |
| 449 | (nick-beg (and nickname | 449 | (nick-beg (and nickname |
| 450 | (re-search-forward (regexp-quote nickname) | 450 | (re-search-forward "\\(\\* \\)?"(regexp-quote nickname) |
| 451 | (point-max) t) | 451 | (point-max) t) |
| 452 | (match-beginning 0))) | 452 | (match-beginning 0))) |
| 453 | (nick-end (when nick-beg | 453 | (nick-end (when nick-beg |
| 454 | (match-end 0))) | 454 | (match-end 0))) |
| 455 | (message (buffer-substring (if (and nick-end | 455 | (message (buffer-substring |
| 456 | (<= (+ 2 nick-end) (point-max))) | 456 | (if (and nick-end |
| 457 | (+ 2 nick-end) | 457 | (<= (+ 2 nick-end) (point-max))) |
| 458 | (point-min)) | 458 | (+ nick-end |
| 459 | (point-max)))) | 459 | ;; Message starts 2 characters after the nick except |
| 460 | ;; for CTCP ACTION messages. | ||
| 461 | (if (string= "* " | ||
| 462 | (buffer-substring (- nick-beg 2) | ||
| 463 | nick-beg)) | ||
| 464 | 1 | ||
| 465 | 2)) | ||
| 466 | (point-min)) | ||
| 467 | (point-max)))) | ||
| 460 | (when (and vector | 468 | (when (and vector |
| 461 | (not (and erc-match-exclude-server-buffer | 469 | (not (and erc-match-exclude-server-buffer |
| 462 | (erc-server-buffer-p)))) | 470 | (erc-server-buffer-p)))) |
diff --git a/lisp/files.el b/lisp/files.el index c9e5d2763fe..890834d4af0 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -507,6 +507,11 @@ and ignores this variable." | |||
| 507 | (other :tag "Query" other)) | 507 | (other :tag "Query" other)) |
| 508 | :group 'find-file) | 508 | :group 'find-file) |
| 509 | 509 | ||
| 510 | (defvar enable-dir-local-variables t | ||
| 511 | "Non-nil means enable use of directory-local variables. | ||
| 512 | Some modes may wish to set this to nil to prevent directory-local | ||
| 513 | settings being applied, but still respect file-local ones.") | ||
| 514 | |||
| 510 | ;; This is an odd variable IMO. | 515 | ;; This is an odd variable IMO. |
| 511 | ;; You might wonder why it is needed, when we could just do: | 516 | ;; You might wonder why it is needed, when we could just do: |
| 512 | ;; (set (make-local-variable 'enable-local-variables) nil) | 517 | ;; (set (make-local-variable 'enable-local-variables) nil) |
| @@ -3659,8 +3664,12 @@ is found. Returns the new class name." | |||
| 3659 | (defun hack-dir-local-variables () | 3664 | (defun hack-dir-local-variables () |
| 3660 | "Read per-directory local variables for the current buffer. | 3665 | "Read per-directory local variables for the current buffer. |
| 3661 | Store the directory-local variables in `dir-local-variables-alist' | 3666 | Store the directory-local variables in `dir-local-variables-alist' |
| 3662 | and `file-local-variables-alist', without applying them." | 3667 | and `file-local-variables-alist', without applying them. |
| 3668 | |||
| 3669 | This does nothing if either `enable-local-variables' or | ||
| 3670 | `enable-dir-local-variables' are nil." | ||
| 3663 | (when (and enable-local-variables | 3671 | (when (and enable-local-variables |
| 3672 | enable-dir-local-variables | ||
| 3664 | (or enable-remote-dir-locals | 3673 | (or enable-remote-dir-locals |
| 3665 | (not (file-remote-p (or (buffer-file-name) | 3674 | (not (file-remote-p (or (buffer-file-name) |
| 3666 | default-directory))))) | 3675 | default-directory))))) |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index ea318ec3250..5e9ba6d9cea 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -5133,7 +5133,7 @@ Other orders of $ and _ seem to all work just fine.") | |||
| 5133 | (forward-line 1)) | 5133 | (forward-line 1)) |
| 5134 | ;; Would like to look for a "Total" line, or a "Directory" line to | 5134 | ;; Would like to look for a "Total" line, or a "Directory" line to |
| 5135 | ;; make sure that the listing isn't complete garbage before putting | 5135 | ;; make sure that the listing isn't complete garbage before putting |
| 5136 | ;; in "." and "..", but we can't even count on all VAX's giving us | 5136 | ;; in "." and "..", but we can't count on VMS giving us |
| 5137 | ;; either of these. | 5137 | ;; either of these. |
| 5138 | (puthash "." t tbl) | 5138 | (puthash "." t tbl) |
| 5139 | (puthash ".." t tbl)) | 5139 | (puthash ".." t tbl)) |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 011461119fc..39eb9e8b9aa 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -829,10 +829,9 @@ Run the Viper tutorial? ")) | |||
| 829 | (progn | 829 | (progn |
| 830 | (insert-file-contents (tutorial--saved-file)) | 830 | (insert-file-contents (tutorial--saved-file)) |
| 831 | (let ((enable-local-variables :safe) | 831 | (let ((enable-local-variables :safe) |
| 832 | (enable-local-eval nil)) | 832 | (enable-local-eval nil) |
| 833 | (enable-dir-local-variables nil)) ; bug#11127 | ||
| 833 | (hack-local-variables)) | 834 | (hack-local-variables)) |
| 834 | ;; FIXME? What we actually want is to ignore dir-locals (?). | ||
| 835 | (setq buffer-read-only nil) ; bug#11118 | ||
| 836 | (goto-char (point-min)) | 835 | (goto-char (point-min)) |
| 837 | (setq old-tut-point | 836 | (setq old-tut-point |
| 838 | (string-to-number | 837 | (string-to-number |
| @@ -849,10 +848,9 @@ Run the Viper tutorial? ")) | |||
| 849 | (setq tutorial--point-before-chkeys (point-marker))) | 848 | (setq tutorial--point-before-chkeys (point-marker))) |
| 850 | (insert-file-contents (expand-file-name filename tutorial-directory)) | 849 | (insert-file-contents (expand-file-name filename tutorial-directory)) |
| 851 | (let ((enable-local-variables :safe) | 850 | (let ((enable-local-variables :safe) |
| 852 | (enable-local-eval nil)) | 851 | (enable-local-eval nil) |
| 852 | (enable-dir-local-variables nil)) ; bug#11127 | ||
| 853 | (hack-local-variables)) | 853 | (hack-local-variables)) |
| 854 | ;; FIXME? What we actually want is to ignore dir-locals (?). | ||
| 855 | (setq buffer-read-only nil) ; bug#11118 | ||
| 856 | (forward-line) | 854 | (forward-line) |
| 857 | (setq tutorial--point-before-chkeys (point-marker))) | 855 | (setq tutorial--point-before-chkeys (point-marker))) |
| 858 | 856 | ||
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 8b4ff792969..0fc0d2e3f73 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el | |||
| @@ -114,6 +114,13 @@ specified in the variable `diff-switches' are passed to the diff command." | |||
| 114 | tempfile)) | 114 | tempfile)) |
| 115 | (file-local-copy file-or-buf))) | 115 | (file-local-copy file-or-buf))) |
| 116 | 116 | ||
| 117 | (defvar diff-use-labels 'check | ||
| 118 | "Whether `diff-command' understands the \"--label\" option. | ||
| 119 | Possible values are: | ||
| 120 | t -- yes, it does | ||
| 121 | nil -- no, it does not | ||
| 122 | check -- try to probe whether it does") | ||
| 123 | |||
| 117 | (defun diff-no-select (old new &optional switches no-async buf) | 124 | (defun diff-no-select (old new &optional switches no-async buf) |
| 118 | ;; Noninteractive helper for creating and reverting diff buffers | 125 | ;; Noninteractive helper for creating and reverting diff buffers |
| 119 | (unless (bufferp new) (setq new (expand-file-name new))) | 126 | (unless (bufferp new) (setq new (expand-file-name new))) |
| @@ -121,6 +128,11 @@ specified in the variable `diff-switches' are passed to the diff command." | |||
| 121 | (or switches (setq switches diff-switches)) ; If not specified, use default. | 128 | (or switches (setq switches diff-switches)) ; If not specified, use default. |
| 122 | (unless (listp switches) (setq switches (list switches))) | 129 | (unless (listp switches) (setq switches (list switches))) |
| 123 | (or buf (setq buf (get-buffer-create "*Diff*"))) | 130 | (or buf (setq buf (get-buffer-create "*Diff*"))) |
| 131 | (when (eq 'check diff-use-labels) | ||
| 132 | (setq diff-use-labels | ||
| 133 | (with-temp-buffer | ||
| 134 | (when (ignore-errors (call-process diff-command nil t nil "--help")) | ||
| 135 | (if (search-backward "--label" nil t) t))))) | ||
| 124 | (let* ((old-alt (diff-file-local-copy old)) | 136 | (let* ((old-alt (diff-file-local-copy old)) |
| 125 | (new-alt (diff-file-local-copy new)) | 137 | (new-alt (diff-file-local-copy new)) |
| 126 | (command | 138 | (command |
| @@ -130,11 +142,14 @@ specified in the variable `diff-switches' are passed to the diff command." | |||
| 130 | ,@switches | 142 | ,@switches |
| 131 | ,@(mapcar #'shell-quote-argument | 143 | ,@(mapcar #'shell-quote-argument |
| 132 | (nconc | 144 | (nconc |
| 133 | (when (or old-alt new-alt) | 145 | (and (or old-alt new-alt) |
| 134 | (list "-L" (if (stringp old) | 146 | (eq diff-use-labels t) |
| 135 | old (prin1-to-string old)) | 147 | (list "--label" |
| 136 | "-L" (if (stringp new) | 148 | (if (stringp old) old |
| 137 | new (prin1-to-string new)))) | 149 | (prin1-to-string old)) |
| 150 | "--label" | ||
| 151 | (if (stringp new) new | ||
| 152 | (prin1-to-string new)))) | ||
| 138 | (list (or old-alt old) | 153 | (list (or old-alt old) |
| 139 | (or new-alt new))))) | 154 | (or new-alt new))))) |
| 140 | " ")) | 155 | " ")) |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index fcdd792a69b..923888b460b 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -50,14 +50,21 @@ | |||
| 50 | :type 'string | 50 | :type 'string |
| 51 | :group 'vc-svn) | 51 | :group 'vc-svn) |
| 52 | 52 | ||
| 53 | (defcustom vc-svn-global-switches nil | 53 | ;; Might be nice if svn defaulted to non-interactive if stdin not tty. |
| 54 | "Global switches to pass to any SVN command." | 54 | ;; http://svn.haxx.se/dev/archive-2008-05/0762.shtml |
| 55 | ;; http://svn.haxx.se/dev/archive-2009-04/0094.shtml | ||
| 56 | ;; Maybe newer ones do? | ||
| 57 | (defcustom vc-svn-global-switches (unless (eq system-type 'darwin) ; bug#13513 | ||
| 58 | '("--non-interactive")) | ||
| 59 | "Global switches to pass to any SVN command. | ||
| 60 | The option \"--non-interactive\" is often needed to prevent SVN | ||
| 61 | hanging while prompting for authorization." | ||
| 55 | :type '(choice (const :tag "None" nil) | 62 | :type '(choice (const :tag "None" nil) |
| 56 | (string :tag "Argument String") | 63 | (string :tag "Argument String") |
| 57 | (repeat :tag "Argument List" | 64 | (repeat :tag "Argument List" |
| 58 | :value ("") | 65 | :value ("") |
| 59 | string)) | 66 | string)) |
| 60 | :version "22.1" | 67 | :version "24.4" |
| 61 | :group 'vc-svn) | 68 | :group 'vc-svn) |
| 62 | 69 | ||
| 63 | (defcustom vc-svn-register-switches nil | 70 | (defcustom vc-svn-register-switches nil |
| @@ -600,19 +607,11 @@ NAME is assumed to be a URL." | |||
| 600 | (defun vc-svn-command (buffer okstatus file-or-list &rest flags) | 607 | (defun vc-svn-command (buffer okstatus file-or-list &rest flags) |
| 601 | "A wrapper around `vc-do-command' for use in vc-svn.el. | 608 | "A wrapper around `vc-do-command' for use in vc-svn.el. |
| 602 | The difference to vc-do-command is that this function always invokes `svn', | 609 | The difference to vc-do-command is that this function always invokes `svn', |
| 603 | and that it passes \"--non-interactive\" and `vc-svn-global-switches' to | 610 | and that it passes `vc-svn-global-switches' to it before FLAGS." |
| 604 | it before FLAGS." | ||
| 605 | ;; Might be nice if svn defaulted to non-interactive if stdin not tty. | ||
| 606 | ;; http://svn.haxx.se/dev/archive-2008-05/0762.shtml | ||
| 607 | ;; http://svn.haxx.se/dev/archive-2009-04/0094.shtml | ||
| 608 | ;; Maybe newer ones do? | ||
| 609 | (or (member "--non-interactive" | ||
| 610 | (setq flags (if (stringp vc-svn-global-switches) | ||
| 611 | (cons vc-svn-global-switches flags) | ||
| 612 | (append vc-svn-global-switches flags)))) | ||
| 613 | (setq flags (cons "--non-interactive" flags))) | ||
| 614 | (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list | 611 | (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list |
| 615 | flags)) | 612 | (if (stringp vc-svn-global-switches) |
| 613 | (cons vc-svn-global-switches flags) | ||
| 614 | (append vc-svn-global-switches flags)))) | ||
| 616 | 615 | ||
| 617 | (defun vc-svn-repository-hostname (dirname) | 616 | (defun vc-svn-repository-hostname (dirname) |
| 618 | (with-temp-buffer | 617 | (with-temp-buffer |