🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87771

completion.el bug

#87771
From: Chris Moore
Date: Wed, 31 Aug 1994 13:22
63 lines
3611 bytes
In GNU Emacs 19.25.94.1 (sparc-sun-sunos4.1.3, X toolkit) of Mon Aug
22 1994 on sun25, loading completion.el and then chosing the menu
entry that this code creates:

========================================================================
(defmacro BAe-add-project (menu-item proj-name proj-number proj-env-var proj-local-dir)
  "Add the project to the BAe projects menu. 
   This will allow the user to change the project name, number
   environment variable and home directory for BAe-copyright"
  (` (define-key-after menu-bar-BAe-projects-map (vector (intern (, menu-item)) )
      (cons (, menu-item) '(lambda () (interactive)
			      (BAe-select-project (, proj-name)
						  (, proj-number)
						  (, proj-env-var)
						  (, proj-local-dir))))
      'separator3))
  )
========================================================================

causes an error:

========================================================================
Signalling: (wrong-type-argument symbolp (lambda nil (interactive) (BAe-select-project "ST6 AESD" "144108" "IDF_HOME" "/home/aip1/bullen/idf")))
  get((lambda nil (interactive) (BAe-select-project "ST6 AESD" "144108" "IDF_HOME" "/home/aip1/bullen/idf")) completion-function)
  (or (get this-command (quote completion-function)) (quote use-completion-under-or-before-point))
  (funcall (or (get this-command ...) (quote use-completion-under-or-before-point)))
  completion-before-command()
  run-hooks(command-hook-internal)
========================================================================

Here's a patch - it makes completion.el only call 'get' on
this-command if this-command is a symbol.

========================================================================
*** completion.el.~1~	Wed Jul  6 22:30:37 1994
--- completion.el	Wed Aug 31 13:50:19 1994
***************
*** 2540,2546 ****
        (cmpl-statistics-block (record-complete-failed))))
  
  (defun completion-before-command ()
!   (funcall (or (get this-command 'completion-function)
  	       'use-completion-under-or-before-point)))
  (add-hook 'pre-command-hook 'completion-before-command)
  
--- 2540,2547 ----
        (cmpl-statistics-block (record-complete-failed))))
  
  (defun completion-before-command ()
!   (funcall (or (and (symbolp this-command)
! 		    (get this-command 'completion-function))
  	       'use-completion-under-or-before-point)))
  (add-hook 'pre-command-hook 'completion-before-command)
  
========================================================================

Chris.
--
Chris.Moore@src.bae.co.uk /      Chris Moore      \ Argue for your limitations,
                         / Sowerby Research Centre \   and surely, they
                         \  British Aerospace PLC  /      are yours.
tel: +44 272 363375       \      BRISTOL, UK      /          -- Richard Bach
Technical Details
Message-ID: <9408311255.AA15742@sun25.src.bae.co.uk>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!src.bae.co.UK!Chris.Moore

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,f4c9f579f52dc0b0,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-31 06:24:42 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!nic-nac.CSU.net!usc!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!src.bae.co.UK!Chris.Moore
From: Chris.Moore@src.bae.co.UK (Chris Moore)
Newsgroups: gnu.emacs.bug
Subject: completion.el bug
Date: 31 Aug 1994 09:22:08 -0400
Organization: GNUs Not Usenet
Lines: 63
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9408311255.AA15742@sun25.src.bae.co.uk>