From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "T.V. Raman" Newsgroups: gmane.emacs.devel Subject: post-self-insert-hook and last-command: Date: Sat, 26 May 2012 16:20:40 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1338074456 32685 80.91.229.3 (26 May 2012 23:20:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 May 2012 23:20:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 27 01:20:55 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SYQHx-0005RJ-SW for ged-emacs-devel@m.gmane.org; Sun, 27 May 2012 01:20:50 +0200 Original-Received: from localhost ([::1]:37274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYQHx-0006gq-FG for ged-emacs-devel@m.gmane.org; Sat, 26 May 2012 19:20:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYQHt-0006gZ-JN for emacs-devel@gnu.org; Sat, 26 May 2012 19:20:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYQHr-0005c4-Mb for emacs-devel@gnu.org; Sat, 26 May 2012 19:20:45 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:42299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYQHr-0005bd-En for emacs-devel@gnu.org; Sat, 26 May 2012 19:20:43 -0400 Original-Received: by obbwd18 with SMTP id wd18so4017159obb.0 for ; Sat, 26 May 2012 16:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Bi5SukcaRaPCZMrWo0Mut5GaOUO59N4yRRRrHca2GOE=; b=cjfFHiucskeaOxUtrvTrDVx25yU4dzsx8teAZc/FdHOpr0v8UcFOGUYqhD12wiJZbP 7RAQguAuhc1zcQ5atn4JYXbv8jr5rN0yVC9LhUxc64E4f+/Wv+UomjjhT5tKRzh3kdsY CALms05ekxwtbvTTOkuW1jd3IUkDZm+lo2Y3A64R5DcKYbr35Jb2iKa9nffN3O7RMLhC R1Ozr5mS9DrBrMG8bpHI8SAN9IbUJDo0oqzQs54hYaIPsA5wQopVn6mfDgGvDMorDcYB tThwK6kNoLrLmJc7MxS/dD4dqNAArjrCZ18+9GPOch9FTDCiG/jNn4jH6ENHhrp0H8GM Vhpw== Original-Received: by 10.50.183.198 with SMTP id eo6mr1640711igc.61.1338074440494; Sat, 26 May 2012 16:20:40 -0700 (PDT) Original-Received: by 10.231.13.194 with HTTP; Sat, 26 May 2012 16:20:40 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150653 Archived-At: I'm trying to use post-self-insert-hook to speak characters as they are typed in emacspeak --- rather than what I have done for the last 18 years which was to execute emacspeak's own emacspeak-self-insert-command. It all works (almost) -- except that the speech feedback is called in situations other than when the user executes self-insert-command. The usual emacspeak technique of advising has never worked for this case since self-insert-command is a builtin. So to limit the calling of speech feedback to cases of self-insert-command, I added a test at the top of my speech feedback function of the form (eq last-command self-insert-command) but this doesn't work -- since last-command gets apparently gets set after post-self-insert-hook gets run --- at least that is my guess based on what I observe: With post-self-insert-hook set to call speech feedback if (eq last-command self-insert-command) I dont hear spoken feedback for the first invocation of self-insert-command. -- --