From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shiyao Ma Newsgroups: gmane.emacs.help Subject: What's the hook that's about cursor movement? Date: Fri, 29 Apr 2016 17:01:32 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461920515 5489 80.91.229.3 (29 Apr 2016 09:01:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2016 09:01:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 29 11:01:54 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1aw4J8-0001Xk-2o for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 11:01:54 +0200 Original-Received: from localhost ([::1]:53250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw4J7-0000U9-Hn for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 05:01:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw4Iq-0000LH-Te for help-gnu-emacs@gnu.org; Fri, 29 Apr 2016 05:01:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aw4Io-0003ih-1S for help-gnu-emacs@gnu.org; Fri, 29 Apr 2016 05:01:37 -0400 Original-Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:34520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw4In-0003ib-T0 for help-gnu-emacs@gnu.org; Fri, 29 Apr 2016 05:01:33 -0400 Original-Received: by mail-oi0-x236.google.com with SMTP id k142so111864867oib.1 for ; Fri, 29 Apr 2016 02:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=introo-me.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=n50FqygtfmkVoPbaTPksY6s5fL21TzigesrgZRyCXoo=; b=MbYyh+6c5vm9tjbNHNz88pthE6GV+YCtYxuA8h1MYDQ0FNh34fvdIWs6SRQBlN5CAW 0Jo3xBOM70v2OPXfg8GZD4GnDBaHEOOzhz99Drr4kaTXicqnuz1pINXaqHDlaNeVDVd2 6ZIL78XxW8OTTdvVQIfV1SMuS/pIxNkqEimbG8WXP6dGHWF7oBEtWS5qf7mDUjr+Eyvc biOdofyIZAl28K8ywov8kAOJyGWPY7/Ap4cYpgLgKloPvDbw92pSQhX0mPaolbsPvrXo vMkDbDbqwP9PWeLe01MfgSGrMI9ZGwvBuDjJdFgSVcXVPBK7TAxhUi37ZAezanfkeIOx +GyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=n50FqygtfmkVoPbaTPksY6s5fL21TzigesrgZRyCXoo=; b=bYlt0I+IwdjBr+UnWBa3ZxHQCY7lzO+o4aErXNI7tHcIRhsPjKIB23IoOTb9QFnaES KfhyNsaP3As0L5hRzyDl3rHGlTfaYA7IEnVv91Mm4pWZXSM2Su8nGE703105/8Y5eh4i BVY159k2+MiEXngAIIVEtNs8W1NDAhE5MfralwZIvakulbmqiDNiMwztoOin4/dd8qQD h5y8ppnSAp5toGr/EHxnQ8r4c0Ty+DsPTXGJvXLHZ/Z1LpUZBqvsFN9aSyMQgw5uZvAB TQ+gX1qfENJk6+J+X4kxmH3Oa7lF6bZZVgtiTHtBg5ugFoETRZnQiep7PwP6WAL4HBFY gL/Q== X-Gm-Message-State: AOPr4FV0B6JYPnH1bgiTMFE9TPvGmgOawNFGkotW+9ekKWjYVKj+fDEzGi6X5Bym7BX2vqFkefwIBpN6EQ/ONg== X-Received: by 10.157.54.188 with SMTP id h57mr8886657otc.98.1461920492110; Fri, 29 Apr 2016 02:01:32 -0700 (PDT) Original-Received: by 10.157.20.212 with HTTP; Fri, 29 Apr 2016 02:01:32 -0700 (PDT) X-Originating-IP: [59.149.183.3] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109832 Archived-At: Hi, I want to add a function to a hook to achieve effect that, whenever the cursors moves by K lines, or goes to another buffer, then center the cursor on the screen. So, what's the related hook? Regards --=20 =E5=90=BE=E8=BC=A9=E3=81=AF=E7=8C=AB=E3=81=A7=E3=81=82=E3=82=8B=E3=80=82=E3= =83=9B=E3=83=BC=E3=83=A0=E3=83=BC=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AFhttps:= //introo.me =E3=80=82