From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Keybinding Default Command and Execution with Argument Date: Thu, 5 Nov 2020 16:41:11 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6000"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 05 16:43:31 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kahQA-0001Tk-V0 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 16:43:30 +0100 Original-Received: from localhost ([::1]:54830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kahQ9-0007tp-Q0 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 10:43:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kahNz-0007t7-NF for help-gnu-emacs@gnu.org; Thu, 05 Nov 2020 10:41:15 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:58069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kahNx-0004TT-FW for help-gnu-emacs@gnu.org; Thu, 05 Nov 2020 10:41:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604590871; bh=efsJnt7jw7RuNfv4nS4LUcxLqFP8o+CGRJQO3evz/po=; h=X-UI-Sender-Class:From:To:Subject:Date; b=RcBbfjT8FXa+qlAsWEkxDUzDvXyfxKVyB/izlJiB1cyduURO4XRhYvAQoM1PeZcwj +NgCNupeCNdUlQKZFIBMxj+dc0jvtgGGpO5J0VYlf1W0EmIPoRHaH9o4eUClXSIPx0 yynik0wn/EIAfIQqtrDQZcbbnhabFyF3kwdcTbww= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs14.server.lan [172.19.170.182]) (via HTTP); Thu, 5 Nov 2020 16:41:11 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:2zceTnCJYB4mCaAfmBB2mQwXF6Ru88zS1YDcHDJzSYe5940YT4CodsS5R5GcYpr/RwIMm 0fqw4lQSNqIzYhPvHcyVGjNQvLZZ1z7Sx0tZqC6nS0TEeVJw8zOx9xtBObzn+sXRJEqXV/iS6S6y 9XVO32jvTGE4FEDSZpTWAzgxqPzOYImAMVQocuOrZyBBzpE7PNve2yFDHF6AMUhlhShHyAekvE28 mhxEyvJ7NiIjPbUysr4tTdNdWFc6XlXn/UeJtWJVnEsDQ/HjA/abJrsE3lsdXp46Pianp+CvAGqL 4U= X-UI-Out-Filterresults: notjunk:1;V03:K0:PLt4srzDWhc=:yjy3gP+dKstLz5k99nVZwD KZqmTZ9pytBp6JKczOwQRSDEP0epap7CnubPdOGz232XBO4E5a7mbe3Z+LfDbksIwAaKtbs8q cSK0YE1WwaFZRHBeHDsYUP9oqnU7PGX4jN9hSKG2ZTrwTTuvOy6u8gFoA2ptCtTU9/cz3Fo1Y M4VJrNyk61ejp60McTjVcWRscntYkkUmt2Rk6KXCPtfcqbT2GicWtDhTZcERStjaBvL006DuY tKr35yNVT1mZW9MCtZamxedFlMe4MKcVe8xL3m2h6JFO0i+nHMi/oK3iAuPeShu+TQVKAk2i5 +8dWxqzO5M4B2DKiVyc0swSAGybFU42+Q/P4VP4QYKvi4Cvj5Mvn27OqNBKFWxvs9Nzgi+Ok/ xau8W/brd33+Irs/MKhXxA4q7g2337Ey4so4CrKSopsijgq1xvNFW0V4T47eLMxBTYWgiQu1I iTywvMGrJX8sj9y9sOuYTBDsjCa39mkhFCwQN47iT0JF7NhQrrcyPUOl5buQ5VsksjqIxW8lg LRgV0lGwoDfm2zUfvgdTRE2mhminxaH9TNP8Lt/+1MApWkO/vO24eU8hMvxtlazbo/otYlbGE AryFGUBNxYphY= Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 10:16:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125016 Archived-At: I made a simple defun to move the current character over n other character= s. It behaves a differently than transpose-chars, because the cursor point st= ays on the same character, rather than moving to the cursor next to the swappe= d character to the right. When using transpose-chars. one can use transpose-chars without any argume= nt, taking the default of one. M-x transpose-chars Alternatively, one can pass an argument (e.g. 3) as follows C-u 3 M-x transpose-chars Currently, I can only use Skip-Over-Chars with argument. Is there a way t= o use the function Skip-Over-Chars without requiring an argument, but defaul= ting the argument to one as what can be done with transpose-chars? (defun Skip-Over-Chars (n) "Skip-Over-Chars transfers character over 'n' other characters, forward and backward." (interactive "N Number of skips: ") (forward-char) (transpose-chars n) (backward-char) )