]> code.delx.au - gnu-emacs/blobdiff - lisp/novice.el
(find-file-noselect): If after-find-file switches buffers,
[gnu-emacs] / lisp / novice.el
index 0d23f26b3a1e24eeec565ed848fa13cbc197218d..eb7c5f20b5bfb15550c0fef7a3c0e61fcf3945a6 100644 (file)
@@ -18,8 +18,9 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
   (let (char)
     (save-window-excursion
      (with-output-to-temp-buffer "*Help*"
-       (if (eq (aref (this-command-keys) 0)
-              (if (stringp (this-command-keys))
-                  (aref "\M-x" 0)
-                ?\M-x))
-          (princ "You have invoked the disabled command ")
-        (princ "You have typed ")
-        (princ (key-description (this-command-keys)))
-        (princ ", invoking disabled command "))
+       (let ((keys (this-command-keys)))
+        (if (or (eq (aref keys 0)
+                    (if (stringp keys)
+                        (aref "\M-x" 0)
+                      ?\M-x))
+                (and (>= (length keys) 2)
+                     (eq (aref keys 0) meta-prefix-char)
+                     (eq (aref keys 1) ?x)))
+            (princ "You have invoked the disabled command ")
+          (princ "You have typed ")
+          (princ (key-description keys))
+          (princ ", invoking disabled command ")))
        (princ this-command)
        (princ ":\n")
        ;; Print any special message saying why the command is disabled.