1. 12 Mar, 2013 1 commit
    • Stefan Monnier's avatar
      Use locate-user-emacs-file. · 940e5099
      Stefan Monnier authored
      * lisp/type-break.el (type-break-file-name):
      * lisp/textmodes/remember.el (remember-data-file):
      * lisp/strokes.el (strokes-file):
      * lisp/shadowfile.el (shadow-initialize):
      * lisp/saveplace.el (save-place-file):
      * lisp/ps-bdf.el (bdf-cache-file):
      * lisp/progmodes/idlwave.el (idlwave-config-directory):
      * lisp/net/quickurl.el (quickurl-url-file):
      * lisp/international/kkc.el (kkc-init-file-name):
      * lisp/ido.el (ido-save-directory-list-file):
      * lisp/emulation/viper.el (viper-custom-file-name):
      * lisp/emulation/vip.el (vip-startup-file):
      * lisp/calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
      * lisp/calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
  2. 11 Mar, 2013 2 commits
  3. 10 Mar, 2013 1 commit
  4. 05 Mar, 2013 1 commit
    • Paul Eggert's avatar
      FILE's lock is now always .#FILE and may be a regular file. · 70743157
      Paul Eggert authored
      * etc/NEWS: Document this.
      * nt/inc/unistd.h (O_NOFOLLOW): New macro.
      * src/filelock.c: Include <c-ctype.h>.
      (MAX_LFINFO): New top-level constant.
      (lock_info_type): Remove members pid, boot_time.  Add members at,
      dot, colon.  Change user member to be the entire buffer, not a
      pointer.  This allows us to handle the case where a foreign
      pid or boot time exceeds the local range.  All uses changed.
      (LINKS_MIGHT_NOT_WORK): New constant.
      (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
      (defined_WINDOWSNT): Remove.
      (MAKE_LOCK_NAME, file_in_lock_file_name):
      Always use .#FILE (not .#-FILE) for the file lock,
      even if it is a regular file.
      (rename_lock_file): New function.
      (create_lock_file): Use it.
      (create_lock_file, read_lock_data):
      Prefer a symbolic link for the lock file, falling back on a
      regular file if symlinks don't work.  Do not try to create
      symlinks on MS-Windows, due to security hassles.  Stick with
      POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
      link, rename, unlink, mkstemp) when creating locks, as a GNUish
      host may be using a Windowsish file system, and cannot use
      MS-Windows-only system calls.  Fall back on mktemp if mkstemp
      doesn't work.  Don't fail merely because of a symlink-contents
      length limit in the current file system; fall back on regular
      files.  Increase the symlink contents length limit to 8 KiB, this
      should be big enough for any real use and doesn't crunch the
      (create_lock_file, lock_file_1, read_lock_data):
      Simplify allocation of lock file buffers now that they fit in 8 KiB.
      (lock_file_1): Return error number, not bool.  All callers changed.
      (ELOOP): New macro, if not already defined.
      (read_lock_data): Return size of lock file contents, not Lisp object.
      All callers changed.  Handle a race condition if some other process
      replaces a regular-file lock with a symlink lock or vice versa,
      while we're trying to read the lock.
      (current_lock_owner): Parse contents more carefully, to help avoid
      confusing a regular-file lock with some other application's use
      of the file.  Check for lock file contents being too long, or
      not parsing correctly.
      (current_lock_owner, lock_file):
      Allow foreign pid and boot times that exceed the local range.
      (current_lock_owner, lock_if_free, lock_file):
      Simplify allocation of lock file contents.
      * src/w32.c (sys_rename_replace): New function, containing most of
      the contents of the old sys_rename.
      (sys_rename): Use it.
      (fchmod): New dummy function.
      * src/w32.h (sys_rename_replace, fchmod): New decls.
      Fixes: debbugs:13807
  5. 03 Mar, 2013 1 commit
  6. 02 Mar, 2013 1 commit
    • Paul Eggert's avatar
      The lock for FILE is now .#FILE or .#-FILE. · b5029e23
      Paul Eggert authored
      The old approach, which fell back on DIR/.#FILE.0 through
      DIR/.#FILE.9, had race conditions that could not be easily fixed.
      If DIR/.#FILE is a non-symlink file, Emacs now does not create a
      lock file for DIR/FILE; that is, DIR/FILE is no longer partly
      protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
      because the locking mechanism was never reliable in that case).
      This patch fixes this and other bugs discovered by a code
      inspection that was prompted by
      Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
      to avoid interoperability problems between the MS-Windows and
      non-MS-Windows implementations.  MS-Windows and non-MS-Windows
      instances of Emacs now ignore each others' locks.
      * etc/NEWS: Document this.
      * src/filelock.c (defined_WINDOWSNT): New constant.
      (MAKE_LOCK_NAME, fill_in_lock_file_name):
      Don't create DIR/.#FILE.0 through DIR/.#FILE.9.  Instead, create
      DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
      regular files on MS-Windows hosts.
      (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
      Use SAFE_ALLOCA to avoid problems with long file names.
      (MAX_LFINFO): Now a local constant, not a global macro.
      (IS_LOCK_FILE): Remove.
      (lock_file_1): Don't inspect errno if symlink call succeeds;
      that's not portable.
      (lock_file): Document that this function can return if lock
      creation fails.
      Fixes: debbugs:13807
  7. 01 Mar, 2013 2 commits
  8. 28 Feb, 2013 2 commits
  9. 27 Feb, 2013 1 commit
  10. 25 Feb, 2013 2 commits
    • Eli Zaretskii's avatar
      Implement CLASH_DETECTION for MS-Windows. · 343a2aef
      Eli Zaretskii authored
       src/filelock.c [WINDOWSNT]: Include w32.h.
       (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
       function of that name.  Up-case the macro arguments.
       (IS_LOCK_FILE): New macro.
       (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
       (create_lock_file): New function, with body extracted from
       [WINDOWSNT]: Implement lock files by writing a regular file with
       the lock information as its contents.
       (read_lock_data): New function, on Posix platforms just calls
       [WINDOWSNT]: Read the lock info from the file.
       (current_lock_owner): Call read_lock_data instead of calling
       emacs_readlinkat directly.
       (lock_file) [WINDOWSNT]: Run the file name through
       src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case
       just check if the process by that PID exists.
       src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
       also present, as doing so will fail to error out if the file
       already exists.
       src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
       nt/inc/ms-w32.h (BOOT_TIME_FILE): Define.
       nt/config.nt (CLASH_DETECTION): Define to 1.
       lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files
       that match "\`\.#", to avoid compiling lock files, even if they
       are readable (as they are on MS-Windows).
       doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the
       exclusive means of locking files.
       etc/NEWS: Mention support for lock files on MS-Windows.
    • Paul Eggert's avatar
      * NEWS: Document removal of --with-crt-dir. · aec32f66
      Paul Eggert authored
  11. 21 Feb, 2013 2 commits
  12. 16 Feb, 2013 2 commits
    • Glenn Morris's avatar
      Generalize "animated" images to "multi-frame" images · ed8d7fca
      Glenn Morris authored
      * lisp/image.el (image-animated-types): Remove.
      (image-multi-frame-p): Rename from image-animated-p, and generalize.
      (image-animated-p): Make obsolete alias.
      (image-animate, image-nth-frame, image-animate-timeout):
      Use image-multi-frame-p.
      (image-animate-timeout): If no delay, use image-default-frame-delay.
      * lisp/image-mode.el (image-mode, image-toggle-animation):
      Use image-multi-frame-p.
      (image-mode): Adjust startup message for a multi-frame image.
      * lisp/gnus/shr.el (shr-put-image): Only animate images that specify a delay.
      This is consistent with the old image-animated-p behavior.
      * etc/NEWS: Add placeholder for this.
      Fixes: debbugs:10739
    • Glenn Morris's avatar
      Add commands for navigating multi-frame images · c0211c4e
      Glenn Morris authored
      * lisp/image.el (image-nth-frame): New, split from image-animate-timeout.
      (image-animate-timeout): Use image-nth-frame.
      * lisp/image-mode.el (image-goto-frame, image-next-frame)
      (image-previous-frame): New commands.
      (image-mode-map): Add new frame commands.
      * etc/NEWS: Mention this.
  13. 14 Feb, 2013 1 commit
  14. 13 Feb, 2013 2 commits
    • Christopher Schmidt's avatar
      Add dired-hide-details-mode. (Bug#6799) · a2a538b1
      Christopher Schmidt authored
      * locate.el (locate-mode): Set parent mode property to dired-mode.
      * find-dired.el (find-dired): Call dired-insert-set-properties on
      initial information line.  Set process mark on end of buffer.
      Call dired-insert-set-properties on summary.
      * dired.el (dired-hide-details-hide-symlink-targets)
      (dired-hide-details-hide-information-lines): New options.
      Set properties after final treatment of output.
      Set dired-hide-details-* properties.
      (dired-mode-map): Bind dired-hide-details-mode.
      (dired-mode): Set buffer-invisibility-spec to a list.
      (dired-next-line): Skip hidden lines.
      (dired-previous-line): Use dired-next-line.
      (dired-hide-details-mode): New minor mode.
      (dired-hide-details-update-invisibility-spec): New function.
    • Glenn Morris's avatar
      Make yow.el obsolete · 4e16ddf4
      Glenn Morris authored
      * lisp/play/yow.el: Move to obsolete/. 
      * doc/emacs/ack.texi (Acknowledgments): Don't mention yow any more.
      * doc/misc/message.texi (News Headers): Don't mention yow any more.
      * etc/NEWS: Mention this.
      Fixes: debbugs:9384
  15. 12 Feb, 2013 1 commit
    • Glenn Morris's avatar
      Make S-SPC scroll in the opposite direction to SPC · 958614cf
      Glenn Morris authored
      * lisp/calc/calc-graph.el (calc-graph-show-dumb):
      * lisp/calendar/calendar.el (calendar-mode-map):
      * lisp/cus-edit.el (custom-mode-map):
      * lisp/ehelp.el (electric-help-map):
      * lisp/emulation/vip.el (vip-mode-map):
      * lisp/epa.el (epa-key-list-mode-map):
      * lisp/info.el (Info-mode-map):
      * lisp/mail/rmail.el (rmail-mode-map):
      * lisp/mail/rmailsum.el (rmail-summary-mode-map):
      * lisp/man.el (Man-mode-map):
      * lisp/net/newst-plainview.el (newsticker-mode-map):
      * lisp/progmodes/cpp.el (cpp-edit-mode-map):
      * lisp/progmodes/grep.el (grep-mode-map):
      * lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
      * lisp/simple.el (special-mode-map):
      * lisp/startup.el (splash-screen-keymap):
      * lisp/view.el (view-mode-map):
      Make S-SPC scroll in the opposite sense to SPC.
      Fixes: debbugs:2145
  16. 11 Feb, 2013 5 commits
    • Stefan Monnier's avatar
      Clean up read_key_sequence a bit; reread active keymaps after first event. · 99d0d6dc
      Stefan Monnier authored
      * src/keyboard.c (read_char, read_char_x_menu_prompt)
      Replace nmaps+maps with a single `map' arg.
      (follow_key): Operate on a single map.
      (active_maps): New function.
      (test_undefined): Also return true for nil bindings.
      (read_key_sequence): Use active_maps to replace the arrays of keymaps with
      a single (composed) keymap.  Remember `first_event' to choose the right
      set of active keymaps.  Recompute the set of keymaps after receiving
      the first event.  Remove GOBBLE_FIRST_EVENT.
      (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
      * src/keyboard.h (read_char): Update declaration.
      * src/lread.c (read_filtered_event): Adjust call to read_char.
      * lisp/cus-start.el (all): Remove inhibit-local-menu-bar-menus.
    • Michael Albinus's avatar
      * NEWS: Add autorevert changes. · add89f61
      Michael Albinus authored
    • Glenn Morris's avatar
      Add `enable-dir-local-variables' · 97a1cd9d
      Glenn Morris authored
      * lisp/files.el (enable-dir-local-variables): New variable.
      (hack-dir-local-variables): Respect enable-dir-local-variables.
      * lisp/tutorial.el (help-with-tutorial): Ignore directory-local variables.
      Fixes: debbugs:11127
    • Glenn Morris's avatar
    • Glenn Morris's avatar
      NEWS copyedits · c57b2d76
      Glenn Morris authored
  17. 09 Feb, 2013 2 commits
    • Eli Zaretskii's avatar
      Remove all references to buffer-file-type and related features. · 8549f9e8
      Eli Zaretskii authored
       src/xdisp.c (decode_mode_spec): Remove handling of %t.
       lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference
       lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix.
       (feedmail-run-the-queue, feedmail-dump-message-to-queue)
       (feedmail-send-it-immediately): Don't bind buffer-file-type, bind
       coding-system-for-write instead.
       lisp/jka-compr.el (jka-compr-write-region): Don't bind
       lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind
       lisp/files.el (file-name-buffer-file-type-alist): Remove defvar.
       (insert-file-contents-literally): Remove reference to
       lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and
       (find-buffer-file-type-match, find-buffer-file-type): Remove.
       (find-buffer-file-type-coding-system): Remove references to
       find-buffer-file-type-match, find-buffer-file-type, and
       Don't put find-buffer-file-type-coding-system into
       (find-file-binary, find-file-text): Bind coding-system-for-read
       instead of file-name-buffer-file-type-alist.
       lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type.
       doc/emacs/msdog.texi (Text and Binary): Delete the description of
       doc/lispref/modes.texi (%-Constructs): Remove the description of %t.
       doc/lispref/nonascii.texi (MS-DOS File Types): Delete node.
      Fixes: debbugs:12989
    • Chong Yidong's avatar
      Correct non-standard binding of report-emacs-bug-insert-to-mailer. · e78e7e48
      Chong Yidong authored
      * lisp/mail/emacsbug.el (report-emacs-bug): Change binding of
      report-emacs-bug-insert-to-mailer to C-c M-i.
      Fixes: debbugs:13510
  18. 05 Feb, 2013 2 commits
  19. 01 Feb, 2013 1 commit
  20. 31 Jan, 2013 2 commits
  21. 20 Jan, 2013 1 commit
  22. 19 Jan, 2013 2 commits
  23. 16 Jan, 2013 1 commit
  24. 13 Jan, 2013 2 commits