Mercurial > emacs
comparison lisp/files.el @ 83632:cc587bfd19ca
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 781-792)
- Update from CVS
- Merge from gnus--rel--5.10
- Merge from emacs--rel--22
* emacs--rel--22 (patch 33-41)
* gnus--rel--5.10 (patch 226-228)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-21
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 11 Jun 2007 01:00:07 +0000 |
parents | 422451dd396a 24cf4b8dd654 |
children | 0ece58f6e0aa |
comparison
equal
deleted
inserted
replaced
83631:7d63b897231b | 83632:cc587bfd19ca |
---|---|
1922 ("\\.texinfo\\'" . texinfo-mode) | 1922 ("\\.texinfo\\'" . texinfo-mode) |
1923 ("\\.te?xi\\'" . texinfo-mode) | 1923 ("\\.te?xi\\'" . texinfo-mode) |
1924 ("\\.[sS]\\'" . asm-mode) | 1924 ("\\.[sS]\\'" . asm-mode) |
1925 ("\\.asm\\'" . asm-mode) | 1925 ("\\.asm\\'" . asm-mode) |
1926 ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) | 1926 ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) |
1927 ("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode) | 1927 ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode) |
1928 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) | 1928 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) |
1929 ("\\.scm\\.[0-9]*\\'" . scheme-mode) | 1929 ("\\.scm\\.[0-9]*\\'" . scheme-mode) |
1930 ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) | 1930 ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) |
1931 ("\\.bash\\'" . sh-mode) | 1931 ("\\.bash\\'" . sh-mode) |
1932 ("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode) | 1932 ("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode) |
2010 ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) | 2010 ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) |
2011 ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config | 2011 ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config |
2012 ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode) | 2012 ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode) |
2013 ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) | 2013 ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) |
2014 ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode) | 2014 ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode) |
2015 ;; ChangeLog.old etc. Other change-log-mode entries are above; | |
2016 ;; this has lower priority to avoid matching changelog.sgml etc. | |
2017 ("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode) | |
2015 ;; either user's dot-files or under /etc or some such | 2018 ;; either user's dot-files or under /etc or some such |
2016 ("/\\.?\\(?:gnokiirc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode) | 2019 ("/\\.?\\(?:gnokiirc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode) |
2017 ;; alas not all ~/.*rc files are like this | 2020 ;; alas not all ~/.*rc files are like this |
2018 ("/\\.\\(?:enigma\\|gltron\\|gtk\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode) | 2021 ("/\\.\\(?:enigma\\|gltron\\|gtk\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode) |
2019 ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode) | 2022 ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode) |
4388 files | 4391 files |
4389 '("file" "files" "recover")) | 4392 '("file" "files" "recover")) |
4390 (message "No files can be recovered from this session now"))) | 4393 (message "No files can be recovered from this session now"))) |
4391 (kill-buffer buffer)))) | 4394 (kill-buffer buffer)))) |
4392 | 4395 |
4396 (defun kill-buffer-ask (buffer) | |
4397 "Kill buffer if confirmed." | |
4398 (when (yes-or-no-p | |
4399 (format "Buffer %s %s. Kill? " (buffer-name buffer) | |
4400 (if (buffer-modified-p buffer) | |
4401 "HAS BEEN EDITED" "is unmodified"))) | |
4402 (kill-buffer buffer))) | |
4403 | |
4393 (defun kill-some-buffers (&optional list) | 4404 (defun kill-some-buffers (&optional list) |
4394 "Kill some buffers. Asks the user whether to kill each one of them. | 4405 "Kill some buffers. Asks the user whether to kill each one of them. |
4395 Non-interactively, if optional argument LIST is non-nil, it | 4406 Non-interactively, if optional argument LIST is non-nil, it |
4396 specifies the list of buffers to kill, asking for approval for each one." | 4407 specifies the list of buffers to kill, asking for approval for each one." |
4397 (interactive) | 4408 (interactive) |
4402 (name (buffer-name buffer))) | 4413 (name (buffer-name buffer))) |
4403 (and name ; Can be nil for an indirect buffer | 4414 (and name ; Can be nil for an indirect buffer |
4404 ; if we killed the base buffer. | 4415 ; if we killed the base buffer. |
4405 (not (string-equal name "")) | 4416 (not (string-equal name "")) |
4406 (/= (aref name 0) ?\s) | 4417 (/= (aref name 0) ?\s) |
4407 (yes-or-no-p | 4418 (kill-buffer-ask buffer))) |
4408 (format "Buffer %s %s. Kill? " | |
4409 name | |
4410 (if (buffer-modified-p buffer) | |
4411 "HAS BEEN EDITED" "is unmodified"))) | |
4412 (kill-buffer buffer))) | |
4413 (setq list (cdr list)))) | 4419 (setq list (cdr list)))) |
4420 | |
4421 (defun kill-matching-buffers (regexp &optional internal-too) | |
4422 "Kill buffers whose name matches the specified regexp. | |
4423 The optional second argument indicates whether to kill internal buffers too." | |
4424 (interactive "sKill buffers matching this regular expression: \nP") | |
4425 (dolist (buffer (buffer-list)) | |
4426 (let ((name (buffer-name buffer))) | |
4427 (when (and name (not (string-equal name "")) | |
4428 (or internal-too (/= (aref name 0) ?\s)) | |
4429 (string-match regexp name)) | |
4430 (kill-buffer-ask buffer))))) | |
4431 | |
4414 | 4432 |
4415 (defun auto-save-mode (arg) | 4433 (defun auto-save-mode (arg) |
4416 "Toggle auto-saving of contents of current buffer. | 4434 "Toggle auto-saving of contents of current buffer. |
4417 With prefix argument ARG, turn auto-saving on if positive, else off." | 4435 With prefix argument ARG, turn auto-saving on if positive, else off." |
4418 (interactive "P") | 4436 (interactive "P") |