------------------------------------------------------------ revno: 117141 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2014-05-23 11:54:44 -0400 message: * lisp/minibuffer.el (completion--sreverse): Remove. (completion--common-suffix): Use `reverse' instead. * lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-05-22 19:56:49 +0000 +++ lisp/ChangeLog 2014-05-23 15:54:44 +0000 @@ -1,3 +1,9 @@ +2014-05-23 Stefan Monnier + + * minibuffer.el (completion--sreverse): Remove. + (completion--common-suffix): Use `reverse' instead. + * emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings. + 2014-05-22 Glenn Morris * shell.el (shell-mode) : Bypass bash aliases. === modified file 'lisp/emacs-lisp/regexp-opt.el' --- lisp/emacs-lisp/regexp-opt.el 2014-02-10 01:34:22 +0000 +++ lisp/emacs-lisp/regexp-opt.el 2014-05-23 15:54:44 +0000 @@ -205,9 +205,7 @@ (regexp-opt-group suffixes t t) close-group)) - (let* ((sgnirts (mapcar (lambda (s) - (concat (nreverse (string-to-list s)))) - strings)) + (let* ((sgnirts (mapcar #'reverse strings)) (xiffus (try-completion "" sgnirts))) (if (> (length xiffus) 0) ;; common suffix: take it and recurse on the prefixes. @@ -218,8 +216,7 @@ 'string-lessp))) (concat open-group (regexp-opt-group prefixes t t) - (regexp-quote - (concat (nreverse (string-to-list xiffus)))) + (regexp-quote (nreverse xiffus)) close-group)) ;; Otherwise, divide the list into those that start with a === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-05-14 17:01:29 +0000 +++ lisp/minibuffer.el 2014-05-23 15:54:44 +0000 @@ -873,6 +873,7 @@ ;; part of the string (e.g. substitute-in-file-name). (let ((requote (when (completion-metadata-get metadata 'completion--unquote-requote) + (cl-assert (functionp table)) (let ((new (funcall table string point 'completion--unquote))) (setq string (pop new)) (setq table (pop new)) @@ -3057,16 +3058,9 @@ (nconc (completion-pcm--hilit-commonality pattern all) (length prefix))))) -(defun completion--sreverse (str) - "Like `reverse' but for a string STR rather than a list." - (apply #'string (nreverse (mapcar 'identity str)))) - (defun completion--common-suffix (strs) "Return the common suffix of the strings STRS." - (completion--sreverse - (try-completion - "" - (mapcar #'completion--sreverse strs)))) + (nreverse (try-completion "" (mapcar #'reverse strs)))) (defun completion-pcm--merge-completions (strs pattern) "Extract the commonality in STRS, with the help of PATTERN. ------------------------------------------------------------ revno: 117140 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-05-22 15:56:49 -0400 message: * lisp/shell.el (shell-mode) : Bypass bash aliases. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-05-21 01:55:54 +0000 +++ lisp/ChangeLog 2014-05-22 19:56:49 +0000 @@ -1,3 +1,7 @@ +2014-05-22 Glenn Morris + + * shell.el (shell-mode) : Bypass bash aliases. + 2014-05-21 Daniel Colascione * files.el (interpreter-mode-alist): Add mksh. === modified file 'lisp/shell.el' --- lisp/shell.el 2014-04-07 01:27:32 +0000 +++ lisp/shell.el 2014-05-22 19:56:49 +0000 @@ -1,7 +1,6 @@ ;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- -;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Simon Marshall @@ -584,6 +583,8 @@ (setq shell-dirstack-query (cond ((string-equal shell "sh") "pwd") ((string-equal shell "ksh") "echo $PWD ~-") + ;; Bypass any aliases. TODO all shells could use this. + ((string-equal shell "bash") "command dirs") (t "dirs"))) ;; Bypass a bug in certain versions of bash. (when (string-equal shell "bash")