Now on revision 107958. ------------------------------------------------------------ revno: 107958 fixes bug(s): http://debbugs.gnu.org/11156 author: Christopher Schmidt committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-04-18 14:24:13 +0800 message: Fix require-final-newline interaction with read-only buffers. * lisp/files.el (after-find-file): Do not try to add a final newline if the buffer is read-only. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-17 23:23:20 +0000 +++ lisp/ChangeLog 2012-04-18 06:24:13 +0000 @@ -1,3 +1,8 @@ +2012-04-18 Christopher Schmidt + + * files.el (after-find-file): Do not try to add a final newline if + the buffer is read-only (Bug#11156). + 2012-04-17 Richard Stallman * mail/rmail.el (rmail-start-mail): @@ -9,7 +14,7 @@ (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer. * mail/sendmail.el (mail-bury): Choose the first rmail-mode - buffer, not the last. Reject temp buffers. Use the rmail-mode + buffer, not the last. Reject temp buffers. Use the rmail-mode buffer, not newbuf. 2012-04-17 Juanma Barranquero === modified file 'lisp/files.el' --- lisp/files.el 2012-04-14 01:46:06 +0000 +++ lisp/files.el 2012-04-18 06:24:13 +0000 @@ -2152,6 +2152,7 @@ (/= (char-after (1- (point-max))) ?\n) (not (and (eq selective-display t) (= (char-after (1- (point-max))) ?\r))) + (not buffer-read-only) (save-excursion (goto-char (point-max)) (insert "\n"))) ------------------------------------------------------------ revno: 107957 committer: Richard Stallman branch nick: trunk timestamp: Tue 2012-04-17 19:23:20 -0400 message: Fix logic for returning to and yanking from Rmail buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-17 17:05:22 +0000 +++ lisp/ChangeLog 2012-04-17 23:23:20 +0000 @@ -1,3 +1,17 @@ +2012-04-17 Richard Stallman + + * mail/rmail.el (rmail-start-mail): + Pass (rmail-mail-return...) for the return-action. + Pass (rmail-yank-current-message...) for the yank-action. + (rmail-yank-current-message): New function. + (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer. + (rmail-reply): Likewise. + (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer. + + * mail/sendmail.el (mail-bury): Choose the first rmail-mode + buffer, not the last. Reject temp buffers. Use the rmail-mode + buffer, not newbuf. + 2012-04-17 Juanma Barranquero * server.el (server-ensure-safe-dir): Simplify. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2012-04-09 13:05:48 +0000 +++ lisp/mail/rmail.el 2012-04-17 23:23:20 +0000 @@ -3560,6 +3560,16 @@ ;;;; *** Rmail Mailing Commands *** +(defun rmail-yank-current-message (buffer) + "Yank into the current buffer the current message of Rmail buffer BUFFER. +If BUFFER is swapped with its message viewer buffer, yank out of BUFFER. +If BUFFER is not swapped, yank out of its message viewer buffer." + (with-current-buffer buffer + (unless (rmail-buffers-swapped-p) + (setq buffer rmail-view-buffer))) + (insert-buffer buffer)) + + (defun rmail-start-mail (&optional noerase to subject in-reply-to cc replybuffer sendactions same-window other-headers) @@ -3571,7 +3581,8 @@ (if replybuffer ;; The function used here must behave like insert-buffer wrt ;; point and mark (see doc of sc-cite-original). - (setq yank-action (list 'insert-buffer replybuffer))) + (setq yank-action + `(rmail-yank-current-message ,replybuffer))) (push (cons "cc" cc) other-headers) (push (cons "in-reply-to" in-reply-to) other-headers) (setq other-headers @@ -3587,7 +3598,7 @@ (prog1 (compose-mail to subject other-headers noerase switch-function yank-action sendactions - `(rmail-mail-return ,replybuffer)) + (if replybuffer `(rmail-mail-return ,replybuffer))) (if (eq switch-function 'switch-to-buffer-other-frame) ;; This is not a standard frame parameter; nothing except ;; sendmail.el looks at it. @@ -3644,7 +3655,7 @@ While composing the message, use \\[mail-yank-original] to yank the original message into it." (interactive) - (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) + (rmail-start-mail nil nil nil nil nil rmail-buffer)) ;; FIXME should complain if there is nothing to continue. (defun rmail-continue () @@ -3731,9 +3742,7 @@ (mail-strip-quoted-names (if (null cc) to (concat to ", " cc)))))) (if (string= cc-list "") nil cc-list))) - (if (rmail-buffers-swapped-p) - rmail-buffer - rmail-view-buffer) + rmail-buffer (list (list 'rmail-mark-message rmail-buffer (with-current-buffer rmail-buffer @@ -3835,7 +3844,7 @@ (or (mail-fetch-field "Subject") "") "]"))) (if (rmail-start-mail - nil nil subject nil nil nil + nil nil subject nil nil rmail-buffer (list (list 'rmail-mark-message forward-buffer (with-current-buffer rmail-buffer === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2012-04-09 13:05:48 +0000 +++ lisp/mail/sendmail.el 2012-04-17 23:23:20 +0000 @@ -863,8 +863,11 @@ ;; even if this message was not started by an Rmail command. (unless return-action (dolist (buffer (buffer-list)) - (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) - (setq return-action `(rmail-mail-return ,newbuf))))) + (if (and (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) + (null return-action) + ;; Don't match message-viewer buffer. + (not (string-match "\\` " (buffer-name buffer)))) + (setq return-action `(rmail-mail-return ,buffer))))) (if (and (null arg) return-action) (apply (car return-action) (cdr return-action)) (switch-to-buffer newbuf)))) ------------------------------------------------------------ revno: 107956 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-04-17 15:56:06 -0700 message: * dired.c (Fsystem_groups): Remove unused local. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-17 01:35:15 +0000 +++ src/ChangeLog 2012-04-17 22:56:06 +0000 @@ -1,3 +1,7 @@ +2012-04-17 Paul Eggert + + * dired.c (Fsystem_groups): Remove unused local. + 2012-04-17 Glenn Morris * dired.c (Fsystem_users): Doc fix. === modified file 'src/dired.c' --- src/dired.c 2012-04-17 01:35:15 +0000 +++ src/dired.c 2012-04-17 22:56:06 +0000 @@ -1023,7 +1023,7 @@ (void) { Lisp_Object users = Qnil; -#if defined(HAVE_GETPWENT) && defined(HAVE_ENDPWENT) +#if defined HAVE_GETPWENT && defined HAVE_ENDPWENT struct passwd *pw; while ((pw = getpwent ())) @@ -1043,9 +1043,8 @@ (void) { Lisp_Object groups = Qnil; -#if defined(HAVE_GETGRENT) && defined(HAVE_ENDGRENT) +#if defined HAVE_GETGRENT && defined HAVE_ENDGRENT struct group *gr; - int length; while ((gr = getgrent ())) groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups); ------------------------------------------------------------ revno: 107955 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2012-04-17 19:05:22 +0200 message: lisp/server.el (server-ensure-safe-dir): Simplify. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-17 03:06:56 +0000 +++ lisp/ChangeLog 2012-04-17 17:05:22 +0000 @@ -1,3 +1,7 @@ +2012-04-17 Juanma Barranquero + + * server.el (server-ensure-safe-dir): Simplify. + 2012-04-17 Stefan Monnier * emacs-lisp/smie.el: Provide smarter auto-filling. === modified file 'lisp/server.el' --- lisp/server.el 2012-04-14 12:58:29 +0000 +++ lisp/server.el 2012-04-17 17:05:22 +0000 @@ -520,31 +520,27 @@ ;; Check that it's safe for use. (let* ((uid (nth 2 attrs)) (w32 (eq system-type 'windows-nt)) - (safe (catch :safe - (unless (eq t (car attrs)) ; is a dir? - (throw :safe nil)) - (when (and w32 (zerop uid)) ; on FAT32? - (display-warning - 'server - (format "Using `%s' to store Emacs-server authentication files. + (safe (cond + ((not (eq t (car attrs))) nil) ; is a dir? + ((and w32 (zerop uid)) ; on FAT32? + (display-warning + 'server + (format "Using `%s' to store Emacs-server authentication files. Directories on FAT32 filesystems are NOT secure against tampering. See variable `server-auth-dir' for details." - (file-name-as-directory dir)) - :warning) - (throw :safe t)) - (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)) - (unless (zerop (logand ?\077 (file-modes dir))) - (throw :safe nil)) - t))) + (file-name-as-directory dir)) + :warning) + t) + ((and (/= uid (user-uid)) ; is the dir ours? + (or (not w32) + ;; Files created on Windows by Administrator + ;; (RID=500) have the Administrators (RID=544) + ;; group recorded as the owner. + (/= uid 544) (/= (user-uid) 500))) + nil) + (w32 t) ; on NTFS? + (t ; else, check permissions + (zerop (logand ?\077 (file-modes dir))))))) (unless safe (error "The directory `%s' is unsafe" dir))))) ------------------------------------------------------------ revno: 107954 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-04-17 06:21:15 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2012-04-01 02:44:24 +0000 +++ lisp/dired.el 2012-04-17 10:21:15 +0000 @@ -3736,7 +3736,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-01-19 07:21:25 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-04-17 10:21:15 +0000 @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ ------------------------------------------------------------ revno: 107953 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-04-17 06:17:40 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-01-19 07:21:25 +0000 +++ autogen/config.in 2012-04-17 10:17:40 +0000 @@ -203,6 +203,12 @@ /* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 +/* Define to 1 if you have the `endgrent' function. */ +#undef HAVE_ENDGRENT + +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS @@ -254,6 +260,9 @@ /* Define to 1 if you have the `getdomainname' function. */ #undef HAVE_GETDOMAINNAME +/* Define to 1 if you have the `getgrent' function. */ +#undef HAVE_GETGRENT + /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME @@ -278,6 +287,9 @@ /* Define to 1 if you have the `getpt' function. */ #undef HAVE_GETPT +/* Define to 1 if you have the `getpwent' function. */ +#undef HAVE_GETPWENT + /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT === modified file 'autogen/configure' --- autogen/configure 2012-04-13 10:17:25 +0000 +++ autogen/configure 2012-04-17 10:17:40 +0000 @@ -9656,15 +9656,6 @@ window_system=x11 fi -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - LD_SWITCH_X_SITE_AUX= LD_SWITCH_X_SITE_AUX_RPATH= if test "${x_libraries}" != NONE; then @@ -9803,7 +9794,6 @@ fi - NS_HAVE_NSINTEGER=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9821,8 +9811,10 @@ ns_have_nsinteger=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no + if test $ns_have_nsinteger = yes; then + +$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h + fi fi @@ -13434,11 +13426,6 @@ ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - -$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h - - fi # We also have mouse menus. HAVE_MENUS=yes OTHER_FILES=ns-app @@ -13967,6 +13954,7 @@ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap fsync sync \ difftime mempcpy mblen mbrlen posix_memalign \ +getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ------------------------------------------------------------ revno: 107952 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-04-16 20:08:05 -0700 message: NEWS placeholder diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-17 02:46:22 +0000 +++ etc/NEWS 2012-04-17 03:08:05 +0000 @@ -74,6 +74,8 @@ ** In Perl mode, new option `perl-indent-parens-as-block' causes non-block closing brackets to be aligned with the line of the opening bracket. +** FIXME something happened to ses.el, 2012-04-17. + ** Obsolete packages: *** mailpost.el