diff options
author | Glenn Morris <rgm@gnu.org> | 2011-03-12 11:19:47 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-12 11:19:47 -0800 |
commit | 09d9db2c4921cb2eb0974892164dd03d6bffdd80 (patch) | |
tree | 7165f97f16ea0eaab567db2a45f69d1cdf66bdce | |
parent | 54ce11a161cd756047fccdfc128dc0527692ea06 (diff) | |
parent | 6efb972c00a9ea8ffa84118199aa59c2d3a3b50e (diff) | |
download | emacs-09d9db2c4921cb2eb0974892164dd03d6bffdd80.tar.gz |
Merge from emacs-23; up to 2010-06-03T22:16:02Z!dann@ics.uci.edu
-rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
-rw-r--r-- | doc/emacs/msdog.texi | 53 | ||||
-rw-r--r-- | lisp/ChangeLog | 17 | ||||
-rw-r--r-- | lisp/ebuff-menu.el | 101 | ||||
-rw-r--r-- | lisp/files.el | 10 | ||||
-rw-r--r-- | lisp/server.el | 8 | ||||
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/fringe.c | 8 | ||||
-rw-r--r-- | src/unexmacosx.c | 1 |
9 files changed, 127 insertions, 83 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a53aa095cc2..a30ffc07971 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-03-12 Eli Zaretskii <eliz@gnu.org> + + * msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets + HOME on Windows and where it looks for init files. (Bug#8221) + 2011-03-10 Eli Zaretskii <eliz@gnu.org> * search.texi (Regexp Example): diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 7358773485d..0a454db86bb 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -404,36 +404,45 @@ names, which might cause misalignment of columns in Dired display. @dfn{user-specific application data directory}. The actual location depends on your Windows version and system configuration; typical values are @file{C:\Documents and Settings\@var{username}\Application Data} on -Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data} +Windows 2K/XP/2K3, @file{C:\Users\@var{username}\AppData\Roaming} on +Windows Vista/7/2K8, and either @file{C:\WINDOWS\Application Data} or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the -older Windows 9X/ME systems. - - @code{HOME} can also be set in the system registry, for details see +older Windows 9X/ME systems. If this directory does not exist or +cannot be accessed, Emacs falls back to @file{C:\} as the default +value of @code{HOME}. + + You can override this default value of @code{HOME} by explicitly +setting the environment variable @env{HOME} to point to any directory +on your system. @env{HOME} can be set either from the command shell +prompt or from the @samp{My Computer}s @samp{Properties} dialog. +@code{HOME} can also be set in the system registry, for details see @ref{MS-Windows Registry}. -@cindex init file @file{.emacs} on MS-Windows - The home directory is where your init file @file{.emacs} is stored. -When Emacs starts, it first checks whether the environment variable -@env{HOME} is set. If it is, it looks for the init file in the -directory pointed by @env{HOME}. If @env{HOME} is not defined, Emacs -checks for an existing @file{.emacs} file in @file{C:\}, the root -directory of drive @file{C:}@footnote{ -The check in @file{C:\} is for compatibility with older versions of Emacs, -which didn't check the application data directory. -}. If there's no such file in @file{C:\}, Emacs next uses the Windows -system calls to find out the exact location of your application data -directory. If that system call fails, Emacs falls back to @file{C:\}. - - Whatever the final place is, Emacs sets the value of the @env{HOME} -environment variable to point to it, and it will use that location for -other files and directories it normally creates in the user's home -directory. + For compatibility with older versions of Emacs@footnote{ +Older versions of Emacs didn't check the application data directory. +}, if there is a file named @file{.emacs} in @file{C:\}, the root +directory of drive @file{C:}, and @env{HOME} is set neither in the +environment nor in the Registry, Emacs will treat @file{C:\} as the +default @code{HOME} location, and will not look in the application +data directory, even if it exists. Note that only @file{.emacs} is +looked for in @file{C:\}; the older name @file{_emacs} (see below) is +not. This use of @file{C:\.emacs} to define @code{HOME} is +deprecated. + + Whatever the final place is, Emacs sets the internal value of the +@env{HOME} environment variable to point to it, and it will use that +location for other files and directories it normally looks for or +creates in the user's home directory. You can always find out where Emacs thinks is your home directory's location by typing @kbd{C-x d ~/ @key{RET}}. This should present the list of files in the home directory, and show its full name on the first line. Likewise, to visit your init file, type @kbd{C-x C-f -~/.emacs @key{RET}}. +~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}). + +@cindex init file @file{.emacs} on MS-Windows + The home directory is where your init file is stored. It can have +any name mentioned in @ref{Init File}. @cindex @file{_emacs} init file, MS-Windows Because MS-DOS does not allow file names with leading dots, and diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f5484af8f2..3b47dd24698 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2011-03-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization + into declaration. Remove redundant and harmful binding. + +2011-03-12 Eli Zaretskii <eliz@gnu.org> + + * files.el (file-ownership-preserved-p): Pass `integer' as an + explicit 2nd argument to `file-attributes'. If the file's owner + is the Administrators group on Windows, and the current user is + Administrator, consider that a match. + + * server.el (server-ensure-safe-dir): Consider server directory + safe on MS-Windows if its owner is the Administrators group while + the current Emacs user is Administrator. Use `=' to compare + numerical UIDs, since they could be integers or floats. + 2011-03-12 Juanma Barranquero <lekktu@gmail.com> * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index dd589cb58f7..a906cf8516a 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -34,7 +34,56 @@ ;; this depends on the format of list-buffers (from src/buffer.c) and ;; on stuff in lisp/buff-menu.el -(defvar electric-buffer-menu-mode-map nil) +(defvar electric-buffer-menu-mode-map + (let ((map (make-keymap))) + (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) + (define-key map "\e" nil) + (define-key map "\C-z" 'suspend-frame) + (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) + (define-key map (char-to-string help-char) 'Helper-help) + (define-key map "?" 'Helper-describe-bindings) + (define-key map "\C-c" nil) + (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit) + (define-key map "\C-]" 'Electric-buffer-menu-quit) + (define-key map "q" 'Electric-buffer-menu-quit) + (define-key map " " 'Electric-buffer-menu-select) + (define-key map "\C-m" 'Electric-buffer-menu-select) + (define-key map "\C-l" 'recenter) + (define-key map "s" 'Buffer-menu-save) + (define-key map "d" 'Buffer-menu-delete) + (define-key map "k" 'Buffer-menu-delete) + (define-key map "\C-d" 'Buffer-menu-delete-backwards) + ;; (define-key map "\C-k" 'Buffer-menu-delete) + (define-key map "\177" 'Buffer-menu-backup-unmark) + (define-key map "~" 'Buffer-menu-not-modified) + (define-key map "u" 'Buffer-menu-unmark) + (let ((i ?0)) + (while (<= i ?9) + (define-key map (char-to-string i) 'digit-argument) + (define-key map (concat "\e" (char-to-string i)) 'digit-argument) + (setq i (1+ i)))) + (define-key map "-" 'negative-argument) + (define-key map "\e-" 'negative-argument) + (define-key map "m" 'Buffer-menu-mark) + (define-key map "\C-u" 'universal-argument) + (define-key map "\C-p" 'previous-line) + (define-key map "\C-n" 'next-line) + (define-key map "p" 'previous-line) + (define-key map "n" 'next-line) + (define-key map "\C-v" 'scroll-up) + (define-key map "\ev" 'scroll-down) + (define-key map ">" 'scroll-right) + (define-key map "<" 'scroll-left) + (define-key map "\e\C-v" 'scroll-other-window) + (define-key map "\e>" 'end-of-buffer) + (define-key map "\e<" 'beginning-of-buffer) + (define-key map "\e\e" nil) + (define-key map "\e\e\e" 'Electric-buffer-menu-quit) + ;; This binding prevents the "escape => ESC" function-key-map mapping from + ;; kicking in! + ;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit) + (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) + map)) (defvar electric-buffer-menu-mode-hook nil "Normal hook run by `electric-buffer-list'.") @@ -167,55 +216,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map) (put 'Electric-buffer-menu-undefined 'suppress-keymap t) -(if electric-buffer-menu-mode-map - nil - (let ((map (make-keymap))) - (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) - (define-key map "\e" nil) - (define-key map "\C-z" 'suspend-frame) - (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) - (define-key map (char-to-string help-char) 'Helper-help) - (define-key map "?" 'Helper-describe-bindings) - (define-key map "\C-c" nil) - (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit) - (define-key map "\C-]" 'Electric-buffer-menu-quit) - (define-key map "q" 'Electric-buffer-menu-quit) - (define-key map " " 'Electric-buffer-menu-select) - (define-key map "\C-m" 'Electric-buffer-menu-select) - (define-key map "\C-l" 'recenter) - (define-key map "s" 'Buffer-menu-save) - (define-key map "d" 'Buffer-menu-delete) - (define-key map "k" 'Buffer-menu-delete) - (define-key map "\C-d" 'Buffer-menu-delete-backwards) - ;(define-key map "\C-k" 'Buffer-menu-delete) - (define-key map "\177" 'Buffer-menu-backup-unmark) - (define-key map "~" 'Buffer-menu-not-modified) - (define-key map "u" 'Buffer-menu-unmark) - (let ((i ?0)) - (while (<= i ?9) - (define-key map (char-to-string i) 'digit-argument) - (define-key map (concat "\e" (char-to-string i)) 'digit-argument) - (setq i (1+ i)))) - (define-key map "-" 'negative-argument) - (define-key map "\e-" 'negative-argument) - (define-key map "m" 'Buffer-menu-mark) - (define-key map "\C-u" 'universal-argument) - (define-key map "\C-p" 'previous-line) - (define-key map "\C-n" 'next-line) - (define-key map "p" 'previous-line) - (define-key map "n" 'next-line) - (define-key map "\C-v" 'scroll-up) - (define-key map "\ev" 'scroll-down) - (define-key map ">" 'scroll-right) - (define-key map "<" 'scroll-left) - (define-key map "\e\C-v" 'scroll-other-window) - (define-key map "\e>" 'end-of-buffer) - (define-key map "\e<" 'beginning-of-buffer) - (define-key map "\e\e" nil) - (define-key map "\e\e\e" 'Electric-buffer-menu-quit) - (define-key map [escape escape escape] 'Electric-buffer-menu-quit) - (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) - (setq electric-buffer-menu-mode-map map))) + (defun Electric-buffer-menu-exit () (interactive) diff --git a/lisp/files.el b/lisp/files.el index ffc0b33119f..198d5ca87de 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3895,11 +3895,17 @@ See also `file-name-version-regexp'." (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) (if handler (funcall handler 'file-ownership-preserved-p file) - (let ((attributes (file-attributes file))) + (let ((attributes (file-attributes file 'integer))) ;; Return t if the file doesn't exist, since it's true that no ;; information would be lost by an (attempted) delete and create. (or (null attributes) - (= (nth 2 attributes) (user-uid))))))) + (= (nth 2 attributes) (user-uid)) + ;; Files created on Windows by Administrator (RID=500) + ;; have the Administrators group (RID=544) recorded as + ;; their owner. Rewriting them will still preserve the + ;; owner. + (and (eq system-type 'windows-nt) + (= (user-uid) 500) (= (nth 2 attributes) 544))))))) (defun file-name-sans-extension (filename) "Return FILENAME sans final \"extension\". diff --git a/lisp/server.el b/lisp/server.el index df8cae0a6af..cb1903ad96c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -485,7 +485,13 @@ See variable `server-auth-dir' for details." (file-name-as-directory dir)) :warning) (throw :safe t)) - (unless (eql uid (user-uid)) ; is the dir ours? + (unless (or (= uid (user-uid)) ; is the dir ours? + (and w32 + ;; Files created on Windows by + ;; Administrator (RID=500) have + ;; the Administrators (RID=544) + ;; group recorded as the owner. + (= uid 544) (= (user-uid) 500))) (throw :safe nil)) (when w32 ; on NTFS? (throw :safe t)) diff --git a/src/ChangeLog b/src/ChangeLog index 5976265ef85..a3098114388 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * fringe.c (update_window_fringes): Remove unused variables. + + * unexmacosx.c (copy_data_segment): Also copy __got section. + (Bug#8223) + 2011-03-12 Eli Zaretskii <eliz@gnu.org> * termcap.c [MSDOS]: Include "msdos.h. diff --git a/src/fringe.c b/src/fringe.c index 82fc38aee8a..ce75df766ee 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -954,18 +954,10 @@ update_window_fringes (struct window *w, int keep_current_p) y < yb && rn < nrows; y += row->height, ++rn) { - unsigned indicate_bob_p, indicate_top_line_p; - unsigned indicate_eob_p, indicate_bottom_line_p; - row = w->desired_matrix->rows + rn; if (!row->enabled_p) row = w->current_matrix->rows + rn; - indicate_bob_p = row->indicate_bob_p; - indicate_top_line_p = row->indicate_top_line_p; - indicate_eob_p = row->indicate_eob_p; - indicate_bottom_line_p = row->indicate_bottom_line_p; - row->indicate_bob_p = row->indicate_top_line_p = 0; row->indicate_eob_p = row->indicate_bottom_line_p = 0; diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 7a55498085d..2e46c063e95 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -828,6 +828,7 @@ copy_data_segment (struct load_command *lc) } else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0 || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0 + || strncmp (sectp->sectname, "__got", 16) == 0 || strncmp (sectp->sectname, "__la_sym_ptr2", 16) == 0 || strncmp (sectp->sectname, "__dyld", 16) == 0 || strncmp (sectp->sectname, "__const", 16) == 0 |