Commits

Anonymous committed 6e6ab2b Merge

merge trunk

Comments (0)

Files changed (4)

+2011-09-20  Lawrence Mitchell  <wence@gmx.li>
+
+	* progmodes/f90.el (f90-break-line): If breaking inside comment delete
+	all whitespace around breakpoint.  (Bug#9553)
+	(f90-find-breakpoint): Only break at whitespace inside a comment.
+
+2011-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* minibuffer.el (completion-file-name-table): Keep track of errors.
+	(completion-table-with-predicate): Handle the case where pred1 is nil.
+	* pcomplete.el (pcomplete-completions-at-point): Simplify.
+
 2011-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/debug.el (debugger-args): Give it a docstring.

lisp/minibuffer.el

     (test-completion string table pred2))
    (t
     (or (complete-with-action action table string
-                              (if (null pred2) pred1
+                              (if (not (and pred1 pred2))
+                                  (or pred1 pred2)
                                 (lambda (x)
                                   ;; Call `pred1' first, so that `pred2'
                                   ;; really can't tell that `x' is in table.
-                                  (if (funcall pred1 x) (funcall pred2 x)))))
+                                  (and (funcall pred1 x) (funcall pred2 x)))))
         ;; If completion failed and we're not applying pred1 strictly, try
         ;; again without pred1.
-        (and (not strict)
+        (and (not strict) pred1 pred2
              (complete-with-action action table string pred2))))))
 
 (defun completion-table-in-turn (&rest tables)
 
 (defun completion-file-name-table (string pred action)
   "Completion table for file names."
-  (ignore-errors
+  (with-demoted-errors
     (cond
      ((eq action 'metadata) '(metadata (category . file)))
      ((eq (car-safe action) 'boundaries)

lisp/pcomplete.el

               (pred
                ;; Pare it down, if applicable.
                (when (and pcomplete-use-paring pcomplete-seen)
-                 (setq pcomplete-seen
-                       (mapcar (lambda (f)
-                                 (funcall pcomplete-norm-func
-                                          (directory-file-name f)))
-                               pcomplete-seen))
                  ;; Capture the dynbound values for later use.
                  (let ((norm-func pcomplete-norm-func)
-                       (seen pcomplete-seen))
+                       (seen
+			(mapcar (lambda (f)
+				  (funcall pcomplete-norm-func
+					   (directory-file-name f)))
+				pcomplete-seen)))
                    (lambda (f)
                      (not (member
                            (funcall norm-func (directory-file-name f))

lisp/progmodes/f90.el

   (cond ((f90-in-string)
          (insert "&\n&"))
         ((f90-in-comment)
-         (delete-horizontal-space 'backwards) ; remove trailing whitespace
+         (delete-horizontal-space) ; remove trailing whitespace
          (insert "\n" (f90-get-present-comment-type)))
         (t (insert "&")
            (or no-update (f90-update-line))
 
 (defun f90-find-breakpoint ()
   "From `fill-column', search backward for break-delimiter."
-  (re-search-backward f90-break-delimiters (line-beginning-position))
+  (if (f90-in-comment)
+      (re-search-backward "\\s-" (line-beginning-position))
+    (re-search-backward f90-break-delimiters (line-beginning-position)))
   (if (not f90-break-before-delimiters)
       (forward-char (if (looking-at f90-no-break-re) 2 1))
     (backward-char)