all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil)
@ 2015-03-26  1:48 Clément Pit--Claudel
  2015-03-26 13:37 ` Stefan Monnier
  2015-03-26 13:38 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Clément Pit--Claudel @ 2015-03-26  1:48 UTC (permalink / raw
  To: 20204

[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]

Evaluating the following forms after launching `emacs -Q' yields `(wrong-type-argument number-or-marker-p nil)':

    (require 'smie)
    (smie-backward-sexp-command)

This is due to `smie-backward-sexp-command' not checking whether `n' is `nil' before passing `(- n)' to `smie-forward-sexp-command'.

-- Clément.

In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2015-01-25 on my-laptop
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Linux Mint 17.1 Rebecca

Important settings:
  value of $LC_TIME: en_DK.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils debug help-mode easymenu help-fns smie time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 73625 7003)
 (symbols 48 17900 0)
 (miscs 40 47 163)
 (strings 32 10002 4475)
 (string-bytes 1 278134)
 (vectors 16 9330)
 (vector-slots 8 389150 12295)
 (floats 8 65 248)
 (intervals 56 202 1)
 (buffers 960 13)
 (heap 1024 22193 868))


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil)
  2015-03-26  1:48 bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil) Clément Pit--Claudel
@ 2015-03-26 13:37 ` Stefan Monnier
  2015-03-26 13:38 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-03-26 13:37 UTC (permalink / raw
  To: Clément Pit--Claudel; +Cc: 20204

Version: 24.5

> This is due to `smie-backward-sexp-command' not checking whether `n'
> is `nil' before passing `(- n)' to `smie-forward-sexp-command'.

Indeed.  I installed the patch below which just doesn't let you skip
the argument.


        Stefan


--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -834,12 +834,12 @@ Possible return values:
 
 ;;; Miscellaneous commands using the precedence parser.
 
-(defun smie-backward-sexp-command (&optional n)
+(defun smie-backward-sexp-command (n)
   "Move backward through N logical elements."
   (interactive "^p")
   (smie-forward-sexp-command (- n)))
 
-(defun smie-forward-sexp-command (&optional n)
+(defun smie-forward-sexp-command (n)
   "Move forward through N logical elements."
   (interactive "^p")
   (let ((forw (> n 0))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil)
  2015-03-26  1:48 bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil) Clément Pit--Claudel
  2015-03-26 13:37 ` Stefan Monnier
@ 2015-03-26 13:38 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-03-26 13:38 UTC (permalink / raw
  To: Clément Pit--Claudel; +Cc: 20204-done

Version:24.5

> Evaluating the following forms after launching `emacs -Q' yields `(wrong-type-argument number-or-marker-p nil)':
>     (require 'smie)
>     (smie-backward-sexp-command)

Fixed,


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-26 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26  1:48 bug#20204: 24.4; (smie-backward-sexp-command) throws (wrong-type-argument number-or-marker-p nil) Clément Pit--Claudel
2015-03-26 13:37 ` Stefan Monnier
2015-03-26 13:38 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.