miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > True, my code would indeed be incorrect if the number of minibuffer > levels to be aborted weren't to match the number of recursive edits. > However, in such cases, my code isn't reached because an error is > signaled that the current minibuffer isn't in the innermost command > loop. > > Sorry for not clarifying this earlier. Would it would be enough to > include the following comment in the code?: > > /* Due to the above check, the current minibuffer is in the most nested > command loop, which means that we don't have to abort any extra > non-minibuffer recursive edits. Thus, the number of recursive edits > we have to abort equals the number of minibuffers we have to abort. > */ > > [...] > Perhaps the following adjustment to the doc string could be considered > (to be applied on top of the latest patch). It copies the beginning of > abort-recursive-edit's doc string and removes the link to it. > > [...] I realized that my proposals are kind of scattered over multiple e-mails in this thread. So I'm sending them again, attached in this mail as complete patches that apply to current master. The first patch refactors abort-minibuffers (and improves minibuffer-quit-recursive-edit's doc string as requested). The second patch improves documentation of recursive editing. Best regards.