aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-01-23 06:42:27 +0000
committerRichard M. Stallman1998-01-23 06:42:27 +0000
commit862aacbf3457ebb312614dbb17f188d37cbf3959 (patch)
tree5dfcfe2b6f477b2b229bc8286ad63ac100ef6873
parent03c9127e39529442c8ef8b75dc4ece02417cc98e (diff)
downloademacs-862aacbf3457ebb312614dbb17f188d37cbf3959.tar.gz
emacs-862aacbf3457ebb312614dbb17f188d37cbf3959.zip
(msb--strip-dir): Use Emacs filename primitives, not regexps.
-rw-r--r--lisp/msb.el9
1 files changed, 1 insertions, 8 deletions
diff --git a/lisp/msb.el b/lisp/msb.el
index 03361c16166..3db53b86ba1 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -456,14 +456,7 @@ If the argument is left out or nil, then the current buffer is considered."
456 456
457;; Strip one hierarchy level from the end of DIR. 457;; Strip one hierarchy level from the end of DIR.
458(defun msb--strip-dir (dir) 458(defun msb--strip-dir (dir)
459 (save-match-data 459 (file-name-directory (directory-file-name dir)))
460 (cond
461 ((string-match "^\\([^/]*/.+/\\)[^/]+$" dir)
462 (substring dir (match-beginning 1) (match-end 1)))
463 ((string-match "^\\([^/]*/\\)" dir)
464 (substring dir (match-beginning 1) (match-end 1)))
465 (t
466 (error "msb: Directory `%s' has an unrecognized format" dir)))))
467 460
468;; Create an alist with all buffers from LIST that lies under the same 461;; Create an alist with all buffers from LIST that lies under the same
469;; directory will be in the same item as the directory string. 462;; directory will be in the same item as the directory string.