# HG changeset patch # User Karl Heuer # Date 824432287 0 # Node ID 39a431eafb3475ddfe15060badac98aaa2b7a275 # Parent d82c768cb571530a582b6b5d21d5f04a275a5105 (info-insert-file-contents-1) [MSDOS]: Remove leading dot only from non-empty suffixes. diff -r d82c768cb571 -r 39a431eafb34 lisp/info.el --- a/lisp/info.el Fri Feb 16 00:55:11 1996 +0000 +++ b/lisp/info.el Fri Feb 16 00:58:07 1996 +0000 @@ -159,9 +159,10 @@ (ext-len (max 0 (- (length filename) (length sans-exts) 1))) ext-left) ;; SUFFIX starts with a dot. If FILENAME already has one, - ;; get rid of the one in SUFFIX. + ;; get rid of the one in SUFFIX (unless suffix is empty). (or (and (<= ext-len 0) (not (eq (aref filename (1- (length filename))) ?.))) + (= (length suffix) 0) (setq suffix (substring suffix 1))) ;; How many chars of that extension should we keep? (setq ext-left (min ext-len (max 0 (- 3 (length suffix)))))