Now on revision 108015. ------------------------------------------------------------ revno: 108015 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-04-23 23:40:57 -0400 message: * lisp/ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode and `/ M' to filter-derived-mode. * lisp/ibuf-ext.el (ibuffer-list-buffer-modes): Simplify; avoid add-to-list. (ibuffer-filter-by-mode, ibuffer-filter-by-used-mode) (ibuffer-mark-by-mode): Use default rather than initial-input. (ibuffer-filter-by-derived-mode): Autoload and require-match. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-24 02:07:40 +0000 +++ etc/NEWS 2012-04-24 03:40:57 +0000 @@ -74,7 +74,8 @@ * Changes in Specialized Modes and Packages in Emacs 24.2 -** New `derived-mode' filter for Ibuffer, bound to `/ w'. +** New `derived-mode' filter for Ibuffer, bound to `/ M'. +`/ m' is now bound to filter by used-mode, which used to be bound to `/ M'. ** Apropos === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-24 02:07:40 +0000 +++ lisp/ChangeLog 2012-04-24 03:40:57 +0000 @@ -1,3 +1,12 @@ +2012-04-24 Stefan Monnier + + * ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode + and `/ M' to filter-derived-mode. + * ibuf-ext.el (ibuffer-list-buffer-modes): Simplify; avoid add-to-list. + (ibuffer-filter-by-mode, ibuffer-filter-by-used-mode) + (ibuffer-mark-by-mode): Use default rather than initial-input. + (ibuffer-filter-by-derived-mode): Autoload and require-match. + 2012-04-24 Ivan Andrus (tiny change) * ibuf-ext.el (ibuffer-list-buffer-modes): Add `include-parents' arg. === modified file 'lisp/ibuf-ext.el' --- lisp/ibuf-ext.el 2012-04-24 02:07:40 +0000 +++ lisp/ibuf-ext.el 2012-04-24 03:40:57 +0000 @@ -974,23 +974,16 @@ (defun ibuffer-list-buffer-modes (&optional include-parents) - "Create an alist of buffer modes currently in use. -If INCLUDE-PARENTS is non-nil then include parent modes. -The list returned will be of the form (\"MODE-NAME\" . MODE-SYMBOL)." - (let ((bufs (buffer-list)) - (modes) - (this-mode)) - (while bufs - (setq this-mode (buffer-local-value 'major-mode (car bufs)) - bufs (cdr bufs)) - (while this-mode - (add-to-list - 'modes - `(,(symbol-name this-mode) . - ,this-mode)) - (setq this-mode (and include-parents - (get this-mode 'derived-mode-parent))))) - modes)) + "Create a completion table of buffer modes currently in use. +If INCLUDE-PARENTS is non-nil then include parent modes." + (let ((modes)) + (dolist (buf (buffer-list)) + (let ((this-mode (buffer-local-value 'major-mode buf))) + (while (and this-mode (not (memq this-mode modes))) + (push this-mode modes) + (setq this-mode (and include-parents + (get this-mode 'derived-mode-parent)))))) + (mapcar #'symbol-name modes))) ;;; Extra operation definitions @@ -1000,16 +993,19 @@ "Toggle current view to buffers with major mode QUALIFIER." (:description "major mode" :reader - (intern - (completing-read "Filter by major mode: " obarray - #'(lambda (e) - (string-match "-mode$" - (symbol-name e))) - t - (let ((buf (ibuffer-current-buffer))) - (if (and buf (buffer-live-p buf)) - (symbol-name (buffer-local-value 'major-mode buf)) - ""))))) + (let* ((buf (ibuffer-current-buffer)) + (default (if (and buf (buffer-live-p buf)) + (symbol-name (buffer-local-value + 'major-mode buf))))) + (intern + (completing-read + (if default + (format "Filter by major mode (default %s): " default) + "Filter by major mode: ") + obarray + #'(lambda (e) + (string-match "-mode\\'" (symbol-name e))) + t nil nil default)))) (eq qualifier (buffer-local-value 'major-mode buf))) ;;;###autoload (autoload 'ibuffer-filter-by-used-mode "ibuf-ext") @@ -1018,19 +1014,20 @@ Called interactively, this function allows selection of modes currently used by buffers." (:description "major mode in use" - :reader - (intern - (completing-read "Filter by major mode: " - (ibuffer-list-buffer-modes) - nil - t - (let ((buf (ibuffer-current-buffer))) - (if (and buf (buffer-live-p buf)) - (symbol-name (buffer-local-value - 'major-mode buf)) - ""))))) + :reader + (let* ((buf (ibuffer-current-buffer)) + (default (if (and buf (buffer-live-p buf)) + (symbol-name (buffer-local-value + 'major-mode buf))))) + (intern + (completing-read + (if default + (format "Filter by major mode (default %s): " default) + "Filter by major mode: ") + (ibuffer-list-buffer-modes) nil t nil nil default)))) (eq qualifier (buffer-local-value 'major-mode buf))) +;;;###autoload (autoload 'ibuffer-filter-by-derived-mode "ibuf-ext") (define-ibuffer-filter derived-mode "Toggle current view to buffers whose major mode inherits from QUALIFIER." (:description "derived mode" @@ -1038,7 +1035,7 @@ (intern (completing-read "Filter by derived mode: " (ibuffer-list-buffer-modes t) - nil nil ""))) + nil t))) (with-current-buffer buf (derived-mode-p qualifier))) ;;;###autoload (autoload 'ibuffer-filter-by-name "ibuf-ext") @@ -1480,19 +1477,16 @@ (defun ibuffer-mark-by-mode (mode) "Mark all buffers whose major mode equals MODE." (interactive - (list (intern (completing-read "Mark by major mode: " obarray - #'(lambda (e) - ;; kind of a hack... - (and (fboundp e) - (string-match "-mode$" - (symbol-name e)))) - t - (let ((buf (ibuffer-current-buffer))) - (if (and buf (buffer-live-p buf)) - (with-current-buffer buf - (cons (symbol-name major-mode) - 0)) - "")))))) + (let* ((buf (ibuffer-current-buffer)) + (default (if (and buf (buffer-live-p buf)) + (symbol-name (buffer-local-value + 'major-mode buf))))) + (list (intern + (completing-read + (if default + (format "Mark by major mode (default %s): " default) + "Mark by major mode: ") + (ibuffer-list-buffer-modes) nil t nil nil default))))) (ibuffer-mark-on-buffer #'(lambda (buf) (eq (buffer-local-value 'major-mode buf) mode)))) === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2012-04-24 02:07:40 +0000 +++ lisp/ibuffer.el 2012-04-24 03:40:57 +0000 @@ -501,9 +501,8 @@ (define-key map (kbd "s f") 'ibuffer-do-sort-by-filename/process) (define-key map (kbd "s m") 'ibuffer-do-sort-by-major-mode) - (define-key map (kbd "/ m") 'ibuffer-filter-by-mode) - (define-key map (kbd "/ M") 'ibuffer-filter-by-used-mode) - (define-key map (kbd "/ w") 'ibuffer-filter-by-derived-mode) + (define-key map (kbd "/ m") 'ibuffer-filter-by-used-mode) + (define-key map (kbd "/ M") 'ibuffer-filter-by-derived-mode) (define-key map (kbd "/ n") 'ibuffer-filter-by-name) (define-key map (kbd "/ c") 'ibuffer-filter-by-content) (define-key map (kbd "/ e") 'ibuffer-filter-by-predicate) @@ -2646,7 +2645,7 @@ ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "b2b8f11ad22546ad05d6db0b7d388ac1") +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "98491557b04909791f687f2eecc88320") ;;; Generated autoloads from ibuf-ext.el (autoload 'ibuffer-auto-mode "ibuf-ext" "\ @@ -2836,6 +2835,7 @@ \(fn NAME)" t nil) (autoload 'ibuffer-filter-by-mode "ibuf-ext") (autoload 'ibuffer-filter-by-used-mode "ibuf-ext") + (autoload 'ibuffer-filter-by-derived-mode "ibuf-ext") (autoload 'ibuffer-filter-by-name "ibuf-ext") (autoload 'ibuffer-filter-by-filename "ibuf-ext") (autoload 'ibuffer-filter-by-size-gt "ibuf-ext") ------------------------------------------------------------ revno: 108014 author: Ivan Andrus committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-04-23 22:07:40 -0400 message: * lisp/ibuf-ext.el (ibuffer-list-buffer-modes): Add `include-parents' arg. (ibuffer-filter-by-derived-mode): New filter. * lisp/ibuffer.el (ibuffer-mode-map): Bind to `/ w'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-23 15:38:48 +0000 +++ etc/NEWS 2012-04-24 02:07:40 +0000 @@ -74,6 +74,8 @@ * Changes in Specialized Modes and Packages in Emacs 24.2 +** New `derived-mode' filter for Ibuffer, bound to `/ w'. + ** Apropos *** The faces used by Apropos are now directly customizable. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 15:48:22 +0000 +++ lisp/ChangeLog 2012-04-24 02:07:40 +0000 @@ -1,3 +1,9 @@ +2012-04-24 Ivan Andrus (tiny change) + + * ibuf-ext.el (ibuffer-list-buffer-modes): Add `include-parents' arg. + (ibuffer-filter-by-derived-mode): New filter. + * ibuffer.el (ibuffer-mode-map): Bind to `/ w'. + 2012-04-23 Andreas Politz * subr.el (accept-change-group): Fix arg usage (Bug#6095). === modified file 'lisp/ibuf-ext.el' --- lisp/ibuf-ext.el 2012-01-19 07:21:25 +0000 +++ lisp/ibuf-ext.el 2012-04-24 02:07:40 +0000 @@ -973,8 +973,9 @@ (concat " [" (cadr type) ": " (format "%s]" (cdr qualifier))))))) -(defun ibuffer-list-buffer-modes () +(defun ibuffer-list-buffer-modes (&optional include-parents) "Create an alist of buffer modes currently in use. +If INCLUDE-PARENTS is non-nil then include parent modes. The list returned will be of the form (\"MODE-NAME\" . MODE-SYMBOL)." (let ((bufs (buffer-list)) (modes) @@ -982,10 +983,13 @@ (while bufs (setq this-mode (buffer-local-value 'major-mode (car bufs)) bufs (cdr bufs)) - (add-to-list - 'modes - `(,(symbol-name this-mode) . - ,this-mode))) + (while this-mode + (add-to-list + 'modes + `(,(symbol-name this-mode) . + ,this-mode)) + (setq this-mode (and include-parents + (get this-mode 'derived-mode-parent))))) modes)) @@ -1027,6 +1031,16 @@ ""))))) (eq qualifier (buffer-local-value 'major-mode buf))) +(define-ibuffer-filter derived-mode + "Toggle current view to buffers whose major mode inherits from QUALIFIER." + (:description "derived mode" + :reader + (intern + (completing-read "Filter by derived mode: " + (ibuffer-list-buffer-modes t) + nil nil ""))) + (with-current-buffer buf (derived-mode-p qualifier))) + ;;;###autoload (autoload 'ibuffer-filter-by-name "ibuf-ext") (define-ibuffer-filter name "Toggle current view to buffers with name matching QUALIFIER." === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2012-04-22 13:58:00 +0000 +++ lisp/ibuffer.el 2012-04-24 02:07:40 +0000 @@ -503,6 +503,7 @@ (define-key map (kbd "/ m") 'ibuffer-filter-by-mode) (define-key map (kbd "/ M") 'ibuffer-filter-by-used-mode) + (define-key map (kbd "/ w") 'ibuffer-filter-by-derived-mode) (define-key map (kbd "/ n") 'ibuffer-filter-by-name) (define-key map (kbd "/ c") 'ibuffer-filter-by-content) (define-key map (kbd "/ e") 'ibuffer-filter-by-predicate) @@ -2645,7 +2646,7 @@ ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "1400db1bc3d4a3010cbc4807a6725072") +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "b2b8f11ad22546ad05d6db0b7d388ac1") ;;; Generated autoloads from ibuf-ext.el (autoload 'ibuffer-auto-mode "ibuf-ext" "\ ------------------------------------------------------------ revno: 108013 fixes bug(s): http://debbugs.gnu.org/11311 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2012-04-24 01:15:08 +0200 message: src/gnutls.c (init_gnutls_functions): Fix bug#11311. The value of :loaded-from is now a cons. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-23 22:46:35 +0000 +++ src/ChangeLog 2012-04-23 23:15:08 +0000 @@ -1,3 +1,8 @@ +2012-04-23 Juanma Barranquero + + * gnutls.c (init_gnutls_functions): The value of :loaded-from is + now a cons (bug#11311). + 2012-04-23 Paul Eggert Do not create empty overlays with the evaporate property (Bug#9642). === modified file 'src/gnutls.c' --- src/gnutls.c 2012-04-14 01:46:06 +0000 +++ src/gnutls.c 2012-04-23 23:15:08 +0000 @@ -201,7 +201,7 @@ max_log_level = global_gnutls_log_level; GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", - SDATA (Fget (Qgnutls_dll, QCloaded_from))); + SDATA (XCAR (Fget (Qgnutls_dll, QCloaded_from)))); return 1; } @@ -419,7 +419,7 @@ { proc->gnutls_handshakes_tried++; emacs_gnutls_handshake (proc); - GNUTLS_LOG2i (5, log_level, "Retried handshake", + GNUTLS_LOG2i (5, log_level, "Retried handshake", proc->gnutls_handshakes_tried); return -1; } ------------------------------------------------------------ revno: 108012 fixes bug(s): http://debbugs.gnu.org/9642 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-04-23 15:46:35 -0700 message: Do not create empty overlays with the evaporate property (Bug#9642). * buffer.c (Fmove_overlay): Delete an evaporating overlay if it becomes empty after its bounds are adjusted to fit within its buffer. Without this fix, in a nonempty buffer (let ((o (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1)) yields an empty overlay that has the evaporate property, which is not supposed to happen. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-23 07:34:29 +0000 +++ src/ChangeLog 2012-04-23 22:46:35 +0000 @@ -1,5 +1,13 @@ 2012-04-23 Paul Eggert + Do not create empty overlays with the evaporate property (Bug#9642). + * buffer.c (Fmove_overlay): Delete an evaporating overlay + if it becomes empty after its bounds are adjusted to fit within + its buffer. Without this fix, in a nonempty buffer (let ((o + (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1)) + yields an empty overlay that has the evaporate property, which is + not supposed to happen. + Fix minor GTK3 problems found by static checking. * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) === modified file 'src/buffer.c' --- src/buffer.c 2012-04-16 01:10:42 +0000 +++ src/buffer.c 2012-04-23 22:46:35 +0000 @@ -3682,6 +3682,7 @@ struct buffer *b, *ob; Lisp_Object obuffer; int count = SPECPDL_INDEX (); + ptrdiff_t n_beg, n_end; CHECK_OVERLAY (overlay); if (NILP (buffer)) @@ -3700,15 +3701,23 @@ CHECK_NUMBER_COERCE_MARKER (beg); CHECK_NUMBER_COERCE_MARKER (end); - if (XINT (beg) == XINT (end) && ! NILP (Foverlay_get (overlay, Qevaporate))) + if (XINT (beg) > XINT (end)) + { + Lisp_Object temp; + temp = beg; beg = end; end = temp; + } + + /* First set the overlay boundaries, which may clip them. */ + Fset_marker (OVERLAY_START (overlay), beg, buffer); + Fset_marker (OVERLAY_END (overlay), end, buffer); + n_beg = marker_position (OVERLAY_START (overlay)); + n_end = marker_position (OVERLAY_END (overlay)); + + /* Now, delete the overlay if it is empty after clipping and has the + evaporate property. */ + if (n_beg == n_end && ! NILP (Foverlay_get (overlay, Qevaporate))) return Fdelete_overlay (overlay); - if (XINT (beg) > XINT (end)) - { - Lisp_Object temp; - temp = beg; beg = end; end = temp; - } - specbind (Qinhibit_quit, Qt); obuffer = Fmarker_buffer (OVERLAY_START (overlay)); @@ -3731,7 +3740,7 @@ } /* Redisplay where the overlay is going to be. */ - modify_overlay (b, XINT (beg), XINT (end)); + modify_overlay (b, n_beg, n_end); } else /* Redisplay the area the overlay has just left, or just enclosed. */ @@ -3741,16 +3750,12 @@ o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); - if (o_beg == XINT (beg)) - modify_overlay (b, o_end, XINT (end)); - else if (o_end == XINT (end)) - modify_overlay (b, o_beg, XINT (beg)); + if (o_beg == n_beg) + modify_overlay (b, o_end, n_end); + else if (o_end == n_end) + modify_overlay (b, o_beg, n_beg); else - { - if (XINT (beg) < o_beg) o_beg = XINT (beg); - if (XINT (end) > o_end) o_end = XINT (end); - modify_overlay (b, o_beg, o_end); - } + modify_overlay (b, min (o_beg, n_beg), max (o_end, n_end)); } if (!NILP (obuffer)) @@ -3762,12 +3767,8 @@ eassert (XOVERLAY (overlay)->next == NULL); } - Fset_marker (OVERLAY_START (overlay), beg, buffer); - Fset_marker (OVERLAY_END (overlay), end, buffer); - /* Put the overlay on the wrong list. */ - end = OVERLAY_END (overlay); - if (OVERLAY_POSITION (end) < b->overlay_center) + if (n_end < b->overlay_center) { XOVERLAY (overlay)->next = b->overlays_after; b->overlays_after = XOVERLAY (overlay); ------------------------------------------------------------ revno: 108011 fixes bug(s): http://debbugs.gnu.org/6095 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-04-23 23:48:22 +0800 message: * subr.el (accept-change-group): Fix arg usage. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 15:38:48 +0000 +++ lisp/ChangeLog 2012-04-23 15:48:22 +0000 @@ -1,3 +1,7 @@ +2012-04-23 Andreas Politz + + * subr.el (accept-change-group): Fix arg usage (Bug#6095). + 2012-04-23 Chong Yidong * cus-edit.el (customize-apropos, customize-apropos-options): === modified file 'lisp/subr.el' --- lisp/subr.el 2012-04-20 08:48:50 +0000 +++ lisp/subr.el 2012-04-23 15:48:22 +0000 @@ -2391,7 +2391,7 @@ This finishes the change group by accepting its changes as final." (dolist (elt handle) (with-current-buffer (car elt) - (if (eq elt t) + (if (eq (cdr elt) t) (setq buffer-undo-list t))))) (defun cancel-change-group (handle) ------------------------------------------------------------ revno: 108010 fixes bug(s): http://debbugs.gnu.org/8396 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-04-23 23:38:48 +0800 message: Use proper faces in apropos.el. * lisp/apropos.el (apropos-symbol, apropos-keybinding, apropos-label) (apropos-property, apropos-function-button) (apropos-variable-button, apropos-misc-button): New faces. (apropos-symbol-face, apropos-keybinding-face) (apropos-label-face, apropos-property-face, apropos-match-face): Variables removed. (apropos-library-button, apropos-format-plist, apropos-print) (apropos-print-doc, apropos-describe-plist): Callers changed. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-23 12:37:55 +0000 +++ etc/NEWS 2012-04-23 15:38:48 +0000 @@ -74,6 +74,15 @@ * Changes in Specialized Modes and Packages in Emacs 24.2 +** Apropos + +*** The faces used by Apropos are now directly customizable. +These faces are named `apropos-symbol', `apropos-keybinding', and so on; +see the `apropos' Custom group for details. + +**** The old options whose values specified faces to use were removed +(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.). + ** Customize *** `custom-reset-button-menu' now defaults to t. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 12:44:54 +0000 +++ lisp/ChangeLog 2012-04-23 15:38:48 +0000 @@ -9,6 +9,14 @@ * apropos.el (apropos-read-pattern): Make prompt less cryptic. Fix word list splitting (Bug#11132). + (apropos-symbol, apropos-keybinding, apropos-label) + (apropos-property, apropos-function-button) + (apropos-variable-button, apropos-misc-button): New faces. + (apropos-symbol-face, apropos-keybinding-face) + (apropos-label-face, apropos-property-face, apropos-match-face): + Variables removed (Bug#8396). + (apropos-library-button, apropos-format-plist, apropos-print) + (apropos-print-doc, apropos-describe-plist): Callers changed. 2012-04-23 Michael Albinus === modified file 'lisp/apropos.el' --- lisp/apropos.el 2012-04-23 12:44:54 +0000 +++ lisp/apropos.el 2012-04-23 15:38:48 +0000 @@ -85,35 +85,48 @@ :group 'apropos :type 'boolean) - -(defcustom apropos-symbol-face 'bold - "Face for symbol name in Apropos output, or nil for none." - :group 'apropos - :type 'face) - -(defcustom apropos-keybinding-face 'underline - "Face for lists of keybinding in Apropos output, or nil for none." - :group 'apropos - :type 'face) - -(defcustom apropos-label-face '(italic) - "Face for label (`Command', `Variable' ...) in Apropos output. -A value of nil means don't use any special font for them, and also -turns off mouse highlighting." - :group 'apropos - :type 'face) - -(defcustom apropos-property-face 'bold-italic +(defface apropos-symbol + '((t (:inherit bold))) + "Face for the symbol name in Apropos output." + :group 'apropos + :version "24.2") + +(defface apropos-keybinding + '((t (:inherit underline))) + "Face for lists of keybinding in Apropos output." + :group 'apropos + :version "24.2") + +(defface apropos-property + '((t (:inherit font-lock-builtin-face))) "Face for property name in apropos output, or nil for none." :group 'apropos - :type 'face) + :version "24.2") + +(defface apropos-function-button + '((t (:inherit (font-lock-function-name-face button)))) + "Button face indicating a function, macro, or command in Apropos." + :group 'apropos + :version "24.2") + +(defface apropos-variable-button + '((t (:inherit (font-lock-variable-name-face button)))) + "Button face indicating a variable in Apropos." + :group 'apropos + :version "24.2") + +(defface apropos-misc-button + '((t (:inherit (font-lock-constant-face button)))) + "Button face indicating a miscellaneous object type in Apropos." + :group 'apropos + :version "24.2") (defcustom apropos-match-face 'match "Face for matching text in Apropos documentation/value, or nil for none. This applies when you look for matches in the documentation or variable value for the pattern; the part that matches gets displayed in this font." :group 'apropos - :type 'face) + :version "24.2") (defcustom apropos-sort-by-scores nil "Non-nil means sort matches by scores; best match is shown first. @@ -196,7 +209,7 @@ ;;; Button types used by apropos (define-button-type 'apropos-symbol - 'face apropos-symbol-face + 'face 'apropos-symbol 'help-echo "mouse-2, RET: Display more help on this symbol" 'follow-link t 'action #'apropos-symbol-button-display-help) @@ -210,7 +223,7 @@ (define-button-type 'apropos-function 'apropos-label "Function" 'apropos-short-label "f" - 'face '(font-lock-function-name-face button) + 'face 'apropos-function-button 'help-echo "mouse-2, RET: Display more help on this function" 'follow-link t 'action (lambda (button) @@ -219,7 +232,7 @@ (define-button-type 'apropos-macro 'apropos-label "Macro" 'apropos-short-label "m" - 'face '(font-lock-function-name-face button) + 'face 'apropos-function-button 'help-echo "mouse-2, RET: Display more help on this macro" 'follow-link t 'action (lambda (button) @@ -228,7 +241,7 @@ (define-button-type 'apropos-command 'apropos-label "Command" 'apropos-short-label "c" - 'face '(font-lock-function-name-face button) + 'face 'apropos-function-button 'help-echo "mouse-2, RET: Display more help on this command" 'follow-link t 'action (lambda (button) @@ -242,7 +255,7 @@ (define-button-type 'apropos-variable 'apropos-label "Variable" 'apropos-short-label "v" - 'face '(font-lock-variable-name-face button) + 'face 'apropos-variable-button 'help-echo "mouse-2, RET: Display more help on this variable" 'follow-link t 'action (lambda (button) @@ -260,7 +273,7 @@ (define-button-type 'apropos-group 'apropos-label "Group" 'apropos-short-label "g" - 'face '(font-lock-builtin-face button) + 'face 'apropos-misc-button 'help-echo "mouse-2, RET: Display more help on this group" 'follow-link t 'action (lambda (button) @@ -270,7 +283,7 @@ (define-button-type 'apropos-widget 'apropos-label "Widget" 'apropos-short-label "w" - 'face '(font-lock-builtin-face button) + 'face 'apropos-misc-button 'help-echo "mouse-2, RET: Display more help on this widget" 'follow-link t 'action (lambda (button) @@ -279,7 +292,7 @@ (define-button-type 'apropos-plist 'apropos-label "Properties" 'apropos-short-label "p" - 'face '(font-lock-keyword-face button) + 'face 'apropos-misc-button 'help-echo "mouse-2, RET: Display more help on this plist" 'follow-link t 'action (lambda (button) @@ -587,7 +600,7 @@ (let ((name (copy-sequence (symbol-name sym)))) (make-text-button name nil 'type 'apropos-library - 'face apropos-symbol-face + 'face 'apropos-symbol 'apropos-symbol name) name))) @@ -837,9 +850,8 @@ (while pl (setq p (format "%s %S" (car pl) (nth 1 pl))) (if (or (not compare) (string-match apropos-regexp p)) - (if apropos-property-face - (put-text-property 0 (length (symbol-name (car pl))) - 'face apropos-property-face p)) + (put-text-property 0 (length (symbol-name (car pl))) + 'face 'apropos-property p) (setq p nil)) (if p (progn @@ -1031,10 +1043,7 @@ (insert-text-button (symbol-name symbol) 'type 'apropos-symbol 'skip apropos-multi-type - ;; Can't use default, since user may have - ;; changed the variable! - ;; Just say `no' to variables containing faces! - 'face apropos-symbol-face) + 'face 'apropos-symbol) (if (and (eq apropos-sort-by-scores 'verbose) (cadr apropos-item)) (insert " (" (number-to-string (cadr apropos-item)) ") ")) @@ -1072,18 +1081,16 @@ (setq key (condition-case () (key-description key) (error))) - (if apropos-keybinding-face - (put-text-property 0 (length key) - 'face apropos-keybinding-face - key)) + (put-text-property 0 (length key) + 'face 'apropos-keybinding + key) key) item ", ")) (insert "M-x ... RET") - (when apropos-keybinding-face - (put-text-property (- (point) 11) (- (point) 8) - 'face apropos-keybinding-face) - (put-text-property (- (point) 3) (point) - 'face apropos-keybinding-face)))) + (put-text-property (- (point) 11) (- (point) 8) + 'face 'apropos-keybinding) + (put-text-property (- (point) 3) (point) + 'face 'apropos-keybinding))) (terpri)) (apropos-print-doc 2 (if (commandp symbol) @@ -1128,9 +1135,6 @@ (format "<%s>" (button-type-get type 'apropos-short-label)) (button-type-get type 'apropos-label)) 'type type - ;; Can't use the default button face, since user may have changed the - ;; variable! Just say `no' to variables containing faces! - 'face (append button-face apropos-label-face) 'apropos-symbol (car apropos-item)) (insert (if apropos-compact-layout " " ": "))) @@ -1177,9 +1181,8 @@ (princ "Symbol ") (prin1 symbol) (princ "'s plist is\n (") - (if apropos-symbol-face - (put-text-property (+ (point-min) 7) (- (point) 14) - 'face apropos-symbol-face)) + (put-text-property (+ (point-min) 7) (- (point) 14) + 'face 'apropos-symbol) (insert (apropos-format-plist symbol "\n ")) (princ ")"))) ------------------------------------------------------------ revno: 108009 fixes bug(s): http://debbugs.gnu.org/11132 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-04-23 20:44:54 +0800 message: * apropos.el (apropos-read-pattern): Fix word list splitting. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 12:37:55 +0000 +++ lisp/ChangeLog 2012-04-23 12:44:54 +0000 @@ -8,6 +8,7 @@ (customize-apropos-groups): Use apropos-read-pattern (Bug#11124). * apropos.el (apropos-read-pattern): Make prompt less cryptic. + Fix word list splitting (Bug#11132). 2012-04-23 Michael Albinus === modified file 'lisp/apropos.el' --- lisp/apropos.el 2012-04-23 12:37:55 +0000 +++ lisp/apropos.el 2012-04-23 12:44:54 +0000 @@ -336,7 +336,7 @@ (read-string (concat "Search for " subject " (word list or regexp): ")))) (if (string-equal (regexp-quote pattern) pattern) ;; Split into words - (split-string pattern "[ \t]+") + (split-string pattern "[ \t]+" t) pattern))) (defun apropos-parse-pattern (pattern) ------------------------------------------------------------ revno: 108008 fixes bug(s): http://debbugs.gnu.org/11176 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-04-23 20:37:55 +0800 message: Remove non-option variable handling from customize-apropos and enable use of word lists for customize-apropos-options etc. * lisp/apropos.el (apropos-read-pattern): Make prompt less cryptic. * lisp/cus-edit.el (customize-apropos, customize-apropos-options): Disable matching of non-option variables. (customize-option, customize-option-other-window) (customize-changed-options): Doc fix. (customize-apropos-options, customize-apropos-faces) (customize-apropos-groups): Use apropos-read-pattern. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-04-22 18:04:54 +0000 +++ etc/NEWS 2012-04-23 12:37:55 +0000 @@ -78,6 +78,10 @@ *** `custom-reset-button-menu' now defaults to t. +*** Non-option variables are never matched in `customize-apropos' and +`customize-apropos-options' (i.e. the prefix argument does nothing for +these commands now). + ** erc will look up server/channel names via auth-source and use the channel keys found, if any. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 11:57:06 +0000 +++ lisp/ChangeLog 2012-04-23 12:37:55 +0000 @@ -1,3 +1,14 @@ +2012-04-23 Chong Yidong + + * cus-edit.el (customize-apropos, customize-apropos-options): + Disable matching of non-option variables (Bug#11176). + (customize-option, customize-option-other-window) + (customize-changed-options): Doc fix. + (customize-apropos-options, customize-apropos-faces) + (customize-apropos-groups): Use apropos-read-pattern (Bug#11124). + + * apropos.el (apropos-read-pattern): Make prompt less cryptic. + 2012-04-23 Michael Albinus * net/xesam.el (xesam-mode-map): Use let-bound map in === modified file 'lisp/apropos.el' --- lisp/apropos.el 2012-04-09 12:36:01 +0000 +++ lisp/apropos.el 2012-04-23 12:37:55 +0000 @@ -333,7 +333,7 @@ SUBJECT is a string that is included in the prompt to identify what kind of objects to search." (let ((pattern - (read-string (concat "Apropos " subject " (word list or regexp): ")))) + (read-string (concat "Search for " subject " (word list or regexp): ")))) (if (string-equal (regexp-quote pattern) pattern) ;; Split into words (split-string pattern "[ \t]+") === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2012-04-22 17:58:14 +0000 +++ lisp/cus-edit.el 2012-04-23 12:37:55 +0000 @@ -1131,7 +1131,7 @@ ;;;###autoload (defun customize-option (symbol) - "Customize SYMBOL, which must be a user option variable." + "Customize SYMBOL, which must be a user option." (interactive (custom-variable-prompt)) (unless symbol (error "No variable specified")) @@ -1147,7 +1147,7 @@ ;;;###autoload (defun customize-option-other-window (symbol) - "Customize SYMBOL, which must be a user option variable. + "Customize SYMBOL, which must be a user option. Show the buffer in another window, but don't select it." (interactive (custom-variable-prompt)) (unless symbol @@ -1201,9 +1201,10 @@ ;;;###autoload (defun customize-changed-options (&optional since-version) "Customize all settings whose meanings have changed in Emacs itself. -This includes new user option variables and faces, and new -customization groups, as well as older options and faces whose meanings -or default values have changed since the previous major Emacs release. +This includes new user options and faces, and new customization +groups, as well as older options and faces whose meanings or +default values have changed since the previous major Emacs +release. With argument SINCE-VERSION (a string), customize all settings that were added or redefined since that version." @@ -1411,7 +1412,7 @@ ;;;###autoload (defun customize-apropos (pattern &optional type) - "Customize all loaded options, faces and groups matching PATTERN. + "Customize loaded options, faces and groups matching PATTERN. PATTERN can be a word, a list of words (separated by spaces), or a regexp (using some regexp special characters). If it is a word, search for matches for that word as a substring. If it is a list of words, @@ -1419,62 +1420,50 @@ If TYPE is `options', include only options. If TYPE is `faces', include only faces. -If TYPE is `groups', include only groups. -If TYPE is t (interactively, with prefix arg), include variables -that are not customizable options, as well as faces and groups -\(but we recommend using `apropos-variable' instead)." - (interactive (list (apropos-read-pattern "symbol") current-prefix-arg)) +If TYPE is `groups', include only groups." + (interactive (list (apropos-read-pattern "symbol") nil)) (require 'apropos) + (unless (memq type '(nil options faces groups)) + (error "Invalid setting type %s" (symbol-name type))) (apropos-parse-pattern pattern) (let (found) (mapatoms `(lambda (symbol) (when (string-match apropos-regexp (symbol-name symbol)) - ,(if (not (memq type '(faces options))) + ,(if (memq type '(nil groups)) '(if (get symbol 'custom-group) (push (list symbol 'custom-group) found))) - ,(if (not (memq type '(options groups))) + ,(if (memq type '(nil faces)) '(if (custom-facep symbol) (push (list symbol 'custom-face) found))) - ,(if (not (memq type '(groups faces))) + ,(if (memq type '(nil options)) `(if (and (boundp symbol) (eq (indirect-variable symbol) symbol) (or (get symbol 'saved-value) - (custom-variable-p symbol) - ,(if (not (memq type '(nil options))) - '(get symbol 'variable-documentation)))) + (custom-variable-p symbol))) (push (list symbol 'custom-variable) found)))))) - (if (not found) - (error "No %s matching %s" - (if (eq type t) - "items" - (format "customizable %s" - (if (memq type '(options faces groups)) - (symbol-name type) - "items"))) - pattern) - (custom-buffer-create - (custom-sort-items found t custom-buffer-order-groups) - "*Customize Apropos*")))) + (unless found + (error "No customizable %s matching %s" (symbol-name type) pattern)) + (custom-buffer-create + (custom-sort-items found t custom-buffer-order-groups) + "*Customize Apropos*"))) ;;;###autoload -(defun customize-apropos-options (regexp &optional arg) - "Customize all loaded customizable options matching REGEXP. -With prefix ARG, include variables that are not customizable options -\(but it is better to use `apropos-variable' if you want to find those)." - (interactive "sCustomize options (regexp): \nP") - (customize-apropos regexp (or arg 'options))) +(defun customize-apropos-options (regexp &optional ignored) + "Customize all loaded customizable options matching REGEXP." + (interactive (list (apropos-read-pattern "options"))) + (customize-apropos regexp 'options)) ;;;###autoload (defun customize-apropos-faces (regexp) "Customize all loaded faces matching REGEXP." - (interactive "sCustomize faces (regexp): \n") + (interactive (list (apropos-read-pattern "faces"))) (customize-apropos regexp 'faces)) ;;;###autoload (defun customize-apropos-groups (regexp) "Customize all loaded groups matching REGEXP." - (interactive "sCustomize groups (regexp): \n") + (interactive (list (apropos-read-pattern "groups"))) (customize-apropos regexp 'groups)) ;;; Buffer. ------------------------------------------------------------ revno: 108007 committer: Michael Albinus branch nick: trunk timestamp: Mon 2012-04-23 13:57:06 +0200 message: * net/xesam.el (xesam-mode-map): Use let-bound map in initialization. (Bug#11292) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 10:33:25 +0000 +++ lisp/ChangeLog 2012-04-23 11:57:06 +0000 @@ -1,3 +1,8 @@ +2012-04-23 Michael Albinus + + * net/xesam.el (xesam-mode-map): Use let-bound map in + initialization. (Bug#11292) + 2012-04-23 Agustín Martín Domingo Preserve ispell session localwords when switching back to === modified file 'lisp/net/xesam.el' --- lisp/net/xesam.el 2012-01-19 07:21:25 +0000 +++ lisp/net/xesam.el 2012-04-23 11:57:06 +0000 @@ -449,7 +449,7 @@ (defvar xesam-mode-map (let ((map (copy-keymap special-mode-map))) - (set-keymap-parent xesam-mode-map widget-keymap) + (set-keymap-parent map widget-keymap) map)) (define-derived-mode xesam-mode special-mode "Xesam" ------------------------------------------------------------ revno: 108006 committer: Agustin Martin branch nick: trunk timestamp: Mon 2012-04-23 12:33:25 +0200 message: ispell.el,flyspell.el: Preserve session localwords when switching back buffers. Once a word is declared valid for a session and a buffer it should stay valid for that buffer regardless buffer switches unless ispell process is explicitly killed or dictionary changed for that buffer. However, it is currently lost when we switch to a different buffer that triggers a new ispell process and then switch back to the original buffer (triggering a new ispell restart). These changes try to keep buffer session localwords accepted in above case. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-23 10:03:33 +0000 +++ lisp/ChangeLog 2012-04-23 10:33:25 +0000 @@ -1,5 +1,21 @@ 2012-04-23 Agustín Martín Domingo + Preserve ispell session localwords when switching back to + original buffer. + + * ispell.el (ispell-buffer-session-localwords): New buffer-local + variable to hold buffer session localwords. + (ispell-kill-ispell): add option 'clear to delete session + localwords. + (ispell-command-loop, ispell-change-dictionary) + (ispell-buffer-local-words): Preserve session localwords when + needed. + + * flyspell.el (flyspell-process-localwords, flyspell-do-correct): + Preserve session localwords when needed. + +2012-04-23 Agustín Martín Domingo + * ispell.el (ispell-insert-word) Remove unneeded function using obsolete `translation-table-for-input'. (ispell-word, ispell-process-line, ispell-complete-word): Use === modified file 'lisp/textmodes/flyspell.el' --- lisp/textmodes/flyspell.el 2012-04-12 14:19:40 +0000 +++ lisp/textmodes/flyspell.el 2012-04-23 10:33:25 +0000 @@ -1479,7 +1479,8 @@ ;;* declared correct. */ ;;*---------------------------------------------------------------------*/ (defun flyspell-process-localwords (misspellings-buffer) - (let (localwords case-fold-search + (let ((localwords ispell-buffer-session-localwords) + case-fold-search (ispell-casechars (ispell-get-casechars))) ;; Get localwords from the original buffer (save-excursion @@ -2147,6 +2148,9 @@ (setq ispell-pdict-modified-p '(t))) ((or (eq replace 'buffer) (eq replace 'session)) (ispell-send-string (concat "@" word "\n")) + (add-to-list 'ispell-buffer-session-localwords word) + (or ispell-buffer-local-name ; session localwords might conflict + (setq ispell-buffer-local-name (buffer-name))) (flyspell-unhighlight-at cursor-location) (if (null ispell-pdict-modified-p) (setq ispell-pdict-modified-p === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2012-04-23 10:03:33 +0000 +++ lisp/textmodes/ispell.el 2012-04-23 10:33:25 +0000 @@ -1184,7 +1184,8 @@ `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key ispell-menu-map [ispell-kill-ispell] - `(menu-item ,(purecopy "Kill Process") ispell-kill-ispell + `(menu-item ,(purecopy "Kill Process") + (lambda () (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) @@ -1268,7 +1269,7 @@ ["Continue Check" ispell-continue t] ["Complete Word Frag"ispell-complete-word-interior-frag t] ["Complete Word" ispell-complete-word t] - ["Kill Process" ispell-kill-ispell t] + ["Kill Process" (ispell-kill-ispell nil 'clear) t] ["Customize..." (customize-group 'ispell) t] ;; flyspell-mode may not be bound... ;;["flyspell" flyspell-mode @@ -1537,6 +1538,11 @@ "Contains the buffer name if local word definitions were used. Ispell is then restarted because the local words could conflict.") +(defvar ispell-buffer-session-localwords nil + "List of words accepted for session in this buffer.") + +(make-variable-buffer-local 'ispell-buffer-session-localwords) + (defvar ispell-parser 'use-mode-name "Indicates whether ispell should parse the current buffer as TeX Code. Special value `use-mode-name' tries to guess using the name of `major-mode'. @@ -2025,6 +2031,9 @@ nil) ((or (= char ?a) (= char ?A)) ; accept word without insert (ispell-send-string (concat "@" word "\n")) + (add-to-list 'ispell-buffer-session-localwords word) + (or ispell-buffer-local-name ; session localwords might conflict + (setq ispell-buffer-local-name (buffer-name))) (if (null ispell-pdict-modified-p) (setq ispell-pdict-modified-p (list ispell-pdict-modified-p))) @@ -2770,13 +2779,16 @@ (process-kill-without-query ispell-process))))))) ;;;###autoload -(defun ispell-kill-ispell (&optional no-error) +(defun ispell-kill-ispell (&optional no-error clear) "Kill current Ispell process (so that you may start a fresh one). -With NO-ERROR, just return non-nil if there was no Ispell running." +With NO-ERROR, just return non-nil if there was no Ispell running. +With CLEAR, buffer session localwords are cleaned." (interactive) ;; This hook is typically used by flyspell to flush some variables used ;; to optimize the common cases. (run-hooks 'ispell-kill-ispell-hook) + (if (or clear (interactive-p)) + (setq ispell-buffer-session-localwords nil)) (if (not (and ispell-process (eq (ispell-process-status) 'run))) (or no-error @@ -2837,6 +2849,7 @@ (setq ispell-local-dictionary-overridden t)) (error "Undefined dictionary: %s" dict)) (ispell-internal-change-dictionary) + (setq ispell-buffer-session-localwords nil) (message "%s Ispell dictionary set to %s" (if arg "Global" "Local") dict)))) @@ -3906,6 +3919,11 @@ ;; Actually start a new ispell process, because we need ;; to send commands now to specify the local words to it. (ispell-init-process) + (dolist (session-localword ispell-buffer-session-localwords) + (ispell-send-string (concat "@" session-localword "\n"))) + (or ispell-buffer-local-name + (if ispell-buffer-session-localwords + (setq ispell-buffer-local-name (buffer-name)))) (save-excursion (goto-char (point-min)) (while (search-forward ispell-words-keyword nil t) ------------------------------------------------------------ revno: 108005 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-04-23 06:17:30 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2012-04-19 10:17:36 +0000 +++ autogen/config.in 2012-04-23 10:17:30 +0000 @@ -148,6 +148,18 @@ /* Define to 1 if using D-Bus. */ #undef HAVE_DBUS +/* Define to 1 if you have the `dbus_validate_bus_name' function. */ +#undef HAVE_DBUS_VALIDATE_BUS_NAME + +/* Define to 1 if you have the `dbus_validate_interface' function. */ +#undef HAVE_DBUS_VALIDATE_INTERFACE + +/* Define to 1 if you have the `dbus_validate_member' function. */ +#undef HAVE_DBUS_VALIDATE_MEMBER + +/* Define to 1 if you have the `dbus_validate_path' function. */ +#undef HAVE_DBUS_VALIDATE_PATH + /* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */ #undef HAVE_DBUS_WATCH_GET_UNIX_FD === modified file 'autogen/configure' --- autogen/configure 2012-04-22 10:18:54 +0000 +++ autogen/configure 2012-04-23 10:17:30 +0000 @@ -7144,7 +7144,7 @@ nw="$nw -Waggregate-return" # anachronistic - nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) + nw="$nw -Wlong-long" # C90 is anachronistic nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often @@ -11913,12 +11913,18 @@ $as_echo "#define HAVE_DBUS 1" >>confdefs.h - for ac_func in dbus_watch_get_unix_fd + for ac_func in dbus_watch_get_unix_fd \ + dbus_validate_bus_name \ + dbus_validate_path \ + dbus_validate_interface \ + dbus_validate_member do : - ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" -if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DBUS_WATCH_GET_UNIX_FD 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi ------------------------------------------------------------ revno: 108004 committer: Agustin Martin branch nick: trunk timestamp: Mon 2012-04-23 12:03:33 +0200 message: Remove obsolete usage of (ispell-insert-word) `ispell-insert-word' is a plain `insert' together with word filtering through `translation-table-for-input' for character code unification. This was useful in Emacs 22, but is not needed for Emacs 23 and above since unification is now direct. Since XEmacs does not have `translation-table-for-input' there is no need at all to keep this old code, but use (insert) directly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-04-22 18:04:54 +0000 +++ lisp/ChangeLog 2012-04-23 10:03:33 +0000 @@ -1,3 +1,10 @@ +2012-04-23 Agustín Martín Domingo + + * ispell.el (ispell-insert-word) Remove unneeded function using + obsolete `translation-table-for-input'. + (ispell-word, ispell-process-line, ispell-complete-word): Use + plain `insert' instead of removed `ispell-insert-word'. + 2012-04-22 Chong Yidong * cus-edit.el (custom-variable-menu) === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2012-04-16 17:32:02 +0000 +++ lisp/textmodes/ispell.el 2012-04-23 10:03:33 +0000 @@ -1665,16 +1665,6 @@ (setq more-lines (= 0 (forward-line)))))))))))))) -;; Insert WORD while possibly translating characters by -;; translation-table-for-input. -(defun ispell-insert-word (word) - (let ((pos (point))) - (insert word) - ;; Avoid "obsolete" warnings for translation-table-for-input. - (with-no-warnings - (if (char-table-p translation-table-for-input) - (translate-region pos (point) translation-table-for-input))))) - ;;;###autoload (defun ispell-word (&optional following quietly continue region) "Check spelling of word under or before the cursor. @@ -1787,7 +1777,7 @@ ;; Insert first and then delete, ;; to avoid collapsing markers before and after ;; into a single place. - (ispell-insert-word new-word) + (insert new-word) (delete-region (point) end) ;; It is meaningless to preserve the cursor position ;; inside a word that has changed. @@ -3277,7 +3267,7 @@ (delete-region (point) (+ word-len (point))) (if (not (listp replace)) (progn - (ispell-insert-word replace) ; insert dictionary word + (insert replace) ; insert dictionary word (ispell-send-replacement (car poss) replace) (setq accept-list (cons replace accept-list))) (let ((replace-word (car replace))) @@ -3451,7 +3441,7 @@ (setq word (if (atom replacement) replacement (car replacement)) cursor-location (+ (- (length word) (- end start)) cursor-location)) - (ispell-insert-word word) + (insert word) (if (not (atom replacement)) ; recheck spelling of replacement. (progn (goto-char cursor-location) ------------------------------------------------------------ revno: 108003 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-04-23 00:34:29 -0700 message: Fix minor GTK3 problems found by static checking. * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass, emacs_fixed_get_type): Move decls here from emacsgtkfixed.h, since they needn't be public. (emacs_fixed_get_type): Now static. (emacs_fixed_class_init): Omit unused local. (emacs_fixed_child_type): Remove; unused. * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass): Move to emacsgtkfixed.c. (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS) (EMACS_FIXED_GET_CLASS): Remove; unused. * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-04-23 04:08:51 +0000 +++ src/ChangeLog 2012-04-23 07:34:29 +0000 @@ -1,5 +1,20 @@ 2012-04-23 Paul Eggert + Fix minor GTK3 problems found by static checking. + * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) + (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) + (struct _EmacsFixedClass, emacs_fixed_get_type): + Move decls here from emacsgtkfixed.h, since they needn't be public. + (emacs_fixed_get_type): Now static. + (emacs_fixed_class_init): Omit unused local. + (emacs_fixed_child_type): Remove; unused. + * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) + (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) + (struct _EmacsFixedClass): Move to emacsgtkfixed.c. + (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS) + (EMACS_FIXED_GET_CLASS): Remove; unused. + * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local. + * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO. Problem reported by Juanma Barranquero for Windows -Wunused-function. === modified file 'src/emacsgtkfixed.c' --- src/emacsgtkfixed.c 2012-01-05 09:46:05 +0000 +++ src/emacsgtkfixed.c 2012-04-23 07:34:29 +0000 @@ -28,6 +28,27 @@ #include "frame.h" #include "xterm.h" +#define EMACS_TYPE_FIXED emacs_fixed_get_type () +#define EMACS_FIXED(obj) \ + G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) + +typedef struct _EmacsFixed EmacsFixed; +typedef struct _EmacsFixedPrivate EmacsFixedPrivate; +typedef struct _EmacsFixedClass EmacsFixedClass; + +struct _EmacsFixed +{ + GtkFixed container; + + /*< private >*/ + EmacsFixedPrivate *priv; +}; + +struct _EmacsFixedClass +{ + GtkFixedClass parent_class; +}; + struct _EmacsFixedPrivate { struct frame *f; @@ -40,28 +61,21 @@ static void emacs_fixed_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural); +static GType emacs_fixed_get_type (void); G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED) static void emacs_fixed_class_init (EmacsFixedClass *klass) { GtkWidgetClass *widget_class; - GtkFixedClass *fixed_class; widget_class = (GtkWidgetClass*) klass; - fixed_class = (GtkFixedClass*) klass; widget_class->get_preferred_width = emacs_fixed_get_preferred_width; widget_class->get_preferred_height = emacs_fixed_get_preferred_height; g_type_class_add_private (klass, sizeof (EmacsFixedPrivate)); } -static GType -emacs_fixed_child_type (GtkFixed *container) -{ - return GTK_TYPE_WIDGET; -} - static void emacs_fixed_init (EmacsFixed *fixed) { === modified file 'src/emacsgtkfixed.h' --- src/emacsgtkfixed.h 2012-01-05 09:46:05 +0000 +++ src/emacsgtkfixed.h 2012-04-23 07:34:29 +0000 @@ -27,33 +27,7 @@ struct frame; -#define EMACS_TYPE_FIXED (emacs_fixed_get_type ()) -#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed)) -#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass)) -#define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED)) -#define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMACS_TYPE_FIXED)) -#define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMACS_TYPE_FIXED, EmacsFixedClass)) - -typedef struct _EmacsFixed EmacsFixed; -typedef struct _EmacsFixedPrivate EmacsFixedPrivate; -typedef struct _EmacsFixedClass EmacsFixedClass; - -struct _EmacsFixed -{ - GtkFixed container; - - /*< private >*/ - EmacsFixedPrivate *priv; -}; - - -struct _EmacsFixedClass -{ - GtkFixedClass parent_class; -}; - extern GtkWidget *emacs_fixed_new (struct frame *f); -extern GType emacs_fixed_get_type (void); G_END_DECLS === modified file 'src/gtkutil.c' --- src/gtkutil.c 2012-03-08 18:49:13 +0000 +++ src/gtkutil.c 2012-04-23 07:34:29 +0000 @@ -1090,7 +1090,9 @@ GtkWidget *wtop; GtkWidget *wvbox, *whbox; GtkWidget *wfixed; +#ifndef HAVE_GTK3 GtkRcStyle *style; +#endif char *title = 0; BLOCK_INPUT; ------------------------------------------------------------ revno: 108002 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-04-22 22:44:49 -0700 message: Spelling fixes. diff: === modified file 'doc/misc/dbus.texi' --- doc/misc/dbus.texi 2012-04-22 14:11:43 +0000 +++ doc/misc/dbus.texi 2012-04-23 05:44:49 +0000 @@ -1707,7 +1707,7 @@ @code{:pathN} @var{string}:@* This stands for the Nth argument of the signal. @code{:pathN} arguments can be used for object path wildcard matches as specified by -D-Bus, whilest an @code{:argN} argument requires an exact match. +D-Bus, while an @code{:argN} argument requires an exact match. @item @code{:arg-namespace} @var{string}:@* Register for the signals, which first argument defines the service or === modified file 'lisp/abbrev.el' --- lisp/abbrev.el 2012-04-18 16:43:23 +0000 +++ lisp/abbrev.el 2012-04-23 05:44:49 +0000 @@ -135,7 +135,7 @@ (insert-abbrev-table-description table t))) (dolist (table (nreverse empty-tables)) (insert-abbrev-table-description table t))) - ;; Note: `list-abbrevs' can dispaly only local abbrevs, in + ;; Note: `list-abbrevs' can display only local abbrevs, in ;; which case editing could lose abbrevs of other tables. Thus ;; enter `edit-abbrevs-mode' only if LOCAL is nil. (edit-abbrevs-mode)) === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2012-04-22 14:11:43 +0000 +++ lisp/net/dbus.el 2012-04-23 05:44:49 +0000 @@ -564,7 +564,7 @@ `:argN' STRING: `:pathN' STRING: This stands for the Nth argument of the signal. `:pathN' arguments can be used for object path wildcard -matches as specified by D-Bus, whilest an `:argN' argument +matches as specified by D-Bus, while an `:argN' argument requires an exact match. `:arg-namespace' STRING: Register for the signals, which first === modified file 'src/alloc.c' --- src/alloc.c 2012-04-22 07:50:17 +0000 +++ src/alloc.c 2012-04-23 05:44:49 +0000 @@ -5838,7 +5838,7 @@ } /* Mark the Lisp pointers in the terminal objects. - Called by the Fgarbage_collector. */ + Called by Fgarbage_collect. */ static void mark_terminals (void) === modified file 'src/keyboard.c' --- src/keyboard.c 2012-04-23 04:08:51 +0000 +++ src/keyboard.c 2012-04-23 05:44:49 +0000 @@ -12393,7 +12393,7 @@ } /* Mark the pointers in the kboard objects. - Called by the Fgarbage_collector. */ + Called by Fgarbage_collect. */ void mark_kboards (void) { === modified file 'src/term.c' --- src/term.c 2012-01-19 07:21:25 +0000 +++ src/term.c 2012-04-23 05:44:49 +0000 @@ -3601,7 +3601,7 @@ /* Mark the pointers in the tty_display_info objects. - Called by the Fgarbage_collector. */ + Called by Fgarbage_collect. */ void mark_ttys (void)