py-empty-out-list-backward in complete

Bug #1454266 reported by arnon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Invalid
Undecided
Unassigned

Bug Description

It seems that python-mode.el defines the subject as

;; Electric deletion
(defun py-empty-out-list-backward ()
  "Deletes all elements from list before point. "
  (interactive "*")
  (and (member (char-before) (list ?\) ?\] ?\}))
       (let ((orig (point))
             (thischar (char-before))
             pps cn)
         (forward-char -1)
         (setq pps (syntax-ppss))
         (if (and (not (nth 8 pps)) (nth 1 pps))
             (progn
               (goto-char (nth 1 pps))
               (forward-char 1))
           (cond ((or (eq thischar 41)(eq thischar ?\)))
                  (setq cn "("))
                 ((or (eq thischar 125) (eq thischar ?\}))
                  (setq cn "{"))
                 ((or (eq thischar 93)(eq thischar ?\]))
                  (setq cn "[")))
           (skip-chars-backward (concat "^" cn)))
         (delete-region (point) orig)
         (insert-char thischar 1)
         (forward-char -1))))

It seems this definitions has two extra '))' at the end.

Thanks,

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Four closing parens:

- close forward-char
- close let
- close and
-close defun

Changed in python-mode:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.