* src/keyboard.c (command_loop_1): Record this-command in recent-keys.
(Frecent_keys): Rewrite. and add optional `include-cmds' arg.
\f
* Changes in Emacs 25.1
+** C-h l now also lists the commands that were run.
+
** M-x suggests shorthands and ignores obsolete commands for completion.
** x-select-enable-clipboard is renamed select-enable-clipboard.
x-select-enable-primary and renamed select-enable-primary.
+2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * help.el (view-lossage): Include the actual commands run.
+
2014-11-10 Dmitry Gutov <dgutov@yandex.ru>
* vc/vc-dir.el (vc-dir-hide-state): Also hide `ignored' items when
2014-11-09 Eric Ludlam <zappo@gnu.org>
- * emacs-lisp/eieio-custom.el (eieio-customize-object): Set
- eieio-cog (current group) to g, which is an improved form of input
+ * emacs-lisp/eieio-custom.el (eieio-customize-object):
+ Set eieio-cog (current group) to g, which is an improved form of input
group.
2014-11-09 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-message-prefix): Show "Multi-file" and
"Multi-buffer" instead of "Multi". (Bug#13592)
- * misearch.el (multi-isearch-file-list): Autoload
- multi-isearch-buffer-list and multi-isearch-file-list.
+ * misearch.el (multi-isearch-file-list):
+ Autoload multi-isearch-buffer-list and multi-isearch-file-list.
(multi-isearch-end): Reset multi-isearch-buffer-list and
multi-isearch-file-list to nil.
2014-11-08 Alan Mackenzie <acm@muc.de>
Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.
- * progmodes/cc-fonts.el (c-font-lock-declarations): Pass
- "(point-max)" as bound to c-font-lock-declarators, not "limit", as
+ * progmodes/cc-fonts.el (c-font-lock-declarations):
+ Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as
the buffer is sometimes narrowed to less than "limit" (e.g., in
the presence of macros).
(info "(efaq)Packages that do not come with Emacs"))
(defun view-lossage ()
- "Display last 300 input keystrokes.
+ "Display last few input keystrokes and the commands run.
To record all your input, use `open-dribble-file'."
(interactive)
(help-setup-xref (list #'view-lossage)
(called-interactively-p 'interactive))
(with-help-window (help-buffer)
+ (princ " ")
(princ (mapconcat (lambda (key)
- (if (or (integerp key) (symbolp key) (listp key))
- (single-key-description key)
- (prin1-to-string key nil)))
- (recent-keys)
+ (cond
+ ((and (consp key) (null (car key)))
+ (format "[%s]\n" (if (symbolp (cdr key)) (cdr key)
+ "anonymous-command")))
+ ((or (integerp key) (symbolp key) (listp key))
+ (single-key-description key))
+ (t
+ (prin1-to-string key nil))))
+ (recent-keys 'include-cmds)
" "))
(with-current-buffer standard-output
(goto-char (point-min))
- (while (progn (move-to-column 50) (not (eobp)))
- (when (search-forward " " nil t)
- (delete-char -1))
- (insert "\n"))
+ (while (not (eobp))
+ (move-to-column 50)
+ (unless (eolp)
+ (fill-region (line-beginning-position) (line-end-position)))
+ (forward-line 1))
;; jidanni wants to see the last keystrokes immediately.
(set-marker help-window-point-marker (point)))))
+2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (command_loop_1): Record this-command in recent-keys.
+ (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
+
2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_set_vertical_scroll_bar)
/* Execute the command. */
+ {
+ total_keys += total_keys < NUM_RECENT_KEYS;
+ ASET (recent_keys, recent_keys_index,
+ Fcons (Qnil, cmd));
+ if (++recent_keys_index >= NUM_RECENT_KEYS)
+ recent_keys_index = 0;
+ }
Vthis_command = cmd;
Vreal_this_command = cmd;
safe_run_hooks (Qpre_command_hook);
? Qt : Qnil);
}
-DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0,
- doc: /* Return vector of last 300 events, not counting those from keyboard macros. */)
- (void)
+DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 1, 0,
+ doc: /* Return vector of last few events, not counting those from keyboard macros.
+If INCLUDE-CMDS is non-nil, include the commands that were run,
+represented as events of the form (nil . COMMAND). */)
+ (Lisp_Object include_cmds)
{
- Lisp_Object *keys = XVECTOR (recent_keys)->contents;
- Lisp_Object val;
+ bool cmds = !NILP (include_cmds);
- if (total_keys < NUM_RECENT_KEYS)
- return Fvector (total_keys, keys);
+ if (!total_keys
+ || (cmds && total_keys < NUM_RECENT_KEYS))
+ return Fvector (total_keys,
+ XVECTOR (recent_keys)->contents);
else
{
- val = Fvector (NUM_RECENT_KEYS, keys);
- vcopy (val, 0, keys + recent_keys_index,
- NUM_RECENT_KEYS - recent_keys_index);
- vcopy (val, NUM_RECENT_KEYS - recent_keys_index,
- keys, recent_keys_index);
- return val;
+ Lisp_Object es = Qnil;
+ int i = (total_keys < NUM_RECENT_KEYS
+ ? 0 : recent_keys_index);
+ eassert (recent_keys_index < NUM_RECENT_KEYS);
+ do
+ {
+ Lisp_Object e = AREF (recent_keys, i);
+ if (cmds || !CONSP (e) || !NILP (XCAR (e)))
+ es = Fcons (e, es);
+ if (++i >= NUM_RECENT_KEYS)
+ i = 0;
+ } while (i != recent_keys_index);
+ es = Fnreverse (es);
+ return Fvconcat (1, &es);
}
}
+2014-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * automated/bytecomp-tests.el (bytecomp-tests--warnings): New tests.
+ * automated/cl-lib-tests.el: Rename from cl-lib.el.
+
2014-10-28 Ulf Jasper <ulf.jasper@web.de>
* automated/libxml-tests.el: New file.