;;; sh-script.el --- shell-script editing commands for Emacs
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f
(when (memq (char-before) '(?\" ?\'))
(condition-case nil (progn (backward-sexp 1) t)
(error nil)))))
+ ;; Patterns can be preceded by an open-paren (Bug#1320).
+ (if (eq (char-before (point)) ?\()
+ (backward-char 1))
(while (progn
(forward-comment (- (point-max)))
;; Maybe we've bumped into an escaped newline.
;;
;; (defun what-i-learned (list)
;; (let ((p list))
-;; (save-excursion
-;; (set-buffer "*scratch*")
+;; (with-current-buffer "*scratch*"
;; (goto-char (point-max))
;; (insert "(setq\n")
;; (while p
)))
;; Are abnormal hooks considered bad form?
(run-hook-with-args 'sh-learned-buffer-hook learned-var-list)
- (and (called-interactively-p)
+ (and (called-interactively-p 'any)
(or sh-popup-occur-buffer (> num-diffs 0))
(pop-to-buffer out-buffer)))))