*** info.el.~1.355.~ Sat Jun 7 08:08:15 2003 --- info.el Sat Jun 7 08:11:51 2003 *************** (defun Info-extract-pointer (name &optio *** 1403,1414 **** (defun Info-following-node-name (&optional allowedchars) "Return the node name in the buffer following point. ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp ! saying which chars may appear in the node name." (skip-chars-forward " \t") (buffer-substring-no-properties (point) (progn (while (looking-at (concat "[" (or allowedchars "^,\t\n") "]")) (skip-chars-forward (concat (or allowedchars "^,\t\n") "(")) (if (looking-at "(") (skip-chars-forward "^)"))) --- 1403,1434 ---- (defun Info-following-node-name (&optional allowedchars) "Return the node name in the buffer following point. ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp ! saying which chars may appear in the node name. ! ! If \".\" is not among the allowed chars, it will still be accepted if it (or ! a sequence of dots) is followed by a non-whitespace, non-\")\", allowed ! char. A node name in a cross reference normally ends at a \".\", but this ! rule lets filenames like foo.h appear there." ! ! ;; For reference, the standalone info reader applies a similar rule for ! ;; ".", see texinfo info/search.c skip_node_characters(). ! ;; ! ;; "(*note something: node name.)" is a reasonably typical cross ! ;; reference, and is the reason we disallow ")" after ".". ! ;; ! ;; "*note something: node name.," or "*note something: node name.." can ! ;; arise from "@pxref{node name}," or "@pxref{node name}." and although ! ;; the latter is no doubt erroneous since pxref inserts its own ".", it ! ;; still seems worth handling correctly. ! (skip-chars-forward " \t") (buffer-substring-no-properties (point) (progn (while (looking-at (concat "[" (or allowedchars "^,\t\n") "]")) + (if (and (looking-at "\\.+\\([^.) ,\t\n]\\)") + (string-match (concat "^[" (or allowedchars "^,\t\n") "]"))) + (skip-chars-forward ".")) (skip-chars-forward (concat (or allowedchars "^,\t\n") "(")) (if (looking-at "(") (skip-chars-forward "^)")))