summaryrefslogtreecommitdiff
path: root/doc/lispref/files.texi
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2012-06-26 12:23:01 -0400
committerSam Steingold <sds@gnu.org>2012-06-26 12:23:01 -0400
commitd2c32364fd1873a6e9cfa52d2531dfbe500ad297 (patch)
treef567c36975e6d137b55ecca8ddf856cfe6e7de0d /doc/lispref/files.texi
parent62efea5e881407a178c5c291575facc17dca8a3f (diff)
downloademacs-d2c32364fd1873a6e9cfa52d2531dfbe500ad297.tar.gz
* lisp/files.el (file-name-base): New convenience function.
* lisp/autoinsert.el, lisp/cus-dep.el, lisp/doc-view.el, lisp/image-dired.el, * lisp/woman.el, lisp/eshell/esh-cmd.el, lisp/progmodes/ada-xref.el, * lisp/progmodes/cc-defs.el, lisp/progmodes/cperl-mode.el, * lisp/progmodes/flymake.el, lisp/progmodes/gud.el, lisp/progmodes/idlwave.el, * lisp/textmodes/ispell.el, lisp/textmodes/reftex-ref.el, * lisp/textmodes/tex-mode.el: Use it. Did not touch cedet and org because they are maintained elsewhere.
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r--doc/lispref/files.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 618569c3559..56971bf0ff0 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1846,6 +1846,17 @@ Note that the @samp{.~3~} in the two last examples is the backup part,
not an extension.
@end defun
+@defun file-name-base &optional filename
+This function is the composition of @code{file-name-sans-extension}
+and @code{file-name-nondirectory}. For example,
+
+@example
+(file-name-base "/my/home/foo.c")
+ @result{} "foo"
+@end example
+
+The @var{filename} argument defaults to @code{buffer-file-name}.
+@end defun
@node Relative File Names
@subsection Absolute and Relative File Names