commit ead76c4603f2c4a1761ab8a7dd5cf6f56e782fb2 (HEAD, refs/remotes/origin/master) Author: Katsumi Yamaoka Date: Mon Sep 12 23:41:25 2016 +0000 * lisp/net/sieve-manage.el (sieve-manage-ignore-broken-tls): Add :version. diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index dbe8b22..e199a7f 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -148,6 +148,7 @@ for doing the actual authentication." (defcustom sieve-manage-ignore-broken-tls nil "Ignore STARTTLS even if STARTTLS capability is provided." + :version "25.2" :type 'boolean :group 'sieve-manage) commit 5f00d529dcef8ea8813315be1cc2ce62d00a5030 Author: TSUCHIYA Masatoshi Date: Mon Sep 12 23:08:02 2016 +0000 sieve.el: Make the buffer to edit unmodified initially (bug#24423) * lisp/net/sieve.el (sieve-edit-script): Make the buffer to edit be not modified-p initially (bug#24423). diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el index 2046e53..d126d84 100644 --- a/lisp/net/sieve.el +++ b/lisp/net/sieve.el @@ -207,7 +207,8 @@ require \"fileinto\"; err) (setq err (sieve-manage-getscript name newbuf sieve-manage-buffer)) (switch-to-buffer newbuf) - (unless (sieve-manage-ok-p err) + (if (sieve-manage-ok-p err) + (set-buffer-modified-p nil) (error "Sieve download failed: %s" err))) (switch-to-buffer (get-buffer-create "template.siv")) (insert sieve-template)) commit b26e3427820db1e37c885c7f1023c1dff5087798 Author: TSUCHIYA Masatoshi Date: Mon Sep 12 23:06:43 2016 +0000 sieve-manage.el: Allow user to avoid STARTTLS capability test (bug#24422) * lisp/net/sieve-manage.el (sieve-manage-ignore-broken-tls): New user option. (sieve-manage-open-server): Don't test STARTTLS capability if the option is set (bug#24422). diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 695bbd8..dbe8b22 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -146,6 +146,11 @@ for doing the actual authentication." :type 'symbol :group 'sieve-manage) +(defcustom sieve-manage-ignore-broken-tls nil + "Ignore STARTTLS even if STARTTLS capability is provided." + :type 'boolean + :group 'sieve-manage) + ;; Internal variables: (defconst sieve-manage-local-variables '(sieve-manage-server @@ -210,14 +215,16 @@ Return the buffer associated with the connection." :return-list t :starttls-function (lambda (capabilities) - (when (string-match "\\bSTARTTLS\\b" capabilities) - "STARTTLS\r\n"))) + (when (and (not sieve-manage-ignore-broken-tls) + (string-match "\\bSTARTTLS\\b" capabilities)) + "STARTTLS\r\n"))) (setq sieve-manage-process proc) (setq sieve-manage-capability (sieve-manage-parse-capability (plist-get props :capabilities))) ;; Ignore new capabilities issues after successful STARTTLS - (when (and (memq stream '(nil network starttls)) - (eq (plist-get props :type) 'tls)) + (when (or sieve-manage-ignore-broken-tls + (and (memq stream '(nil network starttls)) + (eq (plist-get props :type) 'tls))) (sieve-manage-drop-next-answer)) (current-buffer)))) commit ee98ca67f886698b6072095e55b820b1c31e1236 Author: Michal Nazarewicz Date: Mon Sep 12 21:36:28 2016 +0200 Fix compiler thinking width and height may be unitialised in frame.c This fixes the following warning: frame.c: In function ‘x_set_frame_parameters’: frame.c:3329:25: error: ‘width’ may be used uninitialized in this function [-Werror=maybe-uninitialized] adjust_frame_size (f, width_change ? width : -1, ^ * src/frame.c (x_set_frame_parameters): Drop width_changed and height_changed variables in favour of storing that information in width and height variables. diff --git a/src/frame.c b/src/frame.c index 6de55e4..166623c 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3136,8 +3136,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) /* If both of these parameters are present, it's more efficient to set them both at once. So we wait until we've looked at the entire list before we set them. */ - int width, height; - bool width_change = false, height_change = false; + int width = -1, height = -1; /* -1 denotes they were not changed. */ /* Same here. */ Lisp_Object left, top; @@ -3213,30 +3212,18 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) if (EQ (prop, Qwidth)) { if (RANGED_INTEGERP (0, val, INT_MAX)) - { - width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; - width_change = true; - } + width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels) && RANGED_INTEGERP (0, XCDR (val), INT_MAX)) - { - width = XFASTINT (XCDR (val)); - width_change = true; - } + width = XFASTINT (XCDR (val)); } else if (EQ (prop, Qheight)) { if (RANGED_INTEGERP (0, val, INT_MAX)) - { - height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); - height_change = true; - } + height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels) && RANGED_INTEGERP (0, XCDR (val), INT_MAX)) - { - height = XFASTINT (XCDR (val)); - height_change = true; - } + height = XFASTINT (XCDR (val)); } else if (EQ (prop, Qtop)) top = val; @@ -3318,16 +3305,15 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) XSETFRAME (frame, f); - if ((width_change && width != FRAME_TEXT_WIDTH (f)) - || (height_change && height != FRAME_TEXT_HEIGHT (f))) + if ((width != -1 && width != FRAME_TEXT_WIDTH (f)) + || (height != -1 && height != FRAME_TEXT_HEIGHT (f))) /* We could consider checking f->after_make_frame here, but I don't have the faintest idea why the following is needed at all. With the old setting it can get a Heisenbug when EmacsFrameResize intermittently provokes a delayed change_frame_size in the middle of adjust_frame_size. */ /** || (f->can_x_set_window_size && (f->new_height || f->new_width))) **/ - adjust_frame_size (f, width_change ? width : -1, - height_change ? height : -1, 1, 0, Qx_set_frame_parameters); + adjust_frame_size (f, width, height, 1, 0, Qx_set_frame_parameters); if ((!NILP (left) || !NILP (top)) && ! (left_no_change && top_no_change) commit ef474bd3d686cbf43a11056017ca8c92a304a25e Author: Michal Nazarewicz Date: Mon Sep 12 21:31:15 2016 +0200 Fix compiler thinking tmpdir may be unitialised in emacsclient This fixes the following warning: emacsclient.c: In function ‘set_local_socket’: /usr/include/x86_64-linux-gnu/bits/string3.h:111:3: error: ‘tmpdir’ may be used uninitialized in this function [-Werror=maybe-uninitialized] return __builtin___stpcpy_chk (__dest, __src, __bos (__dest)); ^ emacsclient.c:1197:17: note: ‘tmpdir’ was declared here const char *tmpdir; * lib-src/emacsclient.c (set_local_socket): Get rid of use_tmpdir variable and instead use tmpdir being non-NULL as sign that it should be used. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 1991aaa..458519d 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1191,10 +1191,9 @@ set_local_socket (const char *local_socket_name) { int sock_status; - int use_tmpdir = 0; int saved_errno; const char *server_name = local_socket_name; - const char *tmpdir; + const char *tmpdir = NULL; char *tmpdir_storage = NULL; char *socket_name_storage = NULL; @@ -1202,7 +1201,6 @@ set_local_socket (const char *local_socket_name) { /* socket_name is a file name component. */ long uid = geteuid (); - use_tmpdir = 1; tmpdir = egetenv ("TMPDIR"); if (!tmpdir) { @@ -1240,7 +1238,7 @@ set_local_socket (const char *local_socket_name) /* See if the socket exists, and if it's owned by us. */ sock_status = socket_status (server.sun_path); saved_errno = errno; - if (sock_status && use_tmpdir) + if (sock_status && tmpdir) { /* Failing that, see if LOGNAME or USER exist and differ from our euid. If so, look for a socket based on the UID commit 5d7433aba3893d9d5849b33b909dacc778ecd023 Author: Tino Calancha Date: Tue Sep 13 04:28:42 2016 +0900 image-dired: Signal an error before calling a missing executable Reverts commit ca473907 Add a defun to check if an executable exists, and call it on each function using an external program: when the executable is not available signal an error. See discussion on: https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00135.html * lisp/image-dired.el (image-dired--check-executable-exists): New defun. Throw and error when the executable arg is missing. (image-dired-display-image, image-dired-rotate-thumbnail) (image-dired-rotate-original, image-dired-set-exif-data) (image-dired-get-exif-data): Use it. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 5ac4600..a55dd40 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -224,7 +224,7 @@ expects to find pictures in this directory." :group 'image-dired) (defcustom image-dired-cmd-create-thumbnail-program - (executable-find "convert") + "convert" "Executable used to create thumbnail. Used together with `image-dired-cmd-create-thumbnail-options'." :type 'string @@ -242,7 +242,7 @@ which is replaced by the file name of the thumbnail file." :group 'image-dired) (defcustom image-dired-cmd-create-temp-image-program - (executable-find "convert") + "convert" "Executable used to create temporary image. Used together with `image-dired-cmd-create-temp-image-options'." :type 'string @@ -308,7 +308,7 @@ with the information required by the Thumbnail Managing Standard." :group 'image-dired) (defcustom image-dired-cmd-rotate-thumbnail-program - (executable-find "mogrify") + "mogrify" "Executable used to rotate thumbnail. Used together with `image-dired-cmd-rotate-thumbnail-options'." :type 'string @@ -326,20 +326,14 @@ of the thumbnail file." :group 'image-dired) (defcustom image-dired-cmd-rotate-original-program - (cond ((executable-find "jpegtran")) - ((executable-find "convert"))) + "jpegtran" "Executable used to rotate original image. Used together with `image-dired-cmd-rotate-original-options'." :type 'string :group 'image-dired) (defcustom image-dired-cmd-rotate-original-options - (when image-dired-cmd-rotate-original-program - (pcase image-dired-cmd-rotate-original-program - ((pred (lambda (x) (string-match-p "jpegtran" x))) - "%p -rotate %d -copy all -outfile %t \"%o\"") - ((pred (lambda (x) (string-match-p "convert" x))) - "%p -rotate %d \"%o\" %t"))) + "%p -rotate %d -copy all -outfile %t \"%o\"" "Format of command used to rotate original image. Available options are %p which is replaced by `image-dired-cmd-rotate-original-program', %d which is replaced by the @@ -364,7 +358,7 @@ original file with `image-dired-temp-rotate-image-file'." :group 'image-dired) (defcustom image-dired-cmd-write-exif-data-program - (executable-find "exiftool") + "exiftool" "Program used to write EXIF data to image. Used together with `image-dired-cmd-write-exif-data-options'." :type 'string @@ -381,7 +375,7 @@ which is replaced by the tag value." :group 'image-dired) (defcustom image-dired-cmd-read-exif-data-program - (executable-find "exiftool") + "exiftool" "Program used to read EXIF data to image. Used together with `image-dired-cmd-read-exif-data-program-options'." :type 'string @@ -619,10 +613,14 @@ according to the Thumbnail Managing Standard." (file-name-base f) (file-name-extension f)))))) +(defun image-dired--check-executable-exists (executable) + (unless (executable-find (symbol-value executable)) + (error "Executable %S not found" executable))) + (defun image-dired-create-thumb (original-file thumbnail-file) "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." - (unless image-dired-cmd-create-thumbnail-program - (error "image-dired-cmd-create-thumbnail-program is nil")) + (image-dired--check-executable-exists + 'image-dired-cmd-create-thumbnail-program) (let* ((width (int-to-string image-dired-thumb-width)) (height (int-to-string image-dired-thumb-height)) (modif-time (format "%.0f" (float-time (nth 5 (file-attributes @@ -1812,6 +1810,8 @@ should feel snappy enough. If optional argument ORIGINAL-SIZE is non-nil, display image in its original size." + (image-dired--check-executable-exists + 'image-dired-cmd-create-temp-image-program) (let ((new-file (expand-file-name image-dired-temp-image-file)) width height command ret (image-type 'jpeg)) @@ -1820,8 +1820,6 @@ original size." (progn (setq width (image-dired-display-window-width)) (setq height (image-dired-display-window-height)) - (unless image-dired-cmd-create-temp-image-program - (error "image-dired-cmd-create-temp-image-program is nil")) (setq command (format-spec image-dired-cmd-create-temp-image-options @@ -1878,8 +1876,8 @@ With prefix argument ARG, display image in its original size." (defun image-dired-rotate-thumbnail (degrees) "Rotate thumbnail DEGREES degrees." - (unless image-dired-cmd-rotate-thumbnail-program - (error "image-dired-cmd-rotate-thumbnail-program is nil")) + (image-dired--check-executable-exists + 'image-dired-cmd-rotate-thumbnail-program) (if (not (image-dired-image-at-point-p)) (message "No thumbnail at point") (let ((file (image-dired-thumb-name (image-dired-original-file-name))) @@ -1922,33 +1920,33 @@ overwritten. This confirmation can be turned off using (defun image-dired-rotate-original (degrees) "Rotate original image DEGREES degrees." - (unless (image-dired-image-at-point-p) - (message "No image at point")) - (unless image-dired-cmd-rotate-original-program - (error "image-dired-cmd-rotate-original-program is nil")) - (let ((file (image-dired-original-file-name)) - command) - (unless (eq 'jpeg (image-type file)) - (error "Only JPEG images can be rotated!")) - (setq command (format-spec - image-dired-cmd-rotate-original-options - (list - (cons ?p image-dired-cmd-rotate-original-program) - (cons ?d degrees) - (cons ?o (expand-file-name file)) - (cons ?t image-dired-temp-rotate-image-file)))) - (if (not (= 0 (call-process shell-file-name nil nil nil - shell-command-switch command))) - (error "Could not rotate image") - (image-dired-display-image image-dired-temp-rotate-image-file) - (if (or (and image-dired-rotate-original-ask-before-overwrite - (y-or-n-p - "Rotate to temp file OK. Overwrite original image? ")) - (not image-dired-rotate-original-ask-before-overwrite)) - (progn - (copy-file image-dired-temp-rotate-image-file file t) - (image-dired-refresh-thumb)) - (image-dired-display-image file))))) + (image-dired--check-executable-exists + 'image-dired-cmd-rotate-original-program) + (if (not (image-dired-image-at-point-p)) + (message "No image at point") + (let ((file (image-dired-original-file-name)) + command) + (unless (eq 'jpeg (image-type file)) + (error "Only JPEG images can be rotated!")) + (setq command (format-spec + image-dired-cmd-rotate-original-options + (list + (cons ?p image-dired-cmd-rotate-original-program) + (cons ?d degrees) + (cons ?o (expand-file-name file)) + (cons ?t image-dired-temp-rotate-image-file)))) + (if (not (= 0 (call-process shell-file-name nil nil nil + shell-command-switch command))) + (error "Could not rotate image") + (image-dired-display-image image-dired-temp-rotate-image-file) + (if (or (and image-dired-rotate-original-ask-before-overwrite + (y-or-n-p + "Rotate to temp file OK. Overwrite original image? ")) + (not image-dired-rotate-original-ask-before-overwrite)) + (progn + (copy-file image-dired-temp-rotate-image-file file t) + (image-dired-refresh-thumb)) + (image-dired-display-image file)))))) (defun image-dired-rotate-original-left () "Rotate original image left (counter clockwise) 90 degrees." @@ -1995,15 +1993,15 @@ default value at the prompt." (old-value (image-dired-get-exif-data file "ImageDescription"))) (if (eq 0 (image-dired-set-exif-data file "ImageDescription" - (read-string "Value of ImageDescription: " - old-value))) + (read-string "Value of ImageDescription: " + old-value))) (message "Successfully wrote ImageDescription tag.") (error "Could not write ImageDescription tag"))))) (defun image-dired-set-exif-data (file tag-name tag-value) "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE." - (unless image-dired-cmd-write-exif-data-program - (error "image-dired-cmd-write-exif-data-program is nil")) + (image-dired--check-executable-exists + 'image-dired-cmd-write-exif-data-program) (let (command) (setq command (format-spec image-dired-cmd-write-exif-data-options @@ -2016,8 +2014,8 @@ default value at the prompt." (defun image-dired-get-exif-data (file tag-name) "From FILE, return EXIF tag TAG-NAME." - (unless image-dired-cmd-read-exif-data-program - (error "image-dired-cmd-read-exif-data-program is nil")) + (image-dired--check-executable-exists + 'image-dired-cmd-read-exif-data-program) (let ((buf (get-buffer-create "*image-dired-get-exif-data*")) command tag-value) (setq command (format-spec commit 2675c79db5745d55d43b78019b1e6a4f84b168fa Author: Eli Zaretskii Date: Mon Sep 12 21:25:09 2016 +0300 Fix daemon shutdown when emacs-kill-hooks ask questions * lisp/server.el (server-start): Put the server's kill-emacs-hook last, to allow other hooks to have a frame to interact with the user. (Bug#24326) diff --git a/lisp/server.el b/lisp/server.el index 5300984..85d51c8 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -648,7 +648,12 @@ server or call `\\[server-force-delete]' to forcibly disconnect it.")) (add-hook 'delete-frame-functions 'server-handle-delete-frame) (add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) - (add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit. + ;; We put server's kill-emacs-hook after the others, so that + ;; frames are not deleted too early, because doing that + ;; would severely degrade our abilities to communicate with + ;; the user, while some hooks may wish to ask the user + ;; questions (e.g., desktop-kill). + (add-hook 'kill-emacs-hook 'server-force-stop t) ;Cleanup upon exit. (setq server-process (apply #'make-network-process :name server-name commit 6d6d9cd607601f41501b8f64230150ae26b8d500 Author: Paul Eggert Date: Mon Sep 12 08:18:15 2016 -0700 * src/casefiddle.c (casify_word): Simplify. diff --git a/src/casefiddle.c b/src/casefiddle.c index 59b5bbc..2d32f49 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -378,24 +378,12 @@ character positions to operate on. */) static Lisp_Object casify_word (enum case_action flag, Lisp_Object arg) { - Lisp_Object beg, end; - ptrdiff_t newpoint; - EMACS_INT iarg; - CHECK_NUMBER (arg); - iarg = XINT (arg); - - newpoint = scan_words (PT, iarg); - if (!newpoint) - newpoint = iarg > 0 ? ZV : BEGV; - - XSETFASTINT (beg, PT); - XSETFASTINT (end, newpoint); - if (PT > newpoint) - newpoint = PT; - - casify_region (flag, beg, end); - + ptrdiff_t farend = scan_words (PT, XINT (arg)); + if (!farend) + farend = XINT (arg) <= 0 ? BEGV : ZV; + ptrdiff_t newpoint = max (PT, farend); + casify_region (flag, make_number (PT), make_number (farend)); SET_PT (newpoint); return Qnil; } commit 6fdecd4a4988986c82203388d21e6d62908490d7 Author: Paul Eggert Date: Mon Sep 12 08:06:52 2016 -0700 * src/casefiddle.c (casify_word): Return Qnil. diff --git a/src/casefiddle.c b/src/casefiddle.c index 6c64d67..59b5bbc 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -397,6 +397,7 @@ casify_word (enum case_action flag, Lisp_Object arg) casify_region (flag, beg, end); SET_PT (newpoint); + return Qnil; } DEFUN ("upcase-word", Fupcase_word, Supcase_word, 1, 1, "p", @@ -409,8 +410,7 @@ With negative argument, convert previous words but do not move. See also `capitalize-word'. */) (Lisp_Object arg) { - casify_word (CASE_UP, arg); - return Qnil; + return casify_word (CASE_UP, arg); } DEFUN ("downcase-word", Fdowncase_word, Sdowncase_word, 1, 1, "p", @@ -422,8 +422,7 @@ is ignored when moving forward. With negative argument, convert previous words but do not move. */) (Lisp_Object arg) { - casify_word (CASE_DOWN, arg); - return Qnil; + return casify_word (CASE_DOWN, arg); } DEFUN ("capitalize-word", Fcapitalize_word, Scapitalize_word, 1, 1, "p", @@ -438,8 +437,7 @@ is ignored when moving forward. With negative argument, capitalize previous words but do not move. */) (Lisp_Object arg) { - casify_word (CASE_CAPITALIZE, arg); - return Qnil; + return casify_word (CASE_CAPITALIZE, arg); } void commit 728e40088d054516c1cb5f5412cdab73ed84861d Author: Michal Nazarewicz Date: Wed Sep 7 15:21:26 2016 +0200 Refactor common code in {upcase,downcase,capitalize}-word functions * src/casefiddle.c (operate_on_word): Removed in favour of… (casify_word) …new function which does what operate_on_word did plus what all of the common code from *-word functions. (upcase-word, downcase-word, capitalize-word): Move code common between those functions (pretty much the whole body of those functions) into casify_word and use that instead of now deleted operate_on_word. diff --git a/src/casefiddle.c b/src/casefiddle.c index 6114a6f..6c64d67 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -376,22 +376,27 @@ character positions to operate on. */) } static Lisp_Object -operate_on_word (Lisp_Object arg, ptrdiff_t *newpoint) +casify_word (enum case_action flag, Lisp_Object arg) { - Lisp_Object val; - ptrdiff_t farend; + Lisp_Object beg, end; + ptrdiff_t newpoint; EMACS_INT iarg; CHECK_NUMBER (arg); iarg = XINT (arg); - farend = scan_words (PT, iarg); - if (!farend) - farend = iarg > 0 ? ZV : BEGV; - *newpoint = PT > farend ? PT : farend; - XSETFASTINT (val, farend); + newpoint = scan_words (PT, iarg); + if (!newpoint) + newpoint = iarg > 0 ? ZV : BEGV; + + XSETFASTINT (beg, PT); + XSETFASTINT (end, newpoint); + if (PT > newpoint) + newpoint = PT; + + casify_region (flag, beg, end); - return val; + SET_PT (newpoint); } DEFUN ("upcase-word", Fupcase_word, Supcase_word, 1, 1, "p", @@ -404,12 +409,7 @@ With negative argument, convert previous words but do not move. See also `capitalize-word'. */) (Lisp_Object arg) { - Lisp_Object beg, end; - ptrdiff_t newpoint; - XSETFASTINT (beg, PT); - end = operate_on_word (arg, &newpoint); - casify_region (CASE_UP, beg, end); - SET_PT (newpoint); + casify_word (CASE_UP, arg); return Qnil; } @@ -422,12 +422,7 @@ is ignored when moving forward. With negative argument, convert previous words but do not move. */) (Lisp_Object arg) { - Lisp_Object beg, end; - ptrdiff_t newpoint; - XSETFASTINT (beg, PT); - end = operate_on_word (arg, &newpoint); - casify_region (CASE_DOWN, beg, end); - SET_PT (newpoint); + casify_word (CASE_DOWN, arg); return Qnil; } @@ -443,12 +438,7 @@ is ignored when moving forward. With negative argument, capitalize previous words but do not move. */) (Lisp_Object arg) { - Lisp_Object beg, end; - ptrdiff_t newpoint; - XSETFASTINT (beg, PT); - end = operate_on_word (arg, &newpoint); - casify_region (CASE_CAPITALIZE, beg, end); - SET_PT (newpoint); + casify_word (CASE_CAPITALIZE, arg); return Qnil; }