diff options
| author | Richard M. Stallman | 1997-09-14 17:23:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-09-14 17:23:52 +0000 |
| commit | c38eb0a8a862c9abfa634dc2ad974d81a0f644af (patch) | |
| tree | 6328474010838507c17e21e18bb866bf0cfe8b1a | |
| parent | 0de6b8f4a01dd0b4f4d15992f09bebc04c03fe95 (diff) | |
| download | emacs-c38eb0a8a862c9abfa634dc2ad974d81a0f644af.tar.gz emacs-c38eb0a8a862c9abfa634dc2ad974d81a0f644af.zip | |
Customized.
| -rw-r--r-- | lisp/arc-mode.el | 196 |
1 files changed, 147 insertions, 49 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 2fcb7c602e6..72a5578f38d 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; arc-mode.el --- simple editing of archives | 1 | ;;; arc-mode.el --- simple editing of archives |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 1997 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Morten Welinder <terra@diku.dk> | 5 | ;; Author: Morten Welinder <terra@diku.dk> |
| 6 | ;; Keywords: archives msdog editing major-mode | 6 | ;; Keywords: archives msdog editing major-mode |
| @@ -99,118 +99,216 @@ | |||
| 99 | ;; ------------------------------------------------------------------------- | 99 | ;; ------------------------------------------------------------------------- |
| 100 | ;; Section: Configuration. | 100 | ;; Section: Configuration. |
| 101 | 101 | ||
| 102 | (defvar archive-dos-members t | 102 | (defgroup archive nil |
| 103 | "*If non-nil then recognize member files using ^M^J as line terminator.") | 103 | "Simple editing of archives." |
| 104 | :group 'data) | ||
| 104 | 105 | ||
| 105 | (defvar archive-tmpdir | 106 | (defgroup archive-arc nil |
| 107 | "ARC-specific options to archive." | ||
| 108 | :group 'archive) | ||
| 109 | |||
| 110 | (defgroup archive-lzh nil | ||
| 111 | "LZH-specific options to archive." | ||
| 112 | :group 'archive) | ||
| 113 | |||
| 114 | (defgroup archive-zip nil | ||
| 115 | "ZIP-specific options to archive." | ||
| 116 | :group 'archive) | ||
| 117 | |||
| 118 | (defgroup archive-zoo nil | ||
| 119 | "ZOO-specific options to archive." | ||
| 120 | :group 'archive) | ||
| 121 | |||
| 122 | |||
| 123 | (defcustom archive-dos-members t | ||
| 124 | "*If non-nil then recognize member files using ^M^J as line terminator." | ||
| 125 | :type 'boolean | ||
| 126 | :group 'archive) | ||
| 127 | |||
| 128 | (defcustom archive-tmpdir | ||
| 106 | (expand-file-name | 129 | (expand-file-name |
| 107 | (make-temp-name (if (eq system-type 'ms-dos) "ar" "archive.tmp")) | 130 | (make-temp-name (if (eq system-type 'ms-dos) "ar" "archive.tmp")) |
| 108 | (or (getenv "TMPDIR") (getenv "TMP") "/tmp")) | 131 | (or (getenv "TMPDIR") (getenv "TMP") "/tmp")) |
| 109 | "*Directory for temporary files made by arc-mode.el") | 132 | "*Directory for temporary files made by arc-mode.el" |
| 133 | :type 'directory | ||
| 134 | :group 'archive) | ||
| 110 | 135 | ||
| 111 | (defvar archive-remote-regexp "^/[^/:]*[^/:.]:" | 136 | (defcustom archive-remote-regexp "^/[^/:]*[^/:.]:" |
| 112 | "*Regexp recognizing archive files names that are not local. | 137 | "*Regexp recognizing archive files names that are not local. |
| 113 | A non-local file is one whose file name is not proper outside Emacs. | 138 | A non-local file is one whose file name is not proper outside Emacs. |
| 114 | A local copy of the archive will be used when updating.") | 139 | A local copy of the archive will be used when updating." |
| 115 | 140 | :type 'regexp | |
| 116 | (defvar archive-extract-hooks nil | 141 | :group 'archive) |
| 117 | "*Hooks to run when an archive member has been extracted.") | 142 | |
| 143 | (defcustom archive-extract-hooks nil | ||
| 144 | "*Hooks to run when an archive member has been extracted." | ||
| 145 | :type 'hook | ||
| 146 | :group 'archive) | ||
| 118 | ;; ------------------------------ | 147 | ;; ------------------------------ |
| 119 | ;; Arc archive configuration | 148 | ;; Arc archive configuration |
| 120 | 149 | ||
| 121 | ;; We always go via a local file since there seems to be no reliable way | 150 | ;; We always go via a local file since there seems to be no reliable way |
| 122 | ;; to extract to stdout without junk getting added. | 151 | ;; to extract to stdout without junk getting added. |
| 123 | (defvar archive-arc-extract | 152 | (defcustom archive-arc-extract |
| 124 | '("arc" "x") | 153 | '("arc" "x") |
| 125 | "*Program and its options to run in order to extract an arc file member. | 154 | "*Program and its options to run in order to extract an arc file member. |
| 126 | Extraction should happen to the current directory. Archive and member | 155 | Extraction should happen to the current directory. Archive and member |
| 127 | name will be added.") | 156 | name will be added." |
| 128 | 157 | :type '(list (string :tag "Program") | |
| 129 | (defvar archive-arc-expunge | 158 | (repeat :tag "Options" |
| 159 | :inline t | ||
| 160 | (string :format "%v"))) | ||
| 161 | :group 'archive-arc) | ||
| 162 | |||
| 163 | (defcustom archive-arc-expunge | ||
| 130 | '("arc" "d") | 164 | '("arc" "d") |
| 131 | "*Program and its options to run in order to delete arc file members. | 165 | "*Program and its options to run in order to delete arc file members. |
| 132 | Archive and member names will be added.") | 166 | Archive and member names will be added." |
| 133 | 167 | :type '(list (string :tag "Program") | |
| 134 | (defvar archive-arc-write-file-member | 168 | (repeat :tag "Options" |
| 169 | :inline t | ||
| 170 | (string :format "%v"))) | ||
| 171 | :group 'archive-arc) | ||
| 172 | |||
| 173 | (defcustom archive-arc-write-file-member | ||
| 135 | '("arc" "u") | 174 | '("arc" "u") |
| 136 | "*Program and its options to run in order to update an arc file member. | 175 | "*Program and its options to run in order to update an arc file member. |
| 137 | Archive and member name will be added.") | 176 | Archive and member name will be added." |
| 177 | :type '(list (string :tag "Program") | ||
| 178 | (repeat :tag "Options" | ||
| 179 | :inline t | ||
| 180 | (string :format "%v"))) | ||
| 181 | :group 'archive-arc) | ||
| 138 | ;; ------------------------------ | 182 | ;; ------------------------------ |
| 139 | ;; Lzh archive configuration | 183 | ;; Lzh archive configuration |
| 140 | 184 | ||
| 141 | (defvar archive-lzh-extract | 185 | (defcustom archive-lzh-extract |
| 142 | '("lha" "pq") | 186 | '("lha" "pq") |
| 143 | "*Program and its options to run in order to extract an lzh file member. | 187 | "*Program and its options to run in order to extract an lzh file member. |
| 144 | Extraction should happen to standard output. Archive and member name will | 188 | Extraction should happen to standard output. Archive and member name will |
| 145 | be added.") | 189 | be added." |
| 146 | 190 | :type '(list (string :tag "Program") | |
| 147 | (defvar archive-lzh-expunge | 191 | (repeat :tag "Options" |
| 192 | :inline t | ||
| 193 | (string :format "%v"))) | ||
| 194 | :group 'archive-lzh) | ||
| 195 | |||
| 196 | (defcustom archive-lzh-expunge | ||
| 148 | '("lha" "d") | 197 | '("lha" "d") |
| 149 | "*Program and its options to run in order to delete lzh file members. | 198 | "*Program and its options to run in order to delete lzh file members. |
| 150 | Archive and member names will be added.") | 199 | Archive and member names will be added." |
| 151 | 200 | :type '(list (string :tag "Program") | |
| 152 | (defvar archive-lzh-write-file-member | 201 | (repeat :tag "Options" |
| 202 | :inline t | ||
| 203 | (string :format "%v"))) | ||
| 204 | :group 'archive-lzh) | ||
| 205 | |||
| 206 | (defcustom archive-lzh-write-file-member | ||
| 153 | '("lha" "a") | 207 | '("lha" "a") |
| 154 | "*Program and its options to run in order to update an lzh file member. | 208 | "*Program and its options to run in order to update an lzh file member. |
| 155 | Archive and member name will be added.") | 209 | Archive and member name will be added." |
| 210 | :type '(list (string :tag "Program") | ||
| 211 | (repeat :tag "Options" | ||
| 212 | :inline t | ||
| 213 | (string :format "%v"))) | ||
| 214 | :group 'archive-lzh) | ||
| 156 | ;; ------------------------------ | 215 | ;; ------------------------------ |
| 157 | ;; Zip archive configuration | 216 | ;; Zip archive configuration |
| 158 | 217 | ||
| 159 | (defvar archive-zip-use-pkzip (memq system-type '(ms-dos windows-nt)) | 218 | (defcustom archive-zip-use-pkzip (memq system-type '(ms-dos windows-nt)) |
| 160 | "*If non-nil then pkzip option are used instead of zip options. | 219 | "*If non-nil then pkzip option are used instead of zip options. |
| 161 | Only set to true for msdog systems!") | 220 | Only set to true for msdog systems!" |
| 221 | :type 'boolean | ||
| 222 | :group 'archive-zip) | ||
| 162 | 223 | ||
| 163 | (defvar archive-zip-extract | 224 | (defcustom archive-zip-extract |
| 164 | (if archive-zip-use-pkzip '("pkunzip" "-e") '("unzip" "-qq" "-c")) | 225 | (if archive-zip-use-pkzip '("pkunzip" "-e") '("unzip" "-qq" "-c")) |
| 165 | "*Program and its options to run in order to extract a zip file member. | 226 | "*Program and its options to run in order to extract a zip file member. |
| 166 | Extraction should happen to standard output. Archive and member name will | 227 | Extraction should happen to standard output. Archive and member name will |
| 167 | be added. If `archive-zip-use-pkzip' is non-nil then this program is | 228 | be added. If `archive-zip-use-pkzip' is non-nil then this program is |
| 168 | expected to extract to a file junking the directory part of the name.") | 229 | expected to extract to a file junking the directory part of the name." |
| 230 | :type '(list (string :tag "Program") | ||
| 231 | (repeat :tag "Options" | ||
| 232 | :inline t | ||
| 233 | (string :format "%v"))) | ||
| 234 | :group 'archive-zip) | ||
| 169 | 235 | ||
| 170 | ;; For several reasons the latter behaviour is not desirable in general. | 236 | ;; For several reasons the latter behaviour is not desirable in general. |
| 171 | ;; (1) It uses more disk space. (2) Error checking is worse or non- | 237 | ;; (1) It uses more disk space. (2) Error checking is worse or non- |
| 172 | ;; existent. (3) It tends to do funny things with other systems' file | 238 | ;; existent. (3) It tends to do funny things with other systems' file |
| 173 | ;; names. | 239 | ;; names. |
| 174 | 240 | ||
| 175 | (defvar archive-zip-expunge | 241 | (defcustom archive-zip-expunge |
| 176 | (if archive-zip-use-pkzip '("pkzip" "-d") '("zip" "-d" "-q")) | 242 | (if archive-zip-use-pkzip '("pkzip" "-d") '("zip" "-d" "-q")) |
| 177 | "*Program and its options to run in order to delete zip file members. | 243 | "*Program and its options to run in order to delete zip file members. |
| 178 | Archive and member names will be added.") | 244 | Archive and member names will be added." |
| 179 | 245 | :type '(list (string :tag "Program") | |
| 180 | (defvar archive-zip-update | 246 | (repeat :tag "Options" |
| 247 | :inline t | ||
| 248 | (string :format "%v"))) | ||
| 249 | :group 'archive-zip) | ||
| 250 | |||
| 251 | (defcustom archive-zip-update | ||
| 181 | (if archive-zip-use-pkzip '("pkzip" "-u") '("zip" "-q")) | 252 | (if archive-zip-use-pkzip '("pkzip" "-u") '("zip" "-q")) |
| 182 | "*Program and its options to run in order to update a zip file member. | 253 | "*Program and its options to run in order to update a zip file member. |
| 183 | Options should ensure that specified directory will be put into the zip | 254 | Options should ensure that specified directory will be put into the zip |
| 184 | file. Archive and member name will be added.") | 255 | file. Archive and member name will be added." |
| 185 | 256 | :type '(list (string :tag "Program") | |
| 186 | (defvar archive-zip-update-case | 257 | (repeat :tag "Options" |
| 258 | :inline t | ||
| 259 | (string :format "%v"))) | ||
| 260 | :group 'archive-zip) | ||
| 261 | |||
| 262 | (defcustom archive-zip-update-case | ||
| 187 | (if archive-zip-use-pkzip archive-zip-update '("zip" "-q" "-k")) | 263 | (if archive-zip-use-pkzip archive-zip-update '("zip" "-q" "-k")) |
| 188 | "*Program and its options to run in order to update a case fiddled zip member. | 264 | "*Program and its options to run in order to update a case fiddled zip member. |
| 189 | Options should ensure that specified directory will be put into the zip file. | 265 | Options should ensure that specified directory will be put into the zip file. |
| 190 | Archive and member name will be added.") | 266 | Archive and member name will be added." |
| 191 | 267 | :type '(list (string :tag "Program") | |
| 192 | (defvar archive-zip-case-fiddle t | 268 | (repeat :tag "Options" |
| 269 | :inline t | ||
| 270 | (string :format "%v"))) | ||
| 271 | :group 'archive-zip) | ||
| 272 | |||
| 273 | (defcustom archive-zip-case-fiddle t | ||
| 193 | "*If non-nil then zip file members are case fiddled. | 274 | "*If non-nil then zip file members are case fiddled. |
| 194 | Case fiddling will only happen for members created by a system that | 275 | Case fiddling will only happen for members created by a system that |
| 195 | uses caseless file names.") | 276 | uses caseless file names." |
| 277 | :type 'boolean | ||
| 278 | :group 'archive-zip) | ||
| 196 | ;; ------------------------------ | 279 | ;; ------------------------------ |
| 197 | ;; Zoo archive configuration | 280 | ;; Zoo archive configuration |
| 198 | 281 | ||
| 199 | (defvar archive-zoo-extract | 282 | (defcustom archive-zoo-extract |
| 200 | '("zoo" "xpq") | 283 | '("zoo" "xpq") |
| 201 | "*Program and its options to run in order to extract a zoo file member. | 284 | "*Program and its options to run in order to extract a zoo file member. |
| 202 | Extraction should happen to standard output. Archive and member name will | 285 | Extraction should happen to standard output. Archive and member name will |
| 203 | be added.") | 286 | be added." |
| 204 | 287 | :type '(list (string :tag "Program") | |
| 205 | (defvar archive-zoo-expunge | 288 | (repeat :tag "Options" |
| 289 | :inline t | ||
| 290 | (string :format "%v"))) | ||
| 291 | :group 'archive-zoo) | ||
| 292 | |||
| 293 | (defcustom archive-zoo-expunge | ||
| 206 | '("zoo" "DqPP") | 294 | '("zoo" "DqPP") |
| 207 | "*Program and its options to run in order to delete zoo file members. | 295 | "*Program and its options to run in order to delete zoo file members. |
| 208 | Archive and member names will be added.") | 296 | Archive and member names will be added." |
| 209 | 297 | :type '(list (string :tag "Program") | |
| 210 | (defvar archive-zoo-write-file-member | 298 | (repeat :tag "Options" |
| 299 | :inline t | ||
| 300 | (string :format "%v"))) | ||
| 301 | :group 'archive-zoo) | ||
| 302 | |||
| 303 | (defcustom archive-zoo-write-file-member | ||
| 211 | '("zoo" "a") | 304 | '("zoo" "a") |
| 212 | "*Program and its options to run in order to update a zoo file member. | 305 | "*Program and its options to run in order to update a zoo file member. |
| 213 | Archive and member name will be added.") | 306 | Archive and member name will be added." |
| 307 | :type '(list (string :tag "Program") | ||
| 308 | (repeat :tag "Options" | ||
| 309 | :inline t | ||
| 310 | (string :format "%v"))) | ||
| 311 | :group 'archive-zoo) | ||
| 214 | ;; ------------------------------------------------------------------------- | 312 | ;; ------------------------------------------------------------------------- |
| 215 | ;; Section: Variables | 313 | ;; Section: Variables |
| 216 | 314 | ||