view lisp/gtk.el @ 5371:6f10ac29bf40

Be better about searching for chars typed via XIM and x-compose.el, isearch lisp/ChangeLog addition: 2011-03-12 Aidan Kehoe <kehoea@parhasard.net> * isearch-mode.el (isearch-mode-map): Document why we bind the ASCII characters to isearch-printing-char in more detail. * isearch-mode.el (isearch-maybe-frob-keyboard-macros): If `this-command' is nil and the keys typed would normally be bound to `self-insert-command' in the global map, force `isearch-printing-char' to be called with an appropriate value for last-command-event. Addresses an issue where searching for characters generated from x-compose.el and XIM threw errors for me in dired. src/ChangeLog addition: 2011-03-12 Aidan Kehoe <kehoea@parhasard.net> * event-stream.c (Fdispatch_event): As documented, allow pre-command-hook to usefully modify this-command even when this-command is nil (that is, we would normally throw an undefined-keystroke-sequence error). Don't throw that error if this-command was modified, instead try to execute the new value. Allow pre-command-hook to modify last-command-event in this specific context. Don't document this, for the moment.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 12 Mar 2011 13:11:31 +0000
parents cd167465bf69
children b9167d522a9a
line wrap: on
line source

;; gtk.el --- provide information about GTK wrapping
;;
;; Copyright (C) 2000, 2001 William M. Perry
;;
;; This file is part of XEmacs.
;;
;; XEmacs is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the
;; Free Software Foundation; either version 2, or (at your option) any
;; later version.
;;
;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
;; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
;; for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with XEmacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
;; Boston, MA 02110-1301, USA.  */

(globally-declare-fboundp
 '(gtk-import-function-internal
   gtk-call-function
   gtk-type-name
   gtk-import-function))

(globally-declare-boundp
 '(gtk-enumeration-info))

(gtk-import-function nil "gdk_flush")

(defun gtk-describe-enumerations ()
  "Show a list of all GtkEnum or GtkFlags objects available from lisp."
  (interactive)
  (set-buffer (get-buffer-create "*GTK Enumerations*"))
  (erase-buffer)
  (let ((separator (make-string (- (window-width) 3) ?-)))
    (maphash (lambda (key val)
	       (insert
		separator "\n"
		(if (stringp key)
		    key
		  (gtk-type-name key)) "\n")
	       (mapc (lambda (cell)
		       (insert (format "\t%40s == %d\n" (car cell) (cdr cell)))) val))
	     gtk-enumeration-info))
  (goto-char (point-min))
  (display-buffer (current-buffer)))