Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
Date: Mon, 09 May 2016 22:17:43 +0000
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: .safe keymap doesn't use builtin widgets?
Message-ID: <20160509221743.GA16416@tarsus.local2>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Seq: zsh-workers 38454

Currently, the ".safe" keymap is:

    % bindkey -LM .safe
    bindkey -R -M .safe "^@"-"^I" self-insert
    bindkey -M .safe "^J" accept-line
    bindkey -R -M .safe "^K"-"^L" self-insert
    bindkey -M .safe "^M" accept-line
    bindkey -R -M .safe "^N"-"\M-^?" self-insert

Shouldn't it use the dot-prefixed versions of self-insert and
accept-line, so that for example the following wouldn't lock the user
out:

    % self-insert() {} 
    % zle -N self-insert; bindkey -A .safe main
    % 

?

