Now on revision 107909. ------------------------------------------------------------ revno: 107909 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2012-04-15 04:59:30 +0200 message: Fix ChangeLog typos. diff: === modified file 'ChangeLog' --- ChangeLog 2012-04-14 01:46:06 +0000 +++ ChangeLog 2012-04-15 02:59:30 +0000 @@ -2308,7 +2308,7 @@ 2010-03-12 Eli Zaretskii - These changes remove termcap.c from the build on Posix platforms. + These changes remove termcap.c from the build on POSIX platforms. * configure.in : Remove termcap.h. * configure: Regenerated. === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-04-14 01:46:06 +0000 +++ lib-src/ChangeLog 2012-04-15 02:59:30 +0000 @@ -67,7 +67,7 @@ * makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS). * emacsclient.c (main) : Remove declaration, already - pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows. + pulled in by unistd.h on POSIX hosts and stdlib.h on MS-Windows. 2011-11-24 Glenn Morris @@ -6651,7 +6651,7 @@ 1993-08-25 Paul Eggert (eggert@twinsun.com) - * rcs2log: Change /{/ to /\{/ for Posix ERE compatibility; + * rcs2log: Change /{/ to /\{/ for POSIX ERE compatibility; otherwise, HP awk complains. * vcdiff: Append /usr/ccs/bin and /usr/sccs to PATH, since these @@ -6998,7 +6998,7 @@ * rcs2log: mawk, SunOS 4.1.3 nawk, and Ultrix/MKS nawk all barf on /[/]/, so change it to /[\/]/. This should work on all - Posix-compliant awks. It's slightly wrong with traditional awk, + POSIX-compliant awks. It's slightly wrong with traditional awk, since it matches \ too, but that's a minor problem compared to awk syntax errors. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-14 12:58:29 +0000 +++ lisp/ChangeLog 2012-04-15 02:59:30 +0000 @@ -12,8 +12,7 @@ 2012-04-14 Michal Nazarewicz * server.el (server-auth-key): New variable. - (server-generate-key): New function. - (server-get-auth-key): New function. + (server-generate-key, server-get-auth-key): New function. (server-start): Use the new variable and functions to allow setting a permanent server key (bug#9423). @@ -156,11 +155,10 @@ * hexl.el (hexl-bits): New variable. (hexl-options): Mention the variable in the doc string. - (hexl-rulerise): New function. - (hexl-line-displen): New function + (hexl-rulerise, hexl-line-displen): New functions. (hexl-mode): Mention the new variable. - (hexl-mode, hexl-current-address, hexl-current-address): Use the - displen. + (hexl-mode, hexl-current-address, hexl-current-address): + Use the displen. (hexl-ascii-start-column): New function. (hexl-address-to-marker, hexl-beginning-of-line, hexl-options) (hexl-insert-char, hexl-mode-ruler): Use the displen (bug#4941). @@ -223,7 +221,7 @@ * emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes to previous function when point is on the first character of a - function. Take care of that in `narrow-to-defun' (bug#6157). + function. Take care of that in `narrow-to-defun' (bug#6157). 2012-04-11 Glenn Morris @@ -285,8 +283,8 @@ 2012-04-10 Laimonas Vėbra (tiny change) * language/european.el (cp775): Add oem/legacy (en)coding on - DOS/MS Windows for the Baltic languages. There are still plenty of - texts written in this encoding/codepage (bug#6519). + DOS/MS Windows for the Baltic languages. There are still plenty + of texts written in this encoding/codepage (bug#6519). 2012-04-10 Glenn Morris @@ -476,8 +474,8 @@ 2012-03-30 Agustín Martín Domingo * ispell.el (ispell-get-extended-character-mode): Disable - extended-char-mode for hunspell. hunspell does not support it and - treats ~word as ordinary words in pipe mode. + extended-char-mode for hunspell. hunspell does not support it + and treats ~word as ordinary words in pipe mode. 2012-03-30 Glenn Morris @@ -707,7 +705,7 @@ (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. (hfy-face-to-css): Re-defined to be a variable. (hfy-compile-stylesheet): Modify. Allow stylesheet to be built - over multiple runs. This is made possible by having the caller let + over multiple runs. This is made possible by having the caller let bind a special variable `hfy-user-sheet-assoc'. (htmlfontify-string): New defun. (hfy-compile-face-map): Make sure that the last char in the @@ -940,7 +938,7 @@ 2012-03-09 Michael Albinus - * net/dbus.el: (dbus-property-handler): Return empty array if + * net/dbus.el (dbus-property-handler): Return empty array if there are no properties. 2012-03-09 Leo Liu === modified file 'lisp/ChangeLog.11' --- lisp/ChangeLog.11 2012-02-24 19:32:46 +0000 +++ lisp/ChangeLog.11 2012-04-15 02:59:30 +0000 @@ -10889,7 +10889,7 @@ 2004-01-29 Jari Aalto * progmodes/executable.el (executable-command-find-posix-p): - New. Check if find handles arguments Posix-style. + New. Check if find handles arguments POSIX-style. * progmodes/grep.el (grep-compute-defaults): Use executable-command-find-posix-p. === modified file 'lisp/ChangeLog.12' --- lisp/ChangeLog.12 2012-01-19 07:21:25 +0000 +++ lisp/ChangeLog.12 2012-04-15 02:59:30 +0000 @@ -12449,7 +12449,7 @@ * calendar/appt.el (diary-selective-display): Add defvar. - * sort.el (sort-columns): Use Posix arg syntax for `sort'. + * sort.el (sort-columns): Use POSIX arg syntax for `sort'. * isearch.el (search-whitespace-regexp): Fix custom type. === modified file 'lisp/ChangeLog.6' --- lisp/ChangeLog.6 2012-01-19 07:21:25 +0000 +++ lisp/ChangeLog.6 2012-04-15 02:59:30 +0000 @@ -715,7 +715,7 @@ * ediff-diff.el (ediff-setup-fine-diff-regions): Allow diff options to be passed to the diff program. - (ediff-make-diff2-buffer): Don't run Posix diff on remote files. + (ediff-make-diff2-buffer): Don't run POSIX diff on remote files. (ediff-make-diff2-buffer): Refuses to diff remote files. (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions. (ediff-make-diff2-buffer): New function. === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-04-14 01:46:06 +0000 +++ nt/ChangeLog 2012-04-15 02:59:30 +0000 @@ -1195,7 +1195,7 @@ 2005-06-05 Eli Zaretskii * inc/sys/socket.h: Change arg 4 of sys_setsockopt to - `const void *', for consistency with Posix. + `const void *', for consistency with POSIX. 2005-06-04 Eli Zaretskii === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-14 06:18:49 +0000 +++ src/ChangeLog 2012-04-15 02:59:30 +0000 @@ -51,7 +51,7 @@ * alloc.c (lisp_align_malloc): Remove unneeded prototype. -2012-04-10 "Jason S. Cornez" (tiny change) +2012-04-10 Jason S. Cornez (tiny change) * keyboard.c: Override inhibit-quit after the third C-g (bug#6585). (force_quit_count): New var. @@ -1550,7 +1550,7 @@ * xfns.c (unwind_create_frame): Fix comment. (Fx_create_frame, x_create_tip_frame): Move terminal->reference_count++ just before making the frame - official. Move initialization of image_cache_refcount and + official. Move initialization of image_cache_refcount and dpyinfo_refcount before calling init_frame_faces (Bug#9943). 2011-11-05 Eli Zaretskii @@ -7323,7 +7323,7 @@ * xfaces.c : Make extern again. * syntax.c: Include sys/types.h before including regex.h, as - required by Posix. + required by POSIX. * doc.c (get_doc_string): Improve the format passed to `error'. === modified file 'src/ChangeLog.10' --- src/ChangeLog.10 2012-02-24 19:44:16 +0000 +++ src/ChangeLog.10 2012-04-15 02:59:30 +0000 @@ -23215,7 +23215,7 @@ * macterm.c (do_ae_open_documents) [MAC_OSX]: Call FSpMakeFSRef and FSRefMakePath to convert FSSpec returned with Apple Event to - Posix pathname. + POSIX pathname. (mac_initialize) [TARGET_API_MAC_CARBON]: Call init_required_apple_events and disable the `Quit' menu item provided automatically by the Carbon Toolbox. === modified file 'src/ChangeLog.11' --- src/ChangeLog.11 2012-03-21 18:27:05 +0000 +++ src/ChangeLog.11 2012-04-15 02:59:30 +0000 @@ -9641,7 +9641,7 @@ 2010-03-12 Eli Zaretskii - These changes remove termcap.c from the build on Posix platforms. + These changes remove termcap.c from the build on POSIX platforms. * Makefile.in (termcapobj): Move termcap.o from here... (MSDOS_OBJ): ...to here. (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is === modified file 'src/ChangeLog.6' --- src/ChangeLog.6 2012-01-19 07:21:25 +0000 +++ src/ChangeLog.6 2012-04-15 02:59:30 +0000 @@ -3236,7 +3236,7 @@ 1995-12-12 Paul Eggert - * process.c (create_process): Use Posix signal handling to + * process.c (create_process): Use POSIX signal handling to block signals, if available. If HAVE_VFORK, save and restore signal handlers that the child might change, since in many systems (e.g. Solaris 2.4) if the child changes the signal ------------------------------------------------------------ revno: 107908 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-04-14 10:53:52 -0700 message: Comment. diff: === modified file 'lisp/progmodes/which-func.el' --- lisp/progmodes/which-func.el 2012-04-14 02:31:50 +0000 +++ lisp/progmodes/which-func.el 2012-04-14 17:53:52 +0000 @@ -80,7 +80,7 @@ For other modes it is disabled. If this is equal to t, then Which Function mode is enabled in any major mode that supports it." :group 'which-func - :version "24.2" ; added objc-mode + :version "24.2" ; explicit list -> t :type '(choice (const :tag "All modes" t) (repeat (symbol :tag "Major mode")))) ------------------------------------------------------------ revno: 107907 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2012-04-14 14:58:29 +0200 message: * lisp/server.el: Doc fixes. (server-auth-key, server-generate-key): Doc fixes. (server-get-auth-key): Doc fix. Use `string-match-p'. (server-start): Reflow docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-14 11:36:26 +0000 +++ lisp/ChangeLog 2012-04-14 12:58:29 +0000 @@ -1,3 +1,9 @@ +2012-04-14 Juanma Barranquero + + * server.el (server-auth-key, server-generate-key): Doc fixes. + (server-get-auth-key): Doc fix. Use `string-match-p'. + (server-start): Reflow docstring. + 2012-04-14 Lars Ingebrigtsen * server.el (server-generate-key): `called-interactively-p' === modified file 'lisp/server.el' --- lisp/server.el 2012-04-14 11:36:26 +0000 +++ lisp/server.el 2012-04-14 12:58:29 +0000 @@ -142,21 +142,20 @@ (defcustom server-auth-key nil "Server authentication key. -Normally, authentication key is generated on random when server -starts, which guarantees some level of security. It is +Normally, the authentication key is randomly generated when the +server starts, which guarantees some level of security. It is recommended to leave it that way. Using a long-lived shared key -may decrease security (especially since the key is transmitted as +will decrease security (especially since the key is transmitted as plain text). In some situations however, it can be difficult to share randomly -generated password with remote hosts (eg. no shared directory), -so you can set the key with this variable and then copy server -file to remote host (with possible changes to IP address and/or -port if that applies). +generated passwords with remote hosts (eg. no shared directory), +so you can set the key with this variable and then copy the +server file to the remote host (with possible changes to IP +address and/or port if that applies). -The key must consist of 64 US-ASCII printable characters except -for space (this means characters from ! to ~; or from code 33 -to 126). +The key must consist of 64 ASCII printable characters except for +space (this means characters from ! to ~; or from code 33 to 126). You can use \\[server-generate-key] to get a random authentication key." @@ -550,9 +549,9 @@ (error "The directory `%s' is unsafe" dir))))) (defun server-generate-key () - "Generates and returns a random 64-byte strings of random chars -in the range `!'..`~'. If called interactively, also inserts it -into current buffer." + "Generate and return a random authentication key. +The key is a 64-byte string of random chars in the range `!'..`~'. +If called interactively, also inserts it into current buffer." (interactive) (let ((auth-key (loop repeat 64 @@ -563,14 +562,13 @@ auth-key)) (defun server-get-auth-key () - "Returns server's authentication key. + "Return server's authentication key. -If `server-auth-key' is nil this function will just call -`server-generate-key'. Otherwise, if `server-auth-key' is -a valid authentication it will return it. Otherwise, it will -signal an error." +If `server-auth-key' is nil, just call `server-generate-key'. +Otherwise, if `server-auth-key' is a valid key, return it. +If the key is not valid, signal an error." (if server-auth-key - (if (string-match "^[!-~]\\{64\\}$" server-auth-key) + (if (string-match-p "^[!-~]\\{64\\}$" server-auth-key) server-auth-key (error "The key '%s' is invalid" server-auth-key)) (server-generate-key))) @@ -578,10 +576,10 @@ ;;;###autoload (defun server-start (&optional leave-dead inhibit-prompt) "Allow this Emacs process to be a server for client processes. -This starts a server communications subprocess through which -client \"editors\" can send your editing commands to this Emacs -job. To use the server, set up the program `emacsclient' in the -Emacs distribution as your standard \"editor\". +This starts a server communications subprocess through which client +\"editors\" can send your editing commands to this Emacs job. +To use the server, set up the program `emacsclient' in the Emacs +distribution as your standard \"editor\". Optional argument LEAVE-DEAD (interactively, a prefix arg) means just kill any existing server communications subprocess. ------------------------------------------------------------ revno: 107906 committer: Lars Ingebrigtsen branch nick: trunk timestamp: Sat 2012-04-14 13:36:26 +0200 message: (server-generate-key): `called-interactively-p' requires a parameter. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-14 11:16:17 +0000 +++ lisp/ChangeLog 2012-04-14 11:36:26 +0000 @@ -1,3 +1,8 @@ +2012-04-14 Lars Ingebrigtsen + + * server.el (server-generate-key): `called-interactively-p' + requires a parameter. + 2012-04-14 Michal Nazarewicz * server.el (server-auth-key): New variable. === modified file 'lisp/server.el' --- lisp/server.el 2012-04-14 11:16:17 +0000 +++ lisp/server.el 2012-04-14 11:36:26 +0000 @@ -558,7 +558,7 @@ (loop repeat 64 collect (+ 33 (random 94)) into auth finally return (concat auth)))) - (if (called-interactively-p) + (if (called-interactively-p 'interactive) (insert auth-key)) auth-key)) ------------------------------------------------------------ revno: 107905 fixes bug(s): http://debbugs.gnu.org/9423 author: Michal Nazarewicz committer: Lars Ingebrigtsen branch nick: trunk timestamp: Sat 2012-04-14 13:16:17 +0200 message: Allow using `server-auth-key' to set a permanent shared key * server.el (server-auth-key): New variable. (server-generate-key): New function. (server-get-auth-key): New function. (server-start): Use the new variable and functions to allow setting a permanent server key. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-14 02:31:50 +0000 +++ etc/NEWS 2012-04-14 11:16:17 +0000 @@ -53,8 +53,11 @@ ** which-function-mode now applies to all applicable major modes by default. ** erc will look up server/channel names via auth-source and use the - channel keys found, if any. +channel keys found, if any. +** The `server-auth-key' variable can be used to set a permanent +shared key for Emacs Server. + ** Obsolete packages: *** mailpost.el === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-14 06:28:57 +0000 +++ lisp/ChangeLog 2012-04-14 11:16:17 +0000 @@ -1,3 +1,11 @@ +2012-04-14 Michal Nazarewicz + + * server.el (server-auth-key): New variable. + (server-generate-key): New function. + (server-get-auth-key): New function. + (server-start): Use the new variable and functions to allow + setting a permanent server key (bug#9423). + 2012-04-14 Leo Liu * vc/diff-mode.el (diff-file-prev/next): Fix typo. === modified file 'lisp/server.el' --- lisp/server.el 2012-04-04 17:13:00 +0000 +++ lisp/server.el 2012-04-14 11:16:17 +0000 @@ -139,6 +139,33 @@ ;;;###autoload (put 'server-auth-dir 'risky-local-variable t) +(defcustom server-auth-key nil + "Server authentication key. + +Normally, authentication key is generated on random when server +starts, which guarantees some level of security. It is +recommended to leave it that way. Using a long-lived shared key +may decrease security (especially since the key is transmitted as +plain text). + +In some situations however, it can be difficult to share randomly +generated password with remote hosts (eg. no shared directory), +so you can set the key with this variable and then copy server +file to remote host (with possible changes to IP address and/or +port if that applies). + +The key must consist of 64 US-ASCII printable characters except +for space (this means characters from ! to ~; or from code 33 +to 126). + +You can use \\[server-generate-key] to get a random authentication +key." + :group 'server + :type '(choice + (const :tag "Random" nil) + (string :tag "Password")) + :version "24.2") + (defcustom server-raise-frame t "If non-nil, raise frame when switching to a buffer." :group 'server @@ -522,6 +549,32 @@ (unless safe (error "The directory `%s' is unsafe" dir))))) +(defun server-generate-key () + "Generates and returns a random 64-byte strings of random chars +in the range `!'..`~'. If called interactively, also inserts it +into current buffer." + (interactive) + (let ((auth-key + (loop repeat 64 + collect (+ 33 (random 94)) into auth + finally return (concat auth)))) + (if (called-interactively-p) + (insert auth-key)) + auth-key)) + +(defun server-get-auth-key () + "Returns server's authentication key. + +If `server-auth-key' is nil this function will just call +`server-generate-key'. Otherwise, if `server-auth-key' is +a valid authentication it will return it. Otherwise, it will +signal an error." + (if server-auth-key + (if (string-match "^[!-~]\\{64\\}$" server-auth-key) + server-auth-key + (error "The key '%s' is invalid" server-auth-key)) + (server-generate-key))) + ;;;###autoload (defun server-start (&optional leave-dead inhibit-prompt) "Allow this Emacs process to be a server for client processes. @@ -615,13 +668,7 @@ (unless server-process (error "Could not start server process")) (process-put server-process :server-file server-file) (when server-use-tcp - (let ((auth-key - (loop - ;; The auth key is a 64-byte string of random chars in the - ;; range `!'..`~'. - repeat 64 - collect (+ 33 (random 94)) into auth - finally return (concat auth)))) + (let ((auth-key (server-get-auth-key))) (process-put server-process :auth-key auth-key) (with-temp-file server-file (set-buffer-multibyte nil) ------------------------------------------------------------ revno: 107904 committer: Leo Liu branch nick: trunk timestamp: Sat 2012-04-14 14:28:57 +0800 message: * lisp/vc/diff-mode.el (diff-file-prev/next): Fix typo. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-14 05:10:55 +0000 +++ lisp/ChangeLog 2012-04-14 06:28:57 +0000 @@ -1,3 +1,7 @@ +2012-04-14 Leo Liu + + * vc/diff-mode.el (diff-file-prev/next): Fix typo. + 2012-04-14 Paul Eggert Spelling fixes. === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2012-02-28 08:17:21 +0000 +++ lisp/vc/diff-mode.el 2012-04-14 06:28:57 +0000 @@ -545,7 +545,7 @@ (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) (easy-mmode-define-navigation - diff-file diff-file-header-re "file" diff-end-of-hunk) + diff-file diff-file-header-re "file" diff-end-of-file) (defun diff-restrict-view (&optional arg) "Restrict the view to the current hunk.