diff options
| author | Kenichi Handa | 2010-01-20 13:01:04 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-01-20 13:01:04 +0900 |
| commit | a4cf170db540996460abefee7aab4e66b8b1b4d7 (patch) | |
| tree | 13d2fc796b233819e3d398b7c1f4e89c450dc07b | |
| parent | 4d1e6632e7195a82088408817a6b3db7e520d370 (diff) | |
| parent | 79c08ece637930027beeb919da99865bcc7920bd (diff) | |
| download | emacs-a4cf170db540996460abefee7aab4e66b8b1b4d7.tar.gz emacs-a4cf170db540996460abefee7aab4e66b8b1b4d7.zip | |
from trunk
| -rw-r--r-- | admin/ChangeLog | 5 | ||||
| -rwxr-xr-x | admin/revdiff | 137 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/indent.el | 10 |
4 files changed, 16 insertions, 140 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 8fd3b828a71..a43dbe931f0 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * revdiff: Remove file that only works with CVS, and isn't really | ||
| 4 | needed with Bazaar (given the in-built revision options of bzr diff). | ||
| 5 | |||
| 1 | 2010-01-12 Glenn Morris <rgm@gnu.org> | 6 | 2010-01-12 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-pretesters, make-announcement: Use bug-gnu-emacs rather | 8 | * emacs-pretesters, make-announcement: Use bug-gnu-emacs rather |
diff --git a/admin/revdiff b/admin/revdiff deleted file mode 100755 index 7a1e93a64fe..00000000000 --- a/admin/revdiff +++ /dev/null | |||
| @@ -1,137 +0,0 @@ | |||
| 1 | #! /usr/bin/perl | ||
| 2 | |||
| 3 | # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, | ||
| 4 | # 2010 Free Software Foundation, Inc. | ||
| 5 | # | ||
| 6 | # This file is part of GNU Emacs. | ||
| 7 | |||
| 8 | # GNU Emacs is free software: you can redistribute it and/or modify | ||
| 9 | # it under the terms of the GNU General Public License as published by | ||
| 10 | # the Free Software Foundation, either version 3 of the License, or | ||
| 11 | # (at your option) any later version. | ||
| 12 | |||
| 13 | # GNU Emacs is distributed in the hope that it will be useful, | ||
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | # GNU General Public License for more details. | ||
| 17 | |||
| 18 | # You should have received a copy of the GNU General Public License | ||
| 19 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | |||
| 21 | |||
| 22 | use File::Basename; | ||
| 23 | |||
| 24 | if (@ARGV < 3) | ||
| 25 | { | ||
| 26 | print <<USAGE; | ||
| 27 | revdiff FILE OLD NEW | ||
| 28 | |||
| 29 | Get a diff of FILE between revisions OLD and NEW. Store the | ||
| 30 | diff in a file named FILE-OLD-NEW.diff. | ||
| 31 | |||
| 32 | If OLD is `-' use FILE's current revision for OLD. If OLD is | ||
| 33 | `-<number>', use the Nth revision before the current one for OLD. | ||
| 34 | |||
| 35 | If NEW is +<number> or -<number>, build diffs between revisions OLD | ||
| 36 | and OLD +/- <number>. | ||
| 37 | |||
| 38 | Examples: | ||
| 39 | |||
| 40 | revdiff FILE - -1 get the latest change of FILE | ||
| 41 | revdiff FILE -1 +1 also gets the latest change of FILE | ||
| 42 | revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502. | ||
| 43 | |||
| 44 | USAGE | ||
| 45 | exit 1; | ||
| 46 | } | ||
| 47 | |||
| 48 | $file = shift @ARGV; | ||
| 49 | $old = shift @ARGV; | ||
| 50 | |||
| 51 | sub diffit | ||
| 52 | { | ||
| 53 | my ($old, $new) = @_; | ||
| 54 | print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n"; | ||
| 55 | system "cvs diff -r$old -r$new $file >$file-$old-$new.diff"; | ||
| 56 | } | ||
| 57 | |||
| 58 | sub current_revision ($) | ||
| 59 | { | ||
| 60 | my ($file) = @_; | ||
| 61 | my $dir = dirname ($file); | ||
| 62 | my $base = basename ($file); | ||
| 63 | my $entries = "$dir/CVS/Entries"; | ||
| 64 | die "Can't find $entries" unless -f $entries; | ||
| 65 | open (IN, "<$entries") or die "Cannot open $entries"; | ||
| 66 | my $rev; | ||
| 67 | while ($line = <IN>) | ||
| 68 | { | ||
| 69 | if ($line =~ m,/$base/([^/]+),) | ||
| 70 | { | ||
| 71 | $rev = $1; | ||
| 72 | break; | ||
| 73 | } | ||
| 74 | } | ||
| 75 | die "Cannot determine current revision of $file" unless $rev; | ||
| 76 | close (IN); | ||
| 77 | return $rev; | ||
| 78 | } | ||
| 79 | |||
| 80 | if ($old eq "-") | ||
| 81 | { | ||
| 82 | $old = current_revision ($file); | ||
| 83 | } | ||
| 84 | elsif ($old =~ /^-(\d+)$/) | ||
| 85 | { | ||
| 86 | my $offset = $1; | ||
| 87 | $old = current_revision ($file); | ||
| 88 | die "Internal error" unless $old =~ /(.*)\.(\d+)$/; | ||
| 89 | my $minor = $2 - $offset; | ||
| 90 | $old = sprintf ("%d.%d", $1, $minor); | ||
| 91 | } | ||
| 92 | |||
| 93 | while (@ARGV) | ||
| 94 | { | ||
| 95 | my $new = shift @ARGV; | ||
| 96 | if ($new =~ /^[+]\d+$/) | ||
| 97 | { | ||
| 98 | my $n = $new; | ||
| 99 | for ($i = 0; $i < $n; ++$i) | ||
| 100 | { | ||
| 101 | unless ($old =~ /(.*)\.(\d+)$/) | ||
| 102 | { | ||
| 103 | die "Internal error"; | ||
| 104 | } | ||
| 105 | my $j = $2 + 1; | ||
| 106 | $new = "$1.$j"; | ||
| 107 | diffit ($old, $new); | ||
| 108 | $old = $new; | ||
| 109 | } | ||
| 110 | } | ||
| 111 | elsif ($new =~ /^[-]\d+$/) | ||
| 112 | { | ||
| 113 | my $n = - $new; | ||
| 114 | for ($i = 0; $i < $n; ++$i) | ||
| 115 | { | ||
| 116 | unless ($old =~ /(.*)\.(\d+)$/) | ||
| 117 | { | ||
| 118 | die "Internal error"; | ||
| 119 | } | ||
| 120 | my $j = $2 - 1; | ||
| 121 | $new = "$1.$j"; | ||
| 122 | diffit ($new, $old); | ||
| 123 | $old = $new; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | else | ||
| 127 | { | ||
| 128 | diffit ($old, $new); | ||
| 129 | $old = $new; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | # Local Variables: | ||
| 134 | # mode: cperl | ||
| 135 | # End: | ||
| 136 | |||
| 137 | # arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b34373f2d3..800b2ad24c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-01-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * indent.el (tab-always-indent): Fix custom-type. | ||
| 4 | |||
| 1 | 2010-01-19 Alan Mackenzie <acm@muc.de> | 5 | 2010-01-19 Alan Mackenzie <acm@muc.de> |
| 2 | 6 | ||
| 3 | * progmodes/cc-defs.el: Fix bug#5395: typing '#' in an empty | 7 | * progmodes/cc-defs.el: Fix bug#5395: typing '#' in an empty |
diff --git a/lisp/indent.el b/lisp/indent.el index 12cf9c9bb5d..3f8353bd90c 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; indent.el --- indentation commands for Emacs | 1 | ;;; indent.el --- indentation commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
| 4 | ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 | ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | 7 | ||
| @@ -55,7 +55,11 @@ was already indented, then try to complete the thing at point. | |||
| 55 | Some programming language modes have their own variable to control this, | 55 | Some programming language modes have their own variable to control this, |
| 56 | e.g., `c-tab-always-indent', and do not respect this variable." | 56 | e.g., `c-tab-always-indent', and do not respect this variable." |
| 57 | :group 'indent | 57 | :group 'indent |
| 58 | :type '(choice (const nil) (const t) (const always))) | 58 | :type '(choice |
| 59 | (const :tag "Always indent" t) | ||
| 60 | (const :tag "Indent if inside indentation, else TAB" nil) | ||
| 61 | (const :tag "Indent, or if already indented complete" complete))) | ||
| 62 | |||
| 59 | 63 | ||
| 60 | (defun indent-according-to-mode () | 64 | (defun indent-according-to-mode () |
| 61 | "Indent line in proper way for current major mode. | 65 | "Indent line in proper way for current major mode. |