summaryrefslogtreecommitdiff
path: root/lisp/files.el
Commit message (Collapse)AuthorAgeFilesLines
* * files.el (file-remote-p): Fix docstring. (Bug#10319)Drew Adams2011-12-211-18/+35
|
* Spelling fixes.Paul Eggert2011-12-041-2/+2
|
* * lisp/files.el (find-file): Don't use force-same-window.Stefan Monnier2011-11-281-1/+1
| | | | | | | | * lisp/window.el (switch-to-buffer): Better match Emacs-23 behavior and only use pop-to-buffer if the selected window can't be used. (pop-to-buffer-same-window): Use display-buffer--same-window-action. Fixes: debbugs:10144
* Spelling fixes.Paul Eggert2011-11-191-1/+1
|
* Spelling fixes.Paul Eggert2011-11-141-2/+2
|
* toggle-read-only fixes for bugs#7292, 10006.Glenn Morris2011-11-091-1/+9
| | | | | | | | | | | * doc/lispref/buffers.texi (Read Only Buffers): Expand a bit on why toggle-read-only should only be used interactively. * lisp/files.el (toggle-read-only): Mention that it should only be used interactively. * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Add toggle-read-only.
* * lisp/files.el (find-file): Always use selected-window.Stefan Monnier2011-11-071-1/+1
|
* Make set-visited-file-name reload local variables if needed.Glenn Morris2011-10-261-1/+5
| | | | | | | * lisp/files.el (set-visited-file-name): If the major-mode changed, reload the local variables. Fixes: debbugs:9796
* Make vc-toggle-read-only an alias for toggle-read-only.Chong Yidong2011-10-231-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It hasn't worked in a VC sense since 2008-05-02T07:12:59Z!esr@snark.thyrsus.com, though this was not documented at the time (grr). * lisp/vc/vc-hooks.el (vc-toggle-read-only): Make it an obsolete alias for toggle-read-only. Note that this hasn't called vc-next-action since 2008-05-02, though it wasn't documented at the time. * lisp/files.el (toggle-read-only): Remove obsolete comment about version control. * doc/emacs/buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only. * lisp/cedet/ede.el (ede-maybe-checkout): Function deleted; vc-toggle-read-only does not do version control now. * lisp/cedet/ede/project-am.el (project-remove-file, project-add-file) (project-new-target): Don't call ede-maybe-checkout. * lisp/cedet/ede/util.el (ede-make-buffer-writable): Don't use vc-toggle-read-only. * lisp/vc/ediff-init.el (ediff-toggle-read-only-function): Use toggle-read-only.
* Fix Bug#6019, Bug#9315.Michael Albinus2011-10-121-2/+2
| | | | | | | | | | | | | | | * files.el (set-auto-mode): Call `file-name-sans-versions' for the complete `buffer-file-name', the local file name part could look remotely (for example on VMS). * net/ange-ftp.el (ange-ftp-run-real-handler): Make it an alias of `tramp-run-real-handler'. (ange-ftp-fix-name-for-vms): Handle the case, where `name' is already quoted by '"'. * net/tramp.el (tramp-rfn-eshadow-update-overlay): Ignore errors. Let `file-name-handler-alist' be nil, the local file name part could look remotely (for example on VMS).
* * files.el (copy-directory): Set directory attributes only in caseMichael Albinus2011-09-221-3/+4
| | | | they could be retrieved from the source directory. (Bug#9565)
* Allow visiting files with malformed prop-lines.Chong Yidong2011-09-181-52/+56
| | | | | | | * files.el (inhibit-first-line-modes-regexps): Add image files. (hack-local-variables-prop-line): Return nil for malformed prop-lines. Fixes: debbugs:9044
* * dired-aux.el (dired-mark-read-string): Don't use default value on empty input.Chong Yidong2011-09-121-1/+1
| | | | | | | | | | | (dired-do-chxxx): Treat empty input for "touch" as no -t option. Omit initial minibuffer contents. (dired-do-chmod): Signal an error on empty input. (dired-mark-read-string): Don't return default on empty input. * files.el (file-modes-symbolic-to-number): Doc fix. Fixes: debbugs:9361
* Remove unused variable find-file-not-true-dirname-listLeo Liu2011-09-031-5/+0
| | | | See http://debbugs.gnu.org/9422.
* Remove pop-to-buffer-same-window.Chong Yidong2011-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted. (pop-to-buffer): Change interactive spec. Pass second argument directly to display-buffer. (display-buffer): Fix interactive spec. Use functionp to distinguish between a function and a list of functions. * lisp/abbrev.el (edit-abbrevs): * lisp/arc-mode.el (archive-extract): * lisp/autoinsert.el (auto-insert): * lisp/bookmark.el (bookmark-bmenu-list): * lisp/files.el (find-file): * lisp/view.el (view-buffer): * lisp/progmodes/compile.el (compilation-goto-locus): * lisp/textmodes/bibtex.el (bibtex-initialize): Use switch-to-buffer. * lisp/org/ob-ref.el (org-babel-ref-goto-headline-id): * lisp/org/org.el (org-get-location, org-tree-to-indirect-buffer) (org-mark-ring-goto, org-refile, org-add-log-note) (org-revert-all-org-buffers, org-switchb) (org-cycle-agenda-files, org-submit-bug-report) (org-goto-marker-or-bmk): * lisp/org/org-agenda.el (org-prepare-agenda, org-agenda-switch-to): * lisp/org/org-capture.el (org-capture-goto-target) (org-capture-fill-template): * lisp/org/org-clock.el (org-clock-goto): * lisp/org/org-ctags.el (org-ctags-visit-buffer-or-file): * lisp/org/org-exp.el (org-export-as-org): * lisp/org/org-feed.el (org-feed-show-raw-feed): * lisp/org/org-html.el (org-export-htmlize-generate-css): * lisp/org/org-id.el (org-id-goto): * lisp/org/org-irc.el (org-irc-visit-erc): * lisp/org/org-mobile.el (org-mobile-apply): * lisp/org/org-publish.el (org-publish-org-to, org-publish-find-date): * lisp/org/org-remember.el (org-go-to-remember-target): * lisp/org/org-src.el (org-src-switch-to-buffer) (org-edit-fixed-width-region): Use switch-to-buffer. * lisp/org/org-compat.el (org-pop-to-buffer-same-window): Deleted.
* * lisp/files.el (hack-local-variables): Fully ignore case for "mode:".Glenn Morris2011-08-201-1/+2
|
* files.el fix for bug#9331Glenn Morris2011-08-191-3/+5
| | | | | * lisp/files.el (hack-local-variables-prop-line, hack-local-variables): Downcase "Mode:".
* Make `buffer-offer-save' permanently localLars Magne Ingebrigtsen2011-07-161-0/+1
| | | | Fixes: debbugs:6241
* (make-directory): Clarify that an error will be raised if there's an errorLars Magne Ingebrigtsen2011-07-141-1/+4
| | | | Fixes: debbugs:6387
* Give better error messages when trying to load non-existent symlinksLars Magne Ingebrigtsen2011-07-131-1/+5
| | | | | | * files.el (after-find-file): Give a better error message when trying to find a symlink that points to a file that doesn't exist (bug#4398).
* Only do the `C-x C-q' warning on VC backends where it makes sense.Leo Liu2011-07-111-1/+1
| | | | Fixes: debbugs:2623
* * lisp/files.el (find-file): Use pop-to-buffer-same-window.Stefan Monnier2011-07-041-2/+2
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Add switch-to-buffer. Fixes: debbugs:8911
* * files.el (file-expand-wildcards): Ignore non-readableLars Magne Ingebrigtsen2011-07-031-1/+2
| | | | | sub-directories while trying to find matches instead of signalling an error (bug#6297).
* Avoid calling customize-save-variable during startup (Bug#8720).Chong Yidong2011-06-291-10/+1
| | | | | | | | | | | | | * lisp/cus-edit.el (customize-push-and-save): New function. * lisp/files.el (hack-local-variables-confirm): Use it. * lisp/custom.el (load-theme): New arg NO-CONFIRM. Use customize-push-and-save (Bug#8720). (custom-enabled-themes): Doc fix. * lisp/cus-theme.el (customize-create-theme) (custom-theme-merge-theme): Callers to load-theme changed.
* * lisp/files.el (auto-mode-alist): Add .f03, .f08 for f90-mode.Glenn Morris2011-06-291-0/+5
|
* Fix last change.Chong Yidong2011-06-191-1/+1
|
* * lisp/files.el (auto-mode-alist): Entry for m2-mode (Bug#8852).Chong Yidong2011-06-191-0/+1
|
* Move/add window-buffer-related functions to window.el.Martin Rudalics2011-06-111-94/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * buffer.c: New Lisp objects Qbuffer_list_update_hook and Qclone_number. Remove external declaration of Qdelete_window. (Fbuffer_list): Rewrite doc-string. Minor restructuring of code. (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): Run Qbuffer_list_update_hook if allowed. (Fother_buffer): Rewrite doc-string. Major rewrite for new buffer list implementation. (other_buffer_safely): New function. (Fkill_buffer): Replace call to replace_buffer_in_all_windows by calls to replace_buffer_in_windows and replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook if allowed. (record_buffer): Inhibit quitting and rewrite using quittable functions. Run Qbuffer_list_update_hook if allowed. (Frecord_buffer, Funrecord_buffer): New functions. (switch_to_buffer_1, Fswitch_to_buffer): Remove. Move switch-to-buffer to window.el. (bury-buffer): Move to window.el. (Vbuffer_list_update_hook): New variable. * lisp.h (other_buffer_safely): Add prototype in buffer.c section. * window.h (resize_frame_windows): Move up in code. (Fwindow_frame): Remove EXFUN. (replace_buffer_in_all_windows): Remove prototype. (replace_buffer_in_windows_safely): Add prototype. * window.c: Declare Qdelete_window static again. Move down declaration of select_count. (Fnext_window, Fprevious_window): Rewrite doc-strings. (Fother_window): Move to window.el. (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case. (Fdelete_windows_on, Freplace_buffer_in_windows): Move to window.el. (replace_buffer_in_windows): Implement by calling Qreplace_buffer_in_windows. (replace_buffer_in_all_windows): Remove with some functionality moved into replace_buffer_in_windows_safely. (replace_buffer_in_windows_safely): New function. (select_window_norecord, select_frame_norecord): Move in front of run_window_configuration_change_hook. Remove now obsolete declarations. (Fset_window_buffer): Rewrite doc-string. Call Qrecord_window_buffer. (keys_of_window): Move binding for other-window to window.el. * loadup.el (top-level): Load window before files for the sake of replace-buffer-in-windows. * files.el (read-buffer-to-switch) (switch-to-buffer-other-window) (switch-to-buffer-other-frame, display-buffer-other-frame): Move to window.el. * simple.el (get-next-valid-buffer, last-buffer, next-buffer) (previous-buffer): Move to window.el. * bindings.el (unbury-buffer): Move to window.el. * window.el (delete-other-windows-vertically): Move after definition of delete-other-windows. (other-window, delete-windows-on, replace-buffer-in-windows): Move here from window.c. (record-window-buffer, unrecord-window-buffer) (set-window-buffer-start-and-point, switch-to-prev-buffer) (switch-to-next-buffer): New functions. (get-next-valid-buffer, last-buffer, next-buffer): Move here from simple.el. Call switch-to-next-buffer. (previous-buffer): Move here from simple.el. Call switch-to-prev-buffer. (bury-buffer): Move here from buffer.c. Switch to previous buffer when window cannot be deleted. (unbury-buffer): Move here from bindings.el. (ctl-x-map): Move binding for other-window from window.c to here. (read-buffer-to-switch, switch-to-buffer-other-window) (switch-to-buffer-other-frame): Move here from files.el. (normalize-buffer-to-switch-to): New functions. (switch-to-buffer): Move here from buffer.c. Use read-buffer-to-switch and normalize-buffer-to-switch-to.
* Allow/recommend explicit args for minor-modes in file local eval:s.Glenn Morris2011-06-091-2/+2
| | | | | | | | | | | | * lisp/files.el (hack-one-local-variable-eval-safep): Allow minor-modes with explicit +/-1 arguments. * doc/emacs/custom.texi (Specifying File Variables): Recommend explicit arguments for minor modes. * etc/NEWS: Likewise. * lisp/doc-view.el, lisp/net/soap-client.el: Update file locals.
* Small fixes for dired-listing-switches usage.Alexander Klimov2011-06-081-2/+2
| | | | | | | | Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg01000.html * lisp/mail/sendmail.el (mail-recover-1, mail-recover): * lisp/files.el (recover-file, recover-session): Handle dired-listing-switches not being just a single short option.
* Tweak auto-mode-alist to handle config.h.in (Bug#8547).Chong Yidong2011-05-281-4/+5
| | | | | * lisp/files.el (auto-mode-alist): Move config rule after the in-stripping one.
* * lisp/files.el (interpreter-mode-alist): Add rbash.David Michael2011-05-271-0/+1
| | | | Fixes: debbugs:8745
* Make set-auto-mode respect mode: entries at the end of the file (bug#8586)Glenn Morris2011-05-261-6/+17
| | | | | | | | | | | | | * lisp/files.el (set-auto-mode): Also respect mode: entries at the end of the file. * doc/lispref/modes.texi (Auto Major Mode): Update for set-auto-mode changes. * doc/emacs/custom.texi (Specifying File Variables): Major modes no longer need come first. * etc/NEWS: Mention this.
* * lisp/files.el (hack-local-variables, hack-local-variables-apply): Doc fixes.Glenn Morris2011-05-261-0/+10
|
* Downcase mode names in recent files.el changes.Glenn Morris2011-05-261-2/+3
| | | | | * lisp/files.el (hack-local-variables-prop-line, hack-local-variables): Downcase mode names, as seems to be traditional.
* Don't quote lambda expressions with `quote'.Stefan Monnier2011-05-231-1/+1
|
* Further tweak previous files.el change.Glenn Morris2011-05-211-6/+11
| | | | | * lisp/files.el (hack-local-variables): In the MODE-ONLY case, try to ignore minor modes.
* Tweak previous files.el change.Glenn Morris2011-05-211-3/+6
| | | | | | * lisp/files.el (hack-local-variables-prop-line) (hack-local-variables): In the MODE-ONLY case, return the full mode symbol, including "-mode".
* More small hack-local-variables tweaks for MODE-ONLY case.Glenn Morris2011-05-211-45/+43
| | | | | | * lisp/files.el (hack-local-variables-prop-line): Small simplifications. (hack-local-variables, hack-local-variables-prop-line): If MODE-ONLY, return the mode, rather than just `t'.
* Small files.el hack-local changes for mode-only case.Glenn Morris2011-05-211-83/+91
| | | | | * lisp/files.el (hack-local-variables-prop-line, hack-local-variables): If only interested in the mode, don't bother doing the other stuff.
* Small break-hardlink-on-save fix.Nix2011-05-191-0/+1
| | | | | * files.el (basic-save-buffer-2): Fix handling of break-hardlink-on-save with non-existent files.
* Deprecate using "mode:" to enable minor modes (bug#8613)Glenn Morris2011-05-091-15/+19
| | | | | | | | | | | | | * lisp/files.el (hack-one-local-variable-eval-safep): Consider "eval: (foo-mode)" to be safe. * doc/emacs/custom.texi (Specifying File Variables): Deprecate using mode: for minor modes. * etc/NEWS: Mention this. * lisp/doc-view.el, lisp/net/soap-client.el: Change "mode:" minor-mode file local variables to use "eval:".
* * files.el (auto-mode-alist): Use js-mode for .json (Bug#8529).Chong Yidong2011-04-231-0/+1
|
* lisp/*.el: Lexical-binding cleanup.Juanma Barranquero2011-04-191-21/+21
|
* Produce more accurate results from file-size-human-readable.Eli Zaretskii2011-04-091-1/+4
| | | | | | | lisp/files.el (file-size-human-readable): Produce one digit after decimal, like "ls -lh" does. lisp/ls-lisp.el (ls-lisp-format-file-size): Allow for 7 characters in the file size representation.
* New function file-size-human-readable.Eli Zaretskii2011-04-081-0/+28
| | | | | | lisp/files.el (file-size-human-readable): New function. lisp/ls-lisp.el (ls-lisp-format-file-size): Use it, instead of computing the representation inline. Don't require `cl'.
* Reimplement list-processes in Lisp.Chong Yidong2011-04-061-2/+2
| | | | | | | | | | | * lisp/simple.el: Lisp reimplement of list-processes. Based on an earlier reimplementation by Leo Liu, but using tabulated-list.el. (process-menu-mode): New major mode. (list-processes--refresh, list-processes): (process-menu-visit-buffer): New functions. * lisp/files.el (save-buffers-kill-emacs): Don't assume any return value of list-processes, which is undocumented anyway.
* New variable `revert-buffer-in-progress-p'.Juanma Barranquero2011-04-061-8/+12
| | | | | | | | | | | | | * lisp/files.el (after-find-file-from-revert-buffer): Remove variable. (after-find-file): Dont' bind it. (revert-buffer-in-progress-p): New variable. (revert-buffer): Bind it. Pass nil for `after-find-file-from-revert-buffer'. * lisp/saveplace.el (save-place-find-file-hook): Use new variable `rever-buffer-in-progress-p', not `after-find-file-from-revert-buffer'. * etc/NEWS: New variable `revert-buffer-in-progress-p'.
* * lisp/files.el (save-some-buffers): Doc fix.Glenn Morris2011-04-021-0/+3
|
* Merge from trunkStefan Monnier2011-03-211-2/+8
|\