Now on revision 112166. ------------------------------------------------------------ revno: 112166 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2013-03-28 08:40:01 +0200 message: Add DEF_IMGLIB_FN for g_error_free to image.c. src/image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN. Reported by . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-28 02:41:05 +0000 +++ src/ChangeLog 2013-03-28 06:40:01 +0000 @@ -1,3 +1,8 @@ +2013-03-28 Eli Zaretskii + + * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN. + Reported by . + 2013-03-28 Dmitry Antipov * xdisp.c (with_echo_area_buffer_unwind_data): Save window === modified file 'src/image.c' --- src/image.c 2013-03-27 13:26:34 +0000 +++ src/image.c 2013-03-28 06:40:01 +0000 @@ -8138,6 +8138,7 @@ DEF_IMGLIB_FN (void, g_type_init, (void)); DEF_IMGLIB_FN (void, g_object_unref, (gpointer)); +DEF_IMGLIB_FN (void, g_error_free, (GError *)); Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; ------------------------------------------------------------ revno: 112165 fixes bug: http://debbugs.gnu.org/14066 committer: Leo Liu branch nick: trunk timestamp: Thu 2013-03-28 11:26:37 +0800 message: * vc/vc-bzr.el (vc-bzr-revert): Don't backup. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-27 16:03:15 +0000 +++ lisp/ChangeLog 2013-03-28 03:26:37 +0000 @@ -1,3 +1,7 @@ +2013-03-28 Leo Liu + + * vc/vc-bzr.el (vc-bzr-revert): Don't backup. (Bug#14066) + 2013-03-27 Eli Zaretskii * facemenu.el (list-colors-callback): New defvar. === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2013-02-01 17:19:24 +0000 +++ lisp/vc/vc-bzr.el 2013-03-28 03:26:37 +0000 @@ -653,7 +653,7 @@ (defun vc-bzr-revert (file &optional contents-done) (unless contents-done - (with-temp-buffer (vc-bzr-command "revert" t 0 file)))) + (with-temp-buffer (vc-bzr-command "revert" t 0 file "--no-backup")))) (defvar log-view-message-re) (defvar log-view-file-re) ------------------------------------------------------------ revno: 112164 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-03-28 06:41:05 +0400 message: * xdisp.c (with_echo_area_buffer_unwind_data): Save window start marker... (unwind_with_echo_area_buffer): ...to restore it here. This is needed to ensure that... (redisplay_window): ...both window markers are valid here, which is verified by eassert. * editfns.c (save_excursion_save): Do not assume that selected_window always displays the buffer. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-27 14:33:03 +0000 +++ src/ChangeLog 2013-03-28 02:41:05 +0000 @@ -1,3 +1,14 @@ +2013-03-28 Dmitry Antipov + + * xdisp.c (with_echo_area_buffer_unwind_data): Save window + start marker... + (unwind_with_echo_area_buffer): ...to restore it here. This + is needed to ensure that... + (redisplay_window): ...both window markers are valid here, + which is verified by eassert. + * editfns.c (save_excursion_save): Do not assume that + selected_window always displays the buffer. + 2013-03-27 Stefan Monnier * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for === modified file 'src/editfns.c' --- src/editfns.c 2013-03-24 12:59:45 +0000 +++ src/editfns.c 2013-03-28 02:41:05 +0000 @@ -846,7 +846,7 @@ ? Fcopy_marker (BVAR (current_buffer, mark), Qnil) : Qnil), /* Selected window if current buffer is shown in it, nil otherwise. */ - ((XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer) + (EQ (XWINDOW (selected_window)->buffer, Fcurrent_buffer ()) ? selected_window : Qnil), BVAR (current_buffer, mark_active)); } === modified file 'src/xdisp.c' --- src/xdisp.c 2013-03-24 12:59:45 +0000 +++ src/xdisp.c 2013-03-28 02:41:05 +0000 @@ -9994,7 +9994,7 @@ Vwith_echo_area_save_vector = Qnil; if (NILP (vector)) - vector = Fmake_vector (make_number (7), Qnil); + vector = Fmake_vector (make_number (9), Qnil); XSETBUFFER (tmp, current_buffer); ASET (vector, i, tmp); ++i; ASET (vector, i, Vdeactivate_mark); ++i; @@ -10006,10 +10006,12 @@ ASET (vector, i, w->buffer); ++i; ASET (vector, i, make_number (marker_position (w->pointm))); ++i; ASET (vector, i, make_number (marker_byte_position (w->pointm))); ++i; + ASET (vector, i, make_number (marker_position (w->start))); ++i; + ASET (vector, i, make_number (marker_byte_position (w->start))); ++i; } else { - int end = i + 4; + int end = i + 6; for (; i < end; ++i) ASET (vector, i, Qnil); } @@ -10032,16 +10034,18 @@ if (WINDOWP (AREF (vector, 3))) { struct window *w; - Lisp_Object buffer, charpos, bytepos; + Lisp_Object buffer; w = XWINDOW (AREF (vector, 3)); buffer = AREF (vector, 4); - charpos = AREF (vector, 5); - bytepos = AREF (vector, 6); wset_buffer (w, buffer); set_marker_both (w->pointm, buffer, - XFASTINT (charpos), XFASTINT (bytepos)); + XFASTINT (AREF (vector, 5)), + XFASTINT (AREF (vector, 6))); + set_marker_both (w->start, buffer, + XFASTINT (AREF (vector, 7)), + XFASTINT (AREF (vector, 8))); } Vwith_echo_area_save_vector = vector; @@ -15231,12 +15235,14 @@ SET_TEXT_POS (lpoint, PT, PT_BYTE); opoint = lpoint; - /* W must be a leaf window here. */ - eassert (!NILP (w->buffer)); #ifdef GLYPH_DEBUG *w->desired_matrix->method = 0; #endif + /* Make sure that both W's markers are valid. */ + eassert (XMARKER (w->start)->buffer == buffer); + eassert (XMARKER (w->pointm)->buffer == buffer); + restart: reconsider_clip_changes (w, buffer); ------------------------------------------------------------ revno: 112163 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2013-03-28 01:36:23 +0000 message: lisp/gnus/nndraft.el (nndraft-request-expire-articles): Make expiry target always `delete' diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-03-27 22:12:36 +0000 +++ lisp/gnus/ChangeLog 2013-03-28 01:36:23 +0000 @@ -1,3 +1,8 @@ +2013-03-28 Katsumi Yamaoka + + * nndraft.el (nndraft-request-expire-articles): + Make expiry target always `delete'. + 2013-03-27 Andrew Cohen * gnus-msg.el (gnus-setup-message): When replying from an nnir summary === modified file 'lisp/gnus/nndraft.el' --- lisp/gnus/nndraft.el 2013-03-06 03:55:49 +0000 +++ lisp/gnus/nndraft.el 2013-03-28 01:36:23 +0000 @@ -255,11 +255,16 @@ (deffoo nndraft-request-expire-articles (articles group &optional server force) (nndraft-possibly-change-group group) (let* ((nnmh-allow-delete-final t) - (nnmail-expiry-target - (or (gnus-group-find-parameter - (gnus-group-prefixed-name group (list 'nndraft server)) - 'expiry-target t) - nnmail-expiry-target)) + (nnmail-expiry-target 'delete) + ;; FIXME: If we want to move a draft message to an expiry group, + ;; there are things to have to improve: + ;; - Remove a header separator. + ;; - Encode it, including attachments, into a MIME message. + ;;(nnmail-expiry-target + ;; (or (gnus-group-find-parameter + ;; (gnus-group-prefixed-name group (list 'nndraft server)) + ;; 'expiry-target t) + ;; nnmail-expiry-target)) (res (nnoo-parent-function 'nndraft 'nnmh-request-expire-articles (list articles group server force))) ------------------------------------------------------------ revno: 112162 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2013-03-27 22:12:36 +0000 message: gnus-msg.el (gnus-setup-message): Set the posting-style and gcc properly for nnir summary buffers diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-03-27 01:17:08 +0000 +++ lisp/gnus/ChangeLog 2013-03-27 22:12:36 +0000 @@ -1,5 +1,9 @@ 2013-03-27 Andrew Cohen + * gnus-msg.el (gnus-setup-message): When replying from an nnir summary + buffer use the posting-style and gcc of the original article group. + (gnus-inews-insert-gcc): Don't set gcc-self for virtual groups. + * nnir.el: Fix byte-compile warning. nnoo-define-skeleton should come after other deffoos. === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-msg.el 2013-03-27 22:12:36 +0000 @@ -426,15 +426,24 @@ `(let ((,winconf (current-window-configuration)) (,winconf-name gnus-current-window-configuration) (,buffer (buffer-name (current-buffer))) - (,article gnus-article-reply) + (,article (or (when (and + (string-match "^nnir:" gnus-newsgroup-name) + gnus-article-reply) + (nnir-article-number gnus-article-reply)) + gnus-article-reply)) (,yanked gnus-article-yanked-articles) - (,group gnus-newsgroup-name) + (,group (or (when (and + (string-match "^nnir:" gnus-newsgroup-name) + gnus-article-reply) + (nnir-article-group gnus-article-reply)) + gnus-newsgroup-name)) (message-header-setup-hook (copy-sequence message-header-setup-hook)) (mbl mml-buffer-list) (message-mode-hook (copy-sequence message-mode-hook))) (setq mml-buffer-list nil) - (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc) + (add-hook 'message-header-setup-hook (lambda () + (gnus-inews-insert-gcc ,group))) ;; message-newsreader and message-mailer were formerly set in ;; gnus-inews-add-send-actions, but this is too late when ;; message-generate-headers-first is used. --ansel @@ -1706,7 +1715,8 @@ (group (when group (gnus-group-decoded-name group))) (var (or gnus-outgoing-message-group gnus-message-archive-group)) (gcc-self-val - (and group (gnus-group-find-parameter group 'gcc-self))) + (and group (gnus-group-find-parameter group 'gcc-self) + (not (gnus-virtual-group-p group)))) result (groups (cond ------------------------------------------------------------ revno: 112161 fixes bug: http://debbugs.gnu.org/14063 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 18:03:15 +0200 message: Fix bug #14063 with reverting the *Colors* buffer. lisp/facemenu.el (list-colors-callback): New defvar. (list-colors-redisplay): New function. (list-colors-display): Install list-colors-redisplay as the revert-buffer-function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-27 14:41:06 +0000 +++ lisp/ChangeLog 2013-03-27 16:03:15 +0000 @@ -1,3 +1,10 @@ +2013-03-27 Eli Zaretskii + + * facemenu.el (list-colors-callback): New defvar. + (list-colors-redisplay): New function. + (list-colors-display): Install list-colors-redisplay as the + revert-buffer-function. (Bug#14063) + 2013-03-27 Stefan Monnier * minibuffer.el (completion-pcm--merge-completions): Make sure prefixes === modified file 'lisp/facemenu.el' --- lisp/facemenu.el 2013-01-01 09:11:05 +0000 +++ lisp/facemenu.el 2013-03-27 16:03:15 +0000 @@ -513,12 +513,23 @@ (* (nth 1 c-rgb) 0.7151522) (* (nth 2 c-rgb) 0.0721750)))))) +(defvar list-colors-callback nil + "Value of CALLBACK arg passed to `list-colors-display'; internal use.") + +(defun list-colors-redisplay (_ignore-auto _noconfirm) + "Redisplay the colors using `list-colors-sort'. + +This is installed as a `revert-buffer-function' in the *Colors* buffer." + (list-colors-display nil (buffer-name) list-colors-callback)) + (defun list-colors-display (&optional list buffer-name callback) "Display names of defined colors, and show what they look like. If the optional argument LIST is non-nil, it should be a list of colors to display. Otherwise, this command computes a list of colors that the current display can handle. Customize `list-colors-sort' to change the order in which colors are shown. +Type `g' or \\[revert-buffer] after customizing `list-colors-sort' +to redisplay colors in the new order. If the optional argument BUFFER-NAME is nil, it defaults to *Colors*. @@ -566,7 +577,9 @@ (erase-buffer) (list-colors-print list callback) (set-buffer-modified-p nil) - (setq truncate-lines t))) + (setq truncate-lines t) + (setq-local list-colors-callback callback) + (setq revert-buffer-function 'list-colors-redisplay))) (when callback (pop-to-buffer buffer-name) (message "Click on a color to select it."))) ------------------------------------------------------------ revno: 112160 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14061 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-03-27 10:41:06 -0400 message: * lisp/minibuffer.el (completion-pcm--merge-completions): Make sure prefixes and suffixes don't overlap. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-27 14:33:03 +0000 +++ lisp/ChangeLog 2013-03-27 14:41:06 +0000 @@ -1,12 +1,12 @@ 2013-03-27 Stefan Monnier + * minibuffer.el (completion-pcm--merge-completions): Make sure prefixes + and suffixes don't overlap (bug#14061). + * case-table.el: Use lexical-binding. (case-table-get-table): New function. (get-upcase-table): Use it. Mark as obsolete. Adjust callers. - * minibuffer.el (completion-pcm--merge-completions): Make sure prefixes - and suffixes don't overlap - 2013-03-27 Teodor Zlatanov * progmodes/subword.el: Add `superword-mode' to do word motion === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2013-03-05 07:38:16 +0000 +++ lisp/minibuffer.el 2013-03-27 14:41:06 +0000 @@ -2997,12 +2997,21 @@ ;; here any more. (unless unique (push elem res) - (when (memq elem '(star point prefix)) - ;; Extract common suffix additionally to common prefix. - ;; Only do it for `point', `star', and `prefix' since for - ;; `any' it could lead to a merged completion that - ;; doesn't itself match the candidates. - (let ((suffix (completion--common-suffix comps))) + ;; Extract common suffix additionally to common prefix. + ;; Don't do it for `any' since it could lead to a merged + ;; completion that doesn't itself match the candidates. + (when (and (memq elem '(star point prefix)) + ;; If prefix is one of the completions, there's no + ;; suffix left to find. + (not (assoc-string prefix comps t))) + (let ((suffix + (completion--common-suffix + (if (zerop (length prefix)) comps + ;; Ignore the chars in the common prefix, so we + ;; don't merge '("abc" "abbc") as "ab*bc". + (let ((skip (length prefix))) + (mapcar (lambda (str) (substring str skip)) + comps)))))) (cl-assert (stringp suffix)) (unless (equal suffix "") (push suffix res))))) ------------------------------------------------------------ revno: 112159 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-03-27 10:33:03 -0400 message: * lisp/case-table.el (case-table-get-table): New function. * lisp/case-table.el: Use lexical-binding. (case-table-get-table): New function. (get-upcase-table): Use it. Mark as obsolete. Adjust callers. * src/casetab.c (init_casetab_once): Don't abuse the ascii eqv table for the upcase table. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-03-27 14:04:34 +0000 +++ etc/NEWS 2013-03-27 14:33:03 +0000 @@ -302,6 +302,8 @@ ** `dont-compile' is declared obsolete. +** `get-upcase-table' is obsoleted by the new `case-table-get-table'. + ** Support for filesystem notifications. Emacs now supports notifications of filesystem changes, such as creation, modification, and deletion of files. This requires the === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-27 14:04:34 +0000 +++ lisp/ChangeLog 2013-03-27 14:33:03 +0000 @@ -1,3 +1,12 @@ +2013-03-27 Stefan Monnier + + * case-table.el: Use lexical-binding. + (case-table-get-table): New function. + (get-upcase-table): Use it. Mark as obsolete. Adjust callers. + + * minibuffer.el (completion-pcm--merge-completions): Make sure prefixes + and suffixes don't overlap + 2013-03-27 Teodor Zlatanov * progmodes/subword.el: Add `superword-mode' to do word motion === modified file 'lisp/case-table.el' --- lisp/case-table.el 2013-01-01 09:11:05 +0000 +++ lisp/case-table.el 2013-03-27 14:33:03 +0000 @@ -1,4 +1,4 @@ -;;; case-table.el --- code to extend the character set and support case tables +;;; case-table.el --- code to extend the character set and support case tables -*- lexical-binding: t -*- ;; Copyright (C) 1988, 1994, 2001-2013 Free Software Foundation, Inc. @@ -65,18 +65,26 @@ (describe-vector description) (help-mode))))) +(defun case-table-get-table (case-table table) + "Return the TABLE of CASE-TABLE. +TABLE can be `down', `up', `eqv' or `canon'." + (let ((slot-nb (cdr (assq table '((up . 0) (canon . 1) (eqv . 2)))))) + (or (if (eq table 'down) case-table) + (char-table-extra-slot case-table slot-nb) + ;; Setup all extra slots of CASE-TABLE by temporarily selecting + ;; it as the standard case table. + (let ((old (standard-case-table))) + (unwind-protect + (progn + (set-standard-case-table case-table) + (char-table-extra-slot case-table slot-nb)) + (or (eq case-table old) + (set-standard-case-table old))))))) + (defun get-upcase-table (case-table) "Return the upcase table of CASE-TABLE." - (or (char-table-extra-slot case-table 0) - ;; Setup all extra slots of CASE-TABLE by temporarily selecting - ;; it as the standard case table. - (let ((old (standard-case-table))) - (unwind-protect - (progn - (set-standard-case-table case-table) - (char-table-extra-slot case-table 0)) - (or (eq case-table old) - (set-standard-case-table old)))))) + (case-table-get-table case-table 'up)) +(make-obsolete 'get-upcase-table 'case-table-get-table "24.4") (defun copy-case-table (case-table) (let ((copy (copy-sequence case-table)) @@ -97,7 +105,7 @@ indicate left and right delimiters." (aset table l l) (aset table r r) - (let ((up (get-upcase-table table))) + (let ((up (case-table-get-table table 'up))) (aset up l l) (aset up r r)) ;; Clear out the extra slots so that they will be @@ -117,7 +125,7 @@ word constituents." (aset table uc lc) (aset table lc lc) - (let ((up (get-upcase-table table))) + (let ((up (case-table-get-table table 'up))) (aset up uc uc) (aset up lc uc)) ;; Clear out the extra slots so that they will be @@ -132,7 +140,7 @@ It also modifies `standard-syntax-table' to give them the syntax of word constituents." (aset table lc lc) - (let ((up (get-upcase-table table))) + (let ((up (case-table-get-table table 'up))) (aset up uc uc) (aset up lc uc)) ;; Clear out the extra slots so that they will be @@ -148,7 +156,7 @@ word constituents." (aset table uc lc) (aset table lc lc) - (let ((up (get-upcase-table table))) + (let ((up (case-table-get-table table 'up))) (aset up uc uc)) ;; Clear out the extra slots so that they will be ;; recomputed from the main (downcase) table and upcase table. @@ -164,7 +172,7 @@ It also modifies `standard-syntax-table'. SYNTAX should be \" \", \"w\", \".\" or \"_\"." (aset table c c) - (let ((up (get-upcase-table table))) + (let ((up (case-table-get-table table 'up))) (aset up c c)) ;; Clear out the extra slots so that they will be ;; recomputed from the main (downcase) table and upcase table. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-27 13:26:34 +0000 +++ src/ChangeLog 2013-03-27 14:33:03 +0000 @@ -1,3 +1,8 @@ +2013-03-27 Stefan Monnier + + * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for + the upcase table. + 2013-03-27 rzl24ozi (tiny changes) * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function. === modified file 'src/casetab.c' --- src/casetab.c 2013-01-01 09:11:05 +0000 +++ src/casetab.c 2013-03-27 14:33:03 +0000 @@ -246,7 +246,7 @@ init_casetab_once (void) { register int i; - Lisp_Object down, up; + Lisp_Object down, up, eqv; DEFSYM (Qcase_table, "case-table"); /* Intern this now in case it isn't already done. @@ -275,13 +275,21 @@ for (i = 0; i < 128; i++) { + int c = (i >= 'a' && i <= 'z') ? i + ('A' - 'a') : i; + CHAR_TABLE_SET (up, i, make_number (c)); + } + + eqv = Fmake_char_table (Qcase_table, Qnil); + + for (i = 0; i < 128; i++) + { int c = ((i >= 'A' && i <= 'Z') ? i + ('a' - 'A') : ((i >= 'a' && i <= 'z') ? i + ('A' - 'a') : i)); CHAR_TABLE_SET (up, i, make_number (c)); } - set_char_table_extras (down, 2, Fcopy_sequence (up)); + set_char_table_extras (down, 2, eqv); /* Fill in what isn't filled in. */ set_case_table (down, 1); ------------------------------------------------------------ revno: 112158 committer: Ted Zlatanov branch nick: quickfixes timestamp: Wed 2013-03-27 10:04:34 -0400 message: Add `superword-mode' diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-03-23 00:38:11 +0000 +++ etc/NEWS 2013-03-27 14:04:34 +0000 @@ -254,6 +254,11 @@ * New Modes and Packages in Emacs 24.4 +** New `superword-mode' in subword.el +`superword-mode' overrides the default word motion commands to treat +symbol_words as a single word, similar to what `subword-mode' does and +using the same internal functions. + ** New nadvice.el package offering lighter-weight advice facilities. It is layered as: - add-function/remove-function which can be used to add/remove code on any === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-26 03:38:18 +0000 +++ lisp/ChangeLog 2013-03-27 14:04:34 +0000 @@ -1,3 +1,9 @@ +2013-03-27 Teodor Zlatanov + + * progmodes/subword.el: Add `superword-mode' to do word motion + over symbol_words (parallels and leverages `subword-mode' which + does word motion inside MixedCaseWords). + 2013-03-26 Stefan Monnier * desktop.el (desktop--v2s): Rename from desktop-internal-v2s. === modified file 'lisp/progmodes/subword.el' --- lisp/progmodes/subword.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/subword.el 2013-03-27 14:04:34 +0000 @@ -26,7 +26,8 @@ ;; This package provides `subword' oriented commands and a minor mode ;; (`subword-mode') that substitutes the common word handling -;; functions with them. +;; functions with them. It also provides the `superword-mode' minor +;; mode that treats symbols as words, the opposite of `subword-mode'. ;; In spite of GNU Coding Standards, it is popular to name a symbol by ;; mixing uppercase and lowercase letters, e.g. "GtkWidget", @@ -43,12 +44,13 @@ ;; The subword oriented commands defined in this package recognize ;; subwords in a nomenclature to move between them and to edit them as -;; words. +;; words. You also get a mode to treat symbols as words instead, +;; called `superword-mode' (the opposite of `subword-mode'). ;; In the minor mode, all common key bindings for word oriented ;; commands are overridden by the subword oriented commands: -;; Key Word oriented command Subword oriented command +;; Key Word oriented command Subword oriented command (also superword) ;; ============================================================ ;; M-f `forward-word' `subword-forward' ;; M-b `backward-word' `subword-backward' @@ -67,8 +69,13 @@ ;; To make the mode turn on automatically, put the following code in ;; your .emacs: ;; -;; (add-hook 'c-mode-common-hook -;; (lambda () (subword-mode 1))) +;; (add-hook 'c-mode-common-hook 'subword-mode) +;; + +;; To make the mode turn `superword-mode' on automatically for +;; only some modes, put the following code in your .emacs: +;; +;; (add-hook 'c-mode-common-hook 'superword-mode) ;; ;; Acknowledgment: @@ -98,7 +105,8 @@ (let ((map (make-sparse-keymap))) (dolist (cmd '(forward-word backward-word mark-word kill-word backward-kill-word transpose-words - capitalize-word upcase-word downcase-word)) + capitalize-word upcase-word downcase-word + left-word right-word)) (let ((othercmd (let ((name (symbol-name cmd))) (string-match "\\([[:alpha:]-]+\\)-word[s]?" name) (intern (concat "subword-" (match-string 1 name)))))) @@ -133,9 +141,8 @@ as words. \\{subword-mode-map}" - nil - nil - subword-mode-map) + :lighter " ," + (when subword-mode (superword-mode -1))) (define-obsolete-function-alias 'c-subword-mode 'subword-mode "23.2") @@ -161,6 +168,8 @@ (put 'subword-forward 'CUA 'move) +(defalias 'subword-right 'subword-forward) + (defun subword-backward (&optional arg) "Do the same as `backward-word' but on subwords. See the command `subword-mode' for a description of subwords. @@ -168,6 +177,8 @@ (interactive "p") (subword-forward (- (or arg 1)))) +(defalias 'subword-left 'subword-backward) + (defun subword-mark (arg) "Do the same as `mark-word' but on subwords. See the command `subword-mode' for a description of subwords. @@ -254,41 +265,73 @@ (unless advance (goto-char start)))) + + +(defvar superword-mode-map subword-mode-map + "Keymap used in `superword-mode' minor mode.") + +;;;###autoload +(define-minor-mode superword-mode + "Toggle superword movement and editing (Superword mode). +With a prefix argument ARG, enable Superword mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. + +Superword mode is a buffer-local minor mode. Enabling it remaps +word-based editing commands to superword-based commands that +treat symbols as words, e.g. \"this_is_a_symbol\". + +The superword oriented commands activated in this minor mode +recognize symbols as superwords to move between superwords and to +edit them as words. + +\\{superword-mode-map}" + :lighter " ²" + (when superword-mode (subword-mode -1))) + +;;;###autoload +(define-global-minor-mode global-superword-mode superword-mode + (lambda () (superword-mode 1))) ;; ;; Internal functions ;; (defun subword-forward-internal () - (if (and - (save-excursion - (let ((case-fold-search nil)) - (re-search-forward subword-forward-regexp nil t))) - (> (match-end 0) (point))) - (goto-char - (cond - ((< 1 (- (match-end 2) (match-beginning 2))) - (1- (match-end 2))) - (t - (match-end 0)))) - (forward-word 1))) - + (if superword-mode + (forward-symbol 1) + (if (and + (save-excursion + (let ((case-fold-search nil)) + (re-search-forward subword-forward-regexp nil t))) + (> (match-end 0) (point))) + (goto-char + (cond + ((< 1 (- (match-end 2) (match-beginning 2))) + (1- (match-end 2))) + (t + (match-end 0)))) + (forward-word 1)))) (defun subword-backward-internal () - (if (save-excursion - (let ((case-fold-search nil)) - (re-search-backward subword-backward-regexp nil t))) - (goto-char - (cond - ((and (match-end 3) - (< 1 (- (match-end 3) (match-beginning 3))) - (not (eq (point) (match-end 3)))) - (1- (match-end 3))) - (t - (1+ (match-beginning 0))))) - (backward-word 1))) + (if superword-mode + (forward-symbol -1) + (if (save-excursion + (let ((case-fold-search nil)) + (re-search-backward subword-backward-regexp nil t))) + (goto-char + (cond + ((and (match-end 3) + (< 1 (- (match-end 3) (match-beginning 3))) + (not (eq (point) (match-end 3)))) + (1- (match-end 3))) + (t + (1+ (match-beginning 0))))) + (backward-word 1)))) + (provide 'subword) +(provide 'superword) ;;; subword.el ends here ------------------------------------------------------------ revno: 112157 author: committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 15:26:34 +0200 message: image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-27 12:01:31 +0000 +++ src/ChangeLog 2013-03-27 13:26:34 +0000 @@ -1,3 +1,7 @@ +2013-03-27 rzl24ozi (tiny changes) + + * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function. + 2013-03-27 Eli Zaretskii * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype, === modified file 'src/image.c' --- src/image.c 2013-03-24 02:40:51 +0000 +++ src/image.c 2013-03-27 13:26:34 +0000 @@ -8120,24 +8120,24 @@ #ifdef WINDOWSNT /* SVG library functions. */ -DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new); -DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions); -DEF_IMGLIB_FN (gboolean, rsvg_handle_write); -DEF_IMGLIB_FN (gboolean, rsvg_handle_close); -DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf); - -DEF_IMGLIB_FN (int, gdk_pixbuf_get_width); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_height); -DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride); -DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels); -DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha); -DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample); - -DEF_IMGLIB_FN (void, g_type_init); -DEF_IMGLIB_FN (void, g_object_unref); -DEF_IMGLIB_FN (void, g_error_free); +DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new, (void)); +DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions, (RsvgHandle *, RsvgDimensionData *)); +DEF_IMGLIB_FN (gboolean, rsvg_handle_write, (RsvgHandle *, const guchar *, gsize, GError **)); +DEF_IMGLIB_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **)); +DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); +DEF_IMGLIB_FN (void *, rsvg_handle_set_size_callback, (RsvgHandle *, RsvgSizeFunc, gpointer, GDestroyNotify)); + +DEF_IMGLIB_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); +DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride, (const GdkPixbuf *)); +DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace, (const GdkPixbuf *)); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels, (const GdkPixbuf *)); +DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha, (const GdkPixbuf *)); +DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample, (const GdkPixbuf *)); + +DEF_IMGLIB_FN (void, g_type_init, (void)); +DEF_IMGLIB_FN (void, g_object_unref, (gpointer)); Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; ------------------------------------------------------------ revno: 112156 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 14:01:31 +0200 message: Fix MinGW64 compilation warnings in w32.c and w32proc.c. src/w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype, since MinGW's w32api headers do. This avoids compiler warnings. src/w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define if already defined. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 21:22:39 +0000 +++ src/ChangeLog 2013-03-27 12:01:31 +0000 @@ -1,3 +1,11 @@ +2013-03-27 Eli Zaretskii + + * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype, + since MinGW's w32api headers do. This avoids compiler warnings. + + * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define + if already defined. + 2013-03-26 Eli Zaretskii * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64. === modified file 'src/w32.c' --- src/w32.c 2013-03-26 21:22:39 +0000 +++ src/w32.c 2013-03-27 12:01:31 +0000 @@ -174,9 +174,12 @@ #ifndef CTL_CODE #define CTL_CODE(t,f,m,a) (((t)<<16)|((a)<<14)|((f)<<2)|(m)) #endif +/* MinGW64 defines FSCTL_GET_REPARSE_POINT on winioctl.h. */ +#ifndef FSCTL_GET_REPARSE_POINT #define FSCTL_GET_REPARSE_POINT \ CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) #endif +#endif /* TCP connection support. */ #include ------------------------------------------------------------ revno: 112155 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-03-27 06:17:37 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2013-03-26 10:17:36 +0000 +++ autogen/config.in 2013-03-27 10:17:37 +0000 @@ -1109,9 +1109,6 @@ /* Define to 1 if you have the Xkb extension. */ #undef HAVE_XKB -/* Define to 1 if you have the XkbGetKeyboard function. */ -#undef HAVE_XKBGETKEYBOARD - /* Define to 1 if you have the Xpm library (-lXpm). */ #undef HAVE_XPM === modified file 'autogen/configure' --- autogen/configure 2013-03-26 10:17:36 +0000 +++ autogen/configure 2013-03-27 10:17:37 +0000 @@ -10634,9 +10634,6 @@ $as_echo "$emacs_xkb" >&6; } if test $emacs_xkb = yes; then -$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h - - $as_echo "#define HAVE_XKB 1" >>confdefs.h fi ------------------------------------------------------------ revno: 112154 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 12:09:44 +0200 message: Fix last commit in nt/makefile.w32-in, which broke bootstrap. nt/makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake) (bootstrap, bootstrap-nmake, bootstrap-gmake, install-addpm): Depend on .exe files. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-27 08:40:24 +0000 +++ nt/ChangeLog 2013-03-27 10:09:44 +0000 @@ -1,5 +1,9 @@ 2013-03-27 Eli Zaretskii + * makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake) + (bootstrap, bootstrap-nmake, bootstrap-gmake, install-addpm): + Depend on .exe files. + * inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to avoid MinGW64 compiler warnings in editfns.c. === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2013-03-27 08:31:16 +0000 +++ nt/makefile.w32-in 2013-03-27 10:09:44 +0000 @@ -85,7 +85,7 @@ all-other-dirs-$(MAKETYPE): maybe-bootstrap -all-other-dirs-nmake: addsection +all-other-dirs-nmake: $(BLD)/addsection.exe cd ..\lib $(MAKE) $(MFLAGS) all cd ..\lib-src @@ -98,7 +98,7 @@ $(MAKE) $(MFLAGS) all cd ..\nt -all-other-dirs-gmake: addsection +all-other-dirs-gmake: $(BLD)/addsection.exe $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src all @@ -145,10 +145,10 @@ # Bootstrap depends on cmdproxy because some Lisp functions # loaded during bootstrap may need to run shell commands. -bootstrap: addsection cmdproxy bootstrap-$(MAKETYPE) +bootstrap: $(BLD)/addsection.exe $(BLD)/cmdproxy.exe bootstrap-$(MAKETYPE) $(MAKE) $(MFLAGS) $(XMFLAGS) all -bootstrap-nmake: addsection cmdproxy +bootstrap-nmake: $(BLD)/addsection.exe $(BLD)/cmdproxy.exe cd ..\lisp $(MAKE) $(MFLAGS) bootstrap-clean cd ..\src @@ -168,7 +168,7 @@ $(MAKE) $(MFLAGS) DOC cd ..\nt -bootstrap-gmake: addsection cmdproxy +bootstrap-gmake: $(BLD)/addsection.exe $(BLD)/cmdproxy.exe $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean @@ -249,7 +249,7 @@ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install -install-addpm: $(INSTALL_DIR)/bin addpm +install-addpm: $(INSTALL_DIR)/bin $(BLD)/addpm.exe - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin install-shortcuts: install-addpm ------------------------------------------------------------ revno: 112153 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 10:40:24 +0200 message: Avoid MinGW64 compiler warnings. nt/inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to avoid MinGW64 compiler warnings in editfns.c. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-27 08:31:16 +0000 +++ nt/ChangeLog 2013-03-27 08:40:24 +0000 @@ -1,5 +1,8 @@ 2013-03-27 Eli Zaretskii + * inc/ms-w32.h (sys_localtime) [_W64]: Provide a prototype, to + avoid MinGW64 compiler warnings in editfns.c. + Fix rules for parallel builds. * makefile.w32-in (ALL): Depend on *.exe files, not on phony names without the .exe suffix. === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-26 20:30:43 +0000 +++ nt/inc/ms-w32.h 2013-03-27 08:40:24 +0000 @@ -161,6 +161,10 @@ /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include #include +/* This prototype avoids MinGW64 compiler warnings due to the fact + that time.h is included before localtime is redirected to + sys_localtime below. */ +extern struct tm * sys_localtime (const time_t *); /* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to supply the 2nd arg correctly, so don't use _setjmp directly in that case. */ ------------------------------------------------------------ revno: 112152 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 10:31:16 +0200 message: Fix rules in nt/makefile.w32-in for parallel builds on MS-Windows. nt/makefile.w32-in (ALL): Depend on *.exe files, not on phony names without the .exe suffix. (addpm, ddeclient, cmdproxy, addsection, preprep): Remove phony targets. (.PHONY): Remove. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-27 07:21:43 +0000 +++ nt/ChangeLog 2013-03-27 08:31:16 +0000 @@ -1,5 +1,12 @@ 2013-03-27 Eli Zaretskii + Fix rules for parallel builds. + * makefile.w32-in (ALL): Depend on *.exe files, not on phony names + without the .exe suffix. + (addpm, ddeclient, cmdproxy, addsection, preprep): Remove phony + targets. + (.PHONY): Remove. + * addpm.c (_WIN32_IE) [_W64]: Move after inclusion of standard headers, since that's where _W64 is declared by MinGW64. === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2013-03-05 03:59:35 +0000 +++ nt/makefile.w32-in 2013-03-27 08:31:16 +0000 @@ -31,33 +31,26 @@ XMFLAGS = -ALL = addpm ddeclient runemacs cmdproxy addsection preprep - -.PHONY: $(ALL) - - -addpm: stamp_BLD $(BLD)/addpm.exe +ALL = $(BLD)/addpm.exe $(BLD)/ddeclient.exe $(BLD)/runemacs.exe \ + $(BLD)/cmdproxy.exe $(BLD)/addsection.exe $(BLD)/preprep.exe + $(BLD)/addpm.exe: $(BLD)/addpm.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) \ $(USER32) $(OLE32) $(UUID) $(SHELL32) -ddeclient: stamp_BLD $(BLD)/ddeclient.exe $(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) -cmdproxy: stamp_BLD $(BLD)/cmdproxy.exe $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32) -addsection: stamp_BLD $(BLD)/addsection.exe $(BLD)/addsection.exe: $(BLD)/addsection.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32) -preprep: stamp_BLD $(BLD)/preprep.exe $(BLD)/preprep.exe: $(BLD)/preprep.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) @@ -72,7 +65,6 @@ $(CLIENTRES): emacsclient.rc stamp_BLD $(RC) $(RC_OUT)$(CLIENTRES) emacsclient.rc -runemacs: stamp_BLD $(BLD)/runemacs.exe $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES) $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) ------------------------------------------------------------ revno: 112151 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2013-03-27 09:21:43 +0200 message: Fix compilation of addpm with MinGW64. nt/addpm.c (_WIN32_IE) [_W64]: Move after inclusion of standard headers, since that's where _W64 is declared by MinGW64. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-26 20:30:43 +0000 +++ nt/ChangeLog 2013-03-27 07:21:43 +0000 @@ -1,3 +1,8 @@ +2013-03-27 Eli Zaretskii + + * addpm.c (_WIN32_IE) [_W64]: Move after inclusion of standard + headers, since that's where _W64 is declared by MinGW64. + 2013-03-26 Eli Zaretskii * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS): Don't define. === modified file 'nt/addpm.c' --- nt/addpm.c 2013-03-26 08:21:27 +0000 +++ nt/addpm.c 2013-03-27 07:21:43 +0000 @@ -34,6 +34,10 @@ installed, then the DDE fallback for creating icons the Windows 3.1 progman way will be used instead, but that is prone to lockups caused by other applications not servicing their message queues. */ +#include +#include +#include + /* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything below 0x500. */ #ifndef _W64 @@ -45,9 +49,6 @@ #include #include #include -#include -#include -#include HDDEDATA CALLBACK DdeCallback (UINT uType, UINT uFmt, HCONV hconv, ------------------------------------------------------------ revno: 112150 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-03-26 22:13:31 -0700 message: * configure.ac (HAVE_XKBGETKEYBOARD): Remove; subsumed by HAVE_XKB. All uses changed. diff: === modified file 'ChangeLog' --- ChangeLog 2013-03-26 22:08:58 +0000 +++ ChangeLog 2013-03-27 05:13:31 +0000 @@ -1,3 +1,8 @@ +2013-03-27 Paul Eggert + + * configure.ac (HAVE_XKBGETKEYBOARD): Remove. + Subsumed by HAVE_XKB. All uses changed. + 2013-03-27 Aidan Gauland #include #endif @@ -5605,7 +5605,9 @@ present and mapped to the usual X keysyms. */) (Lisp_Object frame) { -#ifdef HAVE_XKBGETKEYBOARD +#ifndef HAVE_XKB + return Qlambda; +#else XkbDescPtr kb; struct frame *f = check_x_frame (frame); Display *dpy = FRAME_X_DISPLAY (f); @@ -5683,9 +5685,7 @@ } unblock_input (); return have_keys; -#else /* not HAVE_XKBGETKEYBOARD */ - return Qlambda; -#endif /* not HAVE_XKBGETKEYBOARD */ +#endif }